cancel
Showing results for 
Search instead for 
Did you mean: 

Register Level programming questions

SHobb.1
Associate II

I am just starting out with STM32 MCUs. Because I like pain, I am trying to do register level programming to make sure I really understand what the code is doing (rather than using automagically generated code). My environment is Visual Studio with VisualGDB, compiling with the ARM toolchain (I think? Not sure how to confirm that).

Current hardware is a NUCLEO-F103RB (hopefully soon switching to a NUCLEO-G071RB).

The purpose of this thread is to ask [potentially dumb] questions that arise. I hope some people with more experience than me can weigh in and point me in the right direction.

First question:

I am trying to write the SystemInit function to configure my clock tree. Because my board has an STM32F103RB, I am referring to RM0008 (rev 21). In particular, Chapter 8 (starting on p. 123). There appear to be two registers documented in RM0008 that are NOT in sthm32f103xb.h from CMSIS: RCC_AHBSTR and RCC_CFGR2. Is that because those two registers aren't present in the STM32F103RB (the RM is shared across several devices)? Looking at the clock tree diagram on p. 20 of the STM32F103xB data sheet, it is slightly different from the clock tree on p. 126 of RM0008 --> in particular, PLL2 and PLL3 are not present. If this is the case, it would make the RMs a lot more readable if there was some flag indicating a particular register is only present in certain devices covered by the RM.

20 REPLIES 20

Thaks, Imen.

Jan

@Imen DAHMEN​