diff options
| author | hathach <[email protected]> | 2023-03-11 08:15:23 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2023-03-11 08:15:23 +0700 |
| commit | fe77976765ed1b73470d6f42f77a0c85f8760e7b (patch) | |
| tree | 9b698745b7cec40f252231e49c305eba414fca4d /src | |
| parent | 0f8e530de175e8fb289870fdd7c28ec0b16314e2 (diff) | |
| parent | 6af18dc90676ab8916d1611ab7bd6aefad9edc0b (diff) | |
Merge branch 'master' into renesas-ra
Diffstat (limited to 'src')
| -rw-r--r-- | src/portable/nordic/nrf5x/dcd_nrf5x.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/portable/nordic/nrf5x/dcd_nrf5x.c b/src/portable/nordic/nrf5x/dcd_nrf5x.c index afc14b010..4aeb85fc0 100644 --- a/src/portable/nordic/nrf5x/dcd_nrf5x.c +++ b/src/portable/nordic/nrf5x/dcd_nrf5x.c @@ -187,11 +187,16 @@ static void xact_out_dma(uint8_t epnum) } else { - // Trigger DMA move data from Endpoint -> SRAM - NRF_USBD->ISOOUT.PTR = (uint32_t) xfer->buffer; - NRF_USBD->ISOOUT.MAXCNT = xact_len; + if (xfer->started) + { + // Trigger DMA move data from Endpoint -> SRAM + NRF_USBD->ISOOUT.PTR = (uint32_t) xfer->buffer; + NRF_USBD->ISOOUT.MAXCNT = xact_len; - start_dma(&NRF_USBD->TASKS_STARTISOOUT); + start_dma(&NRF_USBD->TASKS_STARTISOOUT); + } else { + atomic_flag_clear(&_dcd.dma_running); + } } } else |
