diff options
| author | hathach <[email protected]> | 2018-08-28 15:57:21 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-08-28 15:57:21 +0700 |
| commit | 583326e535454f16b06ebdb9cc06869602a5564c (patch) | |
| tree | 8509f0f96cc2a46bab52f3a3f3bbea6d35b4edd2 /src | |
| parent | c8b72e397e2ed2b1aabe4212c9b29fe06ee537b3 (diff) | |
nrf5x fix an issue with EP0STATUS require Easy DMA
Diffstat (limited to 'src')
| -rw-r--r-- | src/portable/nordic/nrf5x/dcd_nrf5x.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/portable/nordic/nrf5x/dcd_nrf5x.c b/src/portable/nordic/nrf5x/dcd_nrf5x.c index f9a278a49..01926c76e 100644 --- a/src/portable/nordic/nrf5x/dcd_nrf5x.c +++ b/src/portable/nordic/nrf5x/dcd_nrf5x.c @@ -86,7 +86,7 @@ typedef struct { uint8_t* buffer; uint16_t total_len; - uint16_t actual_len; + volatile uint16_t actual_len; uint8_t dir; }control; @@ -216,9 +216,9 @@ bool dcd_control_xfer (uint8_t rhport, uint8_t dir, uint8_t * buffer, uint16_t l xact_control_start(); }else { - // Status Phase - NRF_USBD->TASKS_EP0STATUS = 1; - __ISB(); __DSB(); + // Status Phase also require Easy DMA has to be free as well !!!! + edpt_dma_start(&NRF_USBD->TASKS_EP0STATUS); + edpt_dma_end(); } return true; @@ -418,7 +418,6 @@ void USBD_IRQHandler(void) if ( int_status & USBD_INTEN_USBRESET_Msk ) { bus_reset(); - dcd_bus_event(0, USBD_BUS_EVENT_RESET); } @@ -559,8 +558,6 @@ void USBD_IRQHandler(void) { dcd_bus_event(0, USBD_BUS_EVENT_SOF); } - - } #endif |
