Some basic things are working now like pin control, but USB communication between the Teensy and my PC is broken.
Here is what the messages look like on the Ubuntu PC I am connecting via USB to this board:
Code: Select all
[795986.548379] usb 4-3: new full-speed USB device number 23 using ohci-pci
[795986.700300] usb 4-3: device descriptor read/64, error -62
[795986.992387] usb 4-3: device descriptor read/64, error -62
[795987.276293] usb 4-3: new full-speed USB device number 24 using ohci-pci
[795987.436337] usb 4-3: device descriptor read/64, error -62
[795987.724336] usb 4-3: device descriptor read/64, error -62
[795988.012357] usb 4-3: new full-speed USB device number 25 using ohci-pci
[795988.428354] usb 4-3: device not accepting address 25, error -62
[795988.576271] usb 4-3: new full-speed USB device number 26 using ohci-pci
[795988.996313] usb 4-3: device not accepting address 26, error -62
[795988.996374] usb usb4-port3: unable to enumerate USB device
Looking at the USB driver running on the MCU, I can see that it is sending data, and it seems to receive as well, the interrupt handler is getting called, but USB0->ERRSTAT is always set. Seems but 0 of USB0->ERRSTAT gets set, which according to the datasheet, means USB PID verification failed. Based on my very limited understanding of USB communication, I think this is something like a checksum, so it might mean that the data coming into the MCU is somehow corrupted.
Does anyone have any pointers for how I could debug this further, or what kind of mistake I might have made in the HALs to lead to this problem?
I can share the code I have so far if that helps! In fact here is what I have so far:
https://github.com/walkerstop/ChibiOS-Contrib
Any help you can provide is greatly appreciated. Also, if anybody is ALREADY porting ChibiOS to this MCU or board, please let me know, I would hate to duplicate the same effort