March 10, 2025

Olimex STM32-E407 - first time running my code

We need to do some soldering before we can try anything.

The UART1 serial console is not available via the usual A9 and A10 pins. Olimex decided to use those for some OTG signals. We can get UART1 by making some software changes to route UART1 to PB6 and PB7.

We get PB6 and PB7 on the CON3 connector, and also find the GND we need on CON4. So we find some header pins. We need 8 pins for each and do the soldering.

D0 = PB7 = usart1_rx
D1 = PB6 = usart1_tx
We dig up a CP2104 USB to serial gadget and connect Tx on it to D0 (Rx) and Rx on it to D1 (Tx). Also we connect the ground.

We make the software changes to my Hydra code and then:

make flash
I watch the serial output using picocom and after changing the baud rate to 57600 I see the usual startup announcement:
Rebooted -- initializing
USB init FS core: 50000000
Event - init
FS interrupt
interrupt: suspend
******************************
Up and running mainline code
March 8, 2025
USB test running
We make some change to Hydra/rcc_411.c to indicate the correct bus clock, then we get 115200 as we would like.

What about USB?

I connect a mini-USB cable to USB-OTG1, and when I plug it in, I do get a series of USB interrupts, but enumeration fails. This leads to two conclusions, one good, one bad.

First is that USB interrupts are working just fine.

Second is that something is wrong, probably the required 48 Mhz clock that the USB subsystem needs.

And so ends this exercise.


Feedback? Questions? Drop me a line!

Tom's Computer Info / tom@mmto.org