cpq / bare-metal-programming-guide

A bare metal programming guide (ARM microcontrollers)
MIT License
3.27k stars 284 forks source link

Wrong KB size in Memory and Registers section? #11

Closed M-Kub closed 1 year ago

M-Kub commented 1 year ago

Hiho, and first of all thanks for that nice guide. I started following it and noticed the STM32F429 Datasheet has a different RAM size for the STM32F42xxx boards. It says: "The STM32F42xxx and STM32F43xxx feature 4 Kbytes of backup SRAM (see Section 5.1.2: Battery backup domain) plus 256 Kbytes of system SRAM."

Maybe you just confused it with the section above that says: "The STM32F405xx/07xx and STM32F415xx/17xx feature 4 Kbytes of backup SRAM (see Section 5.1.2: Battery backup domain) plus 192 Kbytes of system SRAM."

Or maybe I just confused something, after all I am still learning and pretty new to this stuff. :)

cpq commented 1 year ago

The RAM of that MCU consists of several blocks. In addition to the 192k, there is a 64k blocks of CCM RAM. The complete memory map should look like this:

MEMORY
{
FLASH (rx)      : ORIGIN = 0x8000000, LENGTH = 2048K
RAM (xrw)      : ORIGIN = 0x20000000, LENGTH = 192K
CCMRAM (rw)      : ORIGIN = 0x10000000, LENGTH = 64K
}

However, for the same of simplicity, we just ignore that 64k CCM RAM.