This might be the wrong place to ask, but I’ll try as this forum has somewhat more activity than the Arduino forum when it comes to the Nicla Vision. I’m trying to use the Nicla Vision bare metal as I’m developing an application where I would like to have as much control over my own firmware as possible and there are some quite tight realtime requirements. I do not really need the MBED layer in the Arduino Core and the general workflow just suits me better with just a plain project with a makefile.
Anyways, I’ve currently been attempting to create a driver for USB to enable CDC (with the help of libusb_stm32). I’ve modified libusb_stm32 for the H7 and ULPI, and I’m seeing some response when I’m connecting the board, but it doesn’t seem to deliver the setup address. I’ve triple checked the pins to the transceiver and I’m able to receive the request for the setup address, but then it seems like the board isn’t responding back with an ACK.
The kernel messages from my computer reports that the high-speed device is detected, but that it doesn’t respond to the setup address. It then tries several times to resend that frame, power cycle and then it finally gives up and reports that it is unable to enumerate the device.
I don’t currently have a debugger available, but from the debug messages printed over UART this is what happens, where event 0 is reset, 1 is start of frame, 1 is suspend and 6 is setup. So from what I can tell, the MCU receives the request to setup and from within libusb_stm32 is providing the ACK, but somehow it doesn’t seem to propagate to the physical lines.
Process evt: event: 2, endpoint: 0 Finished processing evt: event: 2, endpoint: 0 Process evt: event: 0, endpoint: 0 Set process reset Finished processing evt: event: 0, endpoint: 0 Process evt: event: 6, endpoint: 0 Process ep0: event: 6, endpoint: 0 Process eprx: 0, device control state: 0 Process eprx 2: 0, device control state: 0 Setting address: 6 ACKING request type: 0 for ep: 0 Finished processing evt: event: 6, endpoint: 0 Process evt: event: 1, endpoint: 0 Finished processing evt: event: 1, endpoint: 0
I realise it’s a bit far stretched to be able to give any insights about this without any more code, but if anyone has any idea what could be causing this I’m more than happy to provide some more information or code.