A bit more debugging, it seems that only the USBIN side does crash.
At random the UpdateLEDStatus subroutine stop to be serviced, and the USBIN does not receive anymore data. When it crashes, RX_READY = 0, then if I send data RX_READY = 1 and just stay there, without being cleared. the USBOUT side toes work well though, even when the IN side has crashed.Code:'******************************************************* 'Reading incoming data from USB port '******************************************************* DoUSBIn: FOR counter = 1 TO USBBufferSizeMax 'Clear the USB buffer before data is received USBBuffer [counter - 1] = 0 NEXT COUNTER WHILE !RX_READY GOSUB UpdateLEDStatus WEND IF RX_READY THEN RX_READY = 0 'Clear USB data received flag USBBufferCount = USBBufferSizeRX USBIn 3, USBBuffer, USBBufferCount, DoUSBIn ENDIF RETURN
Might have something to do with USB_ASM_Service.pbp not working properly?
-> A bit more debug introducing some LED blink to see if the USB_ASM_Service is being called: it stops being called when it crashes...




Bookmarks