Skip to content

Commit

Permalink
Merge pull request #1946 from kasjer/kasjer/nrf5x-fix-iso-memory-corr…
Browse files Browse the repository at this point in the history
…uption

dcd_nrf5x: ISO OUT handling
  • Loading branch information
hathach committed Mar 11, 2023
2 parents 990fb6a + f0ddf8d commit b5b2fad
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/portable/nordic/nrf5x/dcd_nrf5x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b5b2fad

Please sign in to comment.