天天看點

8、stm32F103 點亮LED(存儲器映像)

M3核心系列有4G記憶體空間,位址範圍0x0000 0000到0xFFFF FFFF,分成8個塊(Block0~Block7),每塊大小為512M。

8、stm32F103 點亮LED(存儲器映像)
8、stm32F103 點亮LED(存儲器映像)
8、stm32F103 點亮LED(存儲器映像)

總線位址

8、stm32F103 點亮LED(存儲器映像)

其實APB1、APB2和AHB都是在外設位址(0x4000 0000)偏移,分别偏移0x0,0x0001 0000和0x0002 0000。

那麼定義

#define PERIPH_BASE   0x4000 0000
//總線基位址
#define  APB1PERIPH_BASE   PERIPH_BASE
#define  APB2PERIPH_BASE   (PERIPH_BASE+0x00010000)
#define  AHBPERIPH_BASE   (PERIPH_BASE+0x00020000)
           

AHB 取得是

8、stm32F103 點亮LED(存儲器映像)

GPIO位址

8、stm32F103 點亮LED(存儲器映像)
8、stm32F103 點亮LED(存儲器映像)
8、stm32F103 點亮LED(存儲器映像)
8、stm32F103 點亮LED(存儲器映像)
8、stm32F103 點亮LED(存儲器映像)