File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/portable/nordic/nrf5x Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -653,7 +653,11 @@ void dcd_int_handler(uint8_t rhport)
653653 if (NRF_USBD -> EPOUTEN & USBD_EPOUTEN_ISOOUT_Msk )
654654 {
655655 iso_enabled = true;
656- xact_out_dma (EP_ISO_NUM );
656+ // Transfer from endpoint to RAM only if data is not corrupted
657+ if ((int_status & USBD_INTEN_USBEVENT_Msk ) == 0 ||
658+ (NRF_USBD -> EVENTCAUSE & USBD_EVENTCAUSE_ISOOUTCRC_Msk ) == 0 ) {
659+ xact_out_dma (EP_ISO_NUM );
660+ }
657661 }
658662
659663 // ISOIN: Notify client that data was transferred
@@ -683,7 +687,7 @@ void dcd_int_handler(uint8_t rhport)
683687 {
684688 TU_LOG (2 , "EVENTCAUSE = 0x%04lX\r\n" , NRF_USBD -> EVENTCAUSE );
685689
686- enum { EVT_CAUSE_MASK = USBD_EVENTCAUSE_SUSPEND_Msk | USBD_EVENTCAUSE_RESUME_Msk | USBD_EVENTCAUSE_USBWUALLOWED_Msk };
690+ enum { EVT_CAUSE_MASK = USBD_EVENTCAUSE_SUSPEND_Msk | USBD_EVENTCAUSE_RESUME_Msk | USBD_EVENTCAUSE_USBWUALLOWED_Msk | USBD_EVENTCAUSE_ISOOUTCRC_Msk };
687691 uint32_t const evt_cause = NRF_USBD -> EVENTCAUSE & EVT_CAUSE_MASK ;
688692 NRF_USBD -> EVENTCAUSE = evt_cause ; // clear interrupt
689693
You can’t perform that action at this time.
0 commit comments