Skip to main content
Muzahir Hussain
Associate III
Feb 22, 2018 5:52 PM UTC
Solved

Address of APB1ENR and APB2ENR

Posted on February 22, 2018 at 18:52

What is the register address of APB1ENR and APB2ENR?

Where can I find it in Nucleo STM32F103RB Reference Manual?

#apb1periphclock #apb2 #stm32f103xx
This topic has been closed for replies.
Tesla DeLorean
Tesla DeLoreanBest answer
Guru
Feb 23, 2018 9:18 PM UTC
Posted on February 23, 2018 at 21:18

Page 49, RCC address basis 0x40021000

Page 147, APB1ENR address 0x1C

Address of APB1ENR = 0x4002101C

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..

8 replies

Muzahir Hussain
Associate III
Feb 23, 2018 8:01 PM UTC
Posted on February 23, 2018 at 20:01

Thanks... I've this same reference manual, and I was unable to find the addresses in there. Can you point out the page number or something?

henry.dick
Associate II
Feb 23, 2018 8:14 PM UTC
Posted on February 23, 2018 at 20:14

1. go to the datasheet and find the base address for rcc;

2. go to the reference manual and find the offset for your respective registers in rcc.

alternatively: go the device header file and find where apb base address is and go from there.

you will end up at the same place.

Tesla DeLorean
Guru
Feb 22, 2018 7:13 PM UTC
Posted on February 22, 2018 at 20:13

printf('%08X\n', &RCC->APB1ENR);

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Muzahir Hussain
Associate III
Feb 23, 2018 7:58 PM UTC
Posted on February 23, 2018 at 19:58

No printf... I am not using any library.

henry.dick
Associate II
Feb 23, 2018 8:14 PM UTC
Posted on February 23, 2018 at 20:14

assign it to a variable and inspect that variable's value.