May 3, 2025

STM32H743 Nucleo board -- Blink demo - dumb mistake

The good new is -- it works now!

I went on a bike ride and prayed that God would help me discover what was wrong -- and he did!

I was speculating that this had something to do with power control, but I was entirely wrong. It was just an all too common "cut and paste" error.

When I wrote to the RCC register to enable clocks to GPIO A, B, and C I coded up the following instruction.

    *en |= (GPIOA_ENABLE|GPIOA_ENABLE|GPIOA_ENABLE);
But what I really wanted (and needed) was this:
    *en |= (GPIOA_ENABLE|GPIOB_ENABLE|GPIOC_ENABLE);
This is just the kind of thing you can look at over and over and not see what is wrong. Rather than type in this fairly long and redundant line, I just made 3 copies, spliced them together, and intended to change the letters to B and C.

Not much else to say. Time to move on to another demo and see how hard it is to get the serial port working. After that:

Conclusions

The blink is very fast. The CPU is probably running on the HSI clock and probably at 48 Mhz.

The RCC is very different for the H743, but the GPIO is exactly the same as the F411, and the address layout is compatible with the F411 linker file.

Next steps

When it comes time to work with the caches, it will be interesting to have some kind of benchmark to measure performance.
Feedback? Questions? Drop me a line!

Tom's Computer Info / tom@mmto.org