March 8, 2025

STM32F429 Discovery Kit - Interrupts

These are all described in chapter 12 of the TRM, which has a handy table, just as you might wish for.
67 - USB FS OTG (just as the F411)
77 = USB HS OTG (what we need)
74 = HS OTG OUT endpoint 1
75 = HS OTG IN endpoint 1
76 = HS OTG wakeup
42 = FS OTG wakeup
Notice the interesting pair of interrupts for endpoint 1 on the HS interface.

I need to add code to Hydra for vector 77, beginning in locore_411.s I do all this, but still get no action when I plug in a cable.

I do get a suspend interrupt from the FS controller.

I'll bet I need to do some stuff in rcc_411.c to turn on clocks and reset. Chapter 6 in the TRM covers the RCC. I do this, but still don't get any action.

So now we start wondering if interrupts work at all. I have code to use the systick timer from years back. I uncomment the call to systick_test() and it works fine. The systick does not require any help from the nvic, so we should next see if we can make something generate an interrupt that gets routed through the NVIC.

Interrupts do work with hydra and the F429. I write a short serial test, using the already existing "hookup" routine and get an interrupt for every character I type.

Now I begin wondering about electrical issues with the way the Discovery board wires up the USB port. I also have STM32F405 and F407 chips on Olimex boards. They may have the USB HS port set up in a simpler way.

Update: March 10, 2025

While working on something else (the GPIO pin setup for the E407 Olimex board) I discovered an error I made doig the pin setup for HS OTG on the H429 discovery board. I fixed this, and naturally I wanted to test it.

I get something more now, but not all I wish for. I don't see any notice of interrupts from Hydra. What I do see now is activity in the linux logs when I plug in a cable from the OTG port:

Mar 10 16:50:44 trona kernel: usb 2-1.1: new full-speed USB device number 91 using ehci-pci
Mar 10 16:50:44 trona kernel: usb 2-1.1: device descriptor read/64, error -32
Mar 10 16:50:44 trona kernel: usb 2-1.1: device descriptor read/64, error -32
Mar 10 16:50:45 trona kernel: usb 2-1.1: new full-speed USB device number 92 using ehci-pci
Mar 10 16:50:45 trona kernel: usb 2-1.1: device descriptor read/64, error -32
Mar 10 16:50:45 trona kernel: usb 2-1.1: device descriptor read/64, error -32
Mar 10 16:50:45 trona kernel: usb 2-1-port1: attempt power cycle
Mar 10 16:50:45 trona kernel: usb 2-1.1: new full-speed USB device number 93 using ehci-pci
Mar 10 16:50:46 trona kernel: usb 2-1.1: device not accepting address 93, error -32
Mar 10 16:50:46 trona kernel: usb 2-1.1: new full-speed USB device number 94 using ehci-pci
Mar 10 16:50:46 trona kernel: usb 2-1.1: device not accepting address 94, error -32
Mar 10 16:50:46 trona kernel: usb 2-1-port1: unable to enumerate USB device
So linux recognizes a new device has shown up on the bus, attempts enumeration, but gets nowhere with it. My guess now is that I need to properly set up the USB clock.
Feedback? Questions? Drop me a line!

Tom's Computer Info / tom@mmto.org