Hi everyone,

I’ve been experimenting with bare-metal programming on my STM32H-series MCU and wrote a simple C program to blink the on-board LEDs without using HAL or any libraries. It was a good exercise to understand how peripheral registers actually work under the hood.

Here’s what I’ve done so far

Enabled the RCC clock for GPIO ports B, C, and E

Configured GPIOB pins 14 and 0, and GPIOE pin 1 as outputs

Set the output type to push-pull

Defined the output speed directly through register access

I’m now looking to take this a step further. how can I optimize the code or make it more bare-metal in terms of structure and efficiency? Id love to hear how others handle low-level register operations or organize code in professional embedded projects.

Any pointers or examples…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help