2026-01-13 12:36 AM
Hi all,
Is there any way to retrieve a list of all peripheral registers Address and Names for a specific MCU?
I would like to have it as a json document,
My Approach right now would be to parse the MCU-Specific Header file in STM32 HAL. I would need to do it for many different MCUs, so I am looking for a possibility to have it done without huge manual effort.
I am wondering if there is any easier way to do this, like extract from SMT32CubeIDE? Or maybe it is somewhere available already?
Best Regards,
Dietrich
Solved! Go to Solution.
2026-01-13 12:41 AM - edited 2026-01-13 12:44 AM
Hello,
Maybe you need to use SVD file..
Look at the attachment.
2026-01-13 12:41 AM - edited 2026-01-13 12:44 AM
2026-01-13 12:55 AM
Besides of the mentioned SVD file, the variant-specific device header (stm32xxx.h) contains definitions for all peripheral registers.
> I would like to have it as a json document, ...
Although I would question the idea behind this endeavour.
While many STM32 variants have seemingly share identical peripheral units and register, actual config or status bit values often differ syntactically and/or semantically.
2026-01-13 2:40 AM
Oh, this is almost perfect. :)
I think I can use XML as well. If not, I can transform it.
Thank you.
2026-01-13 2:42 AM
Well, you can question it. But I don´t think I would answer this right now.
Just say, trust me, I know what I´m doing :)
2026-01-13 3:45 AM
Fine with me.
Just wanted to point out, even identically named bits in the same peripheral unit behave differently on different MCUs.
2026-01-13 4:41 AM
Good to know. I´ll start with a specific one and see where it goes from there.
But I also like to solve problems only once. And have scripts for repetitive tasks.
Ty.