There is no pullup on the D+ line on the board. This is consistent with my boards for the '072R chip (and the discovery and nucleo boards).
The PC detects the pullup on the D+ line. That's what triggers:
Code: Select all
Mar 28 13:22:08 assurancetourix kernel: [2427818.053757] usb 3-6: new full-speed USB device number 64 using xhci_hcd
(my home system tries a few times and gives up, my work system keeps trying).
(I have mis-wired boards by crossing D+ and D-. The symptom then is that it reports a "new low-speed USB device" when you expected a "full-speed" device.).
stm32_usb.h has a nice definition of struct stm32_usb_t. But when I do:
Code: Select all
(gdb) print (struct stm32_usb_t *) (0x40005c000)
I get:
Is there a way I can make GDB learn this structure? It makes debugging this a lot easier.
Edit: Would it help to enable the USB module?
is the only reference (in a c-file) to rccEnableUSB... (and indeed the bit is off in the RCC).
Update: I was looking at the wrong bit. Sorry. Off-by-one. Even though I can't find the code that enables the USB module, it seems enabled.
Update2: the rccEnableUSB enables it, just not hte LP version (whatever that is) when given the "FALSE" argument.
Update3: Why does the manual have "USART4RST" sandwitched between IOPEEN and IOPCEN in the RCC register map? Confusing! The bit is called "IPDEN".