Closed thousandeyes-fwieland closed 4 years ago
This is expected, F446 is not supported at the moment. This chip has another version of USB IP core, so as a lot of other F4xx chips. From what I can see with a logic analyzer, first USB communication with a host works great, but then the device fails to receive one of the OUT packets from host effectively stopping enumeration process. This may happen due to the RX FIFO overflow, but I'm not sure.
I will experiment with porting code from the C/C++ library (I found a copy here https://github.com/kauailabs/navxmxp/blob/732ff85c1535ed61e572c0d7e1035320b3a1dc02/stm32/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_usb.c), I noticed it does things a bit differently
I've looked at the stm32ral crate and it does have the right registers for f446xx, although some changes will have to be made. I'll have more of a poke tomorrow.
The SVD for F446 appears to be quite messy when it comes to the USB peripherals, see https://github.com/stm32-rs/stm32-rs/issues/327
Thank you to everyone who has helped me with this issue, I have resolved it for now - at least on the ZE version of the dev board. Once I get some RE hardware made I'm going to test this again but for now everything appears to be working in order (the additional endpoints currently not available through this crate will be enabled in #3). This ticket can now be closed.
I'm using code very similar to that from the F446ZE plus a homemade breakout board, from a Nucleo F446RE. The USB functionality works and I can prove it by flashing an mbed program instead.
Here I try to make a simple serial echo program. What actually happens is that the onboard LED flashes momentarily after connecting the board to my laptop, but nothing else happens and the board remains powered.
Actual code: