Skip to content

Commit 804f671

Browse files
authored
Merge pull request #2385 from kasjer/kasjer/nrf5x-fix-dcd_edpt_open-for-iso
dcd_nrf5x: Fix dcd_edpt_open for iso endpoint
2 parents b9be733 + 7f84fe9 commit 804f671

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/portable/nordic/nrf5x/dcd_nrf5x.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,9 @@ bool dcd_edpt_open (uint8_t rhport, tusb_desc_endpoint_t const * desc_edpt)
340340
NRF_USBD->INTENSET = TU_BIT(USBD_INTEN_ENDEPIN0_Pos + epnum);
341341
NRF_USBD->EPINEN |= TU_BIT(epnum);
342342
}
343+
// clear stall and reset DataToggle
344+
NRF_USBD->EPSTALL = (USBD_EPSTALL_STALL_UnStall << USBD_EPSTALL_STALL_Pos) | ep_addr;
345+
NRF_USBD->DTOGGLE = (USBD_DTOGGLE_VALUE_Data0 << USBD_DTOGGLE_VALUE_Pos) | ep_addr;
343346
}
344347
else
345348
{
@@ -375,10 +378,6 @@ bool dcd_edpt_open (uint8_t rhport, tusb_desc_endpoint_t const * desc_edpt)
375378
}
376379
}
377380

378-
// clear stall and reset DataToggle
379-
NRF_USBD->EPSTALL = (USBD_EPSTALL_STALL_UnStall << USBD_EPSTALL_STALL_Pos) | ep_addr;
380-
NRF_USBD->DTOGGLE = (USBD_DTOGGLE_VALUE_Data0 << USBD_DTOGGLE_VALUE_Pos) | ep_addr;
381-
382381
__ISB(); __DSB();
383382

384383
return true;

0 commit comments

Comments
 (0)