diff options
| author | hathach <[email protected]> | 2020-07-23 01:39:15 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2020-07-23 01:39:15 +0700 |
| commit | 0407cfe16c7b9736da2ff36c69232e7c3f470864 (patch) | |
| tree | f081ff213fcc5763534bf2633bab2b4ec511624f /src/portable | |
| parent | 7d2fc124452d6ec2d5d45bdacc4fc8b38d03d0d0 (diff) | |
fix samd21 race condition with setup packet
reproduced with Adafruit_TinyUSB_ArduinoCore port commit 11d669b4d2a40eb2fc5e51b2a9707a6de9d42363 and SAMD BSP 1.6.1
Diffstat (limited to 'src/portable')
| -rw-r--r-- | src/portable/microchip/samd/dcd_samd.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/portable/microchip/samd/dcd_samd.c b/src/portable/microchip/samd/dcd_samd.c index 45bff2511..d0cc8560a 100644 --- a/src/portable/microchip/samd/dcd_samd.c +++ b/src/portable/microchip/samd/dcd_samd.c @@ -43,6 +43,8 @@ static inline void prepare_setup(void) { // Only make sure the EP0 OUT buffer is ready sram_registers[0][0].ADDR.reg = (uint32_t) _setup_packet; + sram_registers[0][0].PCKSIZE.bit.MULTI_PACKET_SIZE = sizeof(_setup_packet); + sram_registers[0][0].PCKSIZE.bit.BYTE_COUNT = 0; } // Setup the control endpoint 0. |
