cancel
Showing results for 
Search instead for 
Did you mean: 

List of all peripheral registers

DietWall
Associate III

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

1 ACCEPTED SOLUTION

Accepted Solutions
mƎALLEm
ST Employee

Hello,

Maybe you need to use SVD file..

Look at the attachment.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

View solution in original post

6 REPLIES 6
mƎALLEm
ST Employee

Hello,

Maybe you need to use SVD file..

Look at the attachment.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
Ozone
Principal III

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.

DietWall
Associate III

Oh, this is almost perfect. :)

I think I can use XML as well. If not, I can transform it.

Thank you.

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 :)

Fine with me.
Just wanted to point out, even identically named bits in the same peripheral unit behave differently on different MCUs.

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.