2008-09-24 08:57 AM
STM32 headers
2011-05-17 03:24 AM
Hi.
I've recently started using an STM32 with the ST firmware library. While the library is certainly very useful, I would like to have the option of accessing registers directly, without having to go through these functions. However, the library headers do not contain full defintions of register bits, etc, and having contacted both ST and Keil, I'm told that they do not provide headers that contain this information. Having used a number of different processor types before, I've never come across one whose tools do not include a set of full register definition headers. So my question is: do such headers exist, and are they freely available? Thanks, Steve.2011-05-17 03:24 AM
hi,
in case you didn't notice, all registers are defined in stm32f10x_map.h. (but not the bits. some of the bits are defined in the implementation (.c) files.) [ This message was edited by: lanchon on 23-02-2008 07:06 ]2011-05-17 03:24 AM
Yes, the bits are indeed defined in the .c files. This means that in order to use bit masks, the user has to either copy them into a header, or define their own. Either way, the headers aren't complete!
This is why I was wondering if anyone had produced a set of headers which does contain all the registers and all the bit definitions.2011-05-17 03:24 AM
100% agree!
Using the ST Firmware Library is blowing up code and slowing down speed. Who will help us building a new header library only with address and bit definitions. Erwin Reuss Coming soon: German discussion forum for STM32 on [ This message was edited by: er on 26-02-2008 00:20 ]2011-05-17 03:24 AM
why don't you guys contact support and see if ST has a machine readable description of the registers that they can give to you? the ideal case would be XML data describing the registers, maybe with the descriptions form the ref manual embedded in the data. it could be automatically translated into different headers using different methods (bit band or mask, macros or constant pointers or C++ references, etc), and using your choice of naming convention. :)
do you think ST generates the ''tables'' describing the registers in the ref manual from a machine readable representation? I definitely do.2011-05-17 03:24 AM
Lanchon:
I contacted ST, and they said that they don't have any publicly-available headers like this, but they'd have a look for me. I also contacted Keil, who said that they have only what ST provide them with! Regarding machine-readable definitions: that's certainly an interesting idea! I would hope that if ST do have the data in that form, they could extract the data for us. It also makes me wonder: what did ST use for headers before they wrote the library...? Erwin: Good to know I'm not the only one! I've started writing my own definitions for the registers I'm using. Perhaps once I've made some progress - and if my employers don't mind - I will make it public, and other people can fill in the gaps? Steve.2011-05-17 03:24 AM
Quote:
Erwin: Good to know I'm not the only one! I've started writing my own definitions for the registers I'm using. Perhaps once I've made some progress - and if my employers don't mind - I will make it public, and other people can fill in the gaps? Steve. Hi Steve, i think we are on the same way. I also built my own header file with only the few registers i am using. I've startet with STM32 only 2 weeks ago, so there are only a few registers in my header file but it will be more and more. Greetings from germany, Erwin2011-05-17 03:24 AM
I may have misunderstood but Raisonance provide a machine readable file.
Visit;- In right had column near top locate and click CDROM link ;- 2007/11/09 -The new CD-ROM image is available.Download the CDROM. Install it. You will find a machine readable file on your disk here;- C:\Program Files\Raisonance\Ride\Sim\ARM\STM32F103RBT6.simOn my copy the ARM core (NVIC etc) are missing but the peripherals are there. [ This message was edited by: bobz on 26-02-2008 11:14 ]2011-05-17 03:24 AM
bobz:
this hint (C:\Program Files\Raisonance\Ride\Sim\ARM\STM32F103RBT6.sim) is quite useful. But this file does not include all registers: e.g. TIM1_BDTR is missing! Best regards