fix samd21 race condition with setup packet
reproduced with Adafruit_TinyUSB_ArduinoCore port commit 11d669b4d2a40eb2fc5e51b2a9707a6de9d42363 and SAMD BSP 1.6.1
This commit is contained in:
		| @@ -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. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 hathach
					hathach