STM32F1x series memory structure

Publisher:梦幻微笑Latest update time:2018-10-10 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The Crotex_M3 core memory used by STM32 uses Harvard structure. The program memory, data memory, registers, and peripherals are all allocated in the linear space of 4G_bytes (32bits bus width), but not all spaces are valid.
The memory uses little-endian mode. Definition of

little-endian mode and big-endian mode
:
a) Little-Endian means that the low-order bytes are arranged at the low address end of the memory, and the high-order bytes are arranged at the high address end of the memory.
b) Big-Endian means that the high-order bytes are arranged at the low-address end of the memory, and the low-order bytes are arranged at the high-address end of the memory.

32-bit data 0x12345678 is stored starting from address 0x20000000. The storage difference between little-endian and big-endian is shown in the figure below. Little-
endian mode Big-endian mode SRAM The starting address of SRAM starts at address 0x2000 0000, and can be accessed by word (32-bits), half-word (16-bits), and byte (8-bits) bit-band The SRAM and peripheral registers of STM32 cannot be accessed by bit, but STM32 maps two areas called bit-band to all SRAM and peripheral registers. The word write in this area corresponds to the bit write of SRAM. Area mapping algorithm bit_word_addr = bit_band_base + (byte_offset x 32) + (bit_number × 4) bit_band_base is the starting address of the bit-band. The bit-band has two areas 0x2200 0000 and 0x4200 0000, which correspond to SRAM and peripherals respectively . byte_offset SRAM corresponds to the offset address of the starting location 0x20000000. bit_number is the bit number to be accessed . For example, if you need to access memory bit-2 of 0x2000 0300, the formula should be 0x22006008 = 0x22000000 + (0x300*32) + (2*4). Flash The read and write interface (FLITF) of the flash includes read expectation cache, option bytes, Flash write/erase, and read/write protection. Read: Reading flash requires programming wait counts. Different SYSCLK wait counts have different instruction expectations. This function automatically starts half a cycle after the system is reset   to save power. Writing and erasing flash can only write half a word. To perform erase and write operations, the internal RC oscillator (HSI) must be turned on. The flash erase operation can perform page and full flash erase . The pages of STM32 are divided into 1kbyte or 2Kbyte. Boot STM32 provides 3 different boot modes . Main Flash memory: The program starts running from 0x80000000 System memory; start ISP mode Embedded SRAM: Run from SRAM from now on
STM32F1x series memory structure
STM32F1x series memory structure










STM32F1x series memory structure








STM32F1x series memory structure










STM32F1x series memory structure



Reference address:STM32F1x series memory structure

Previous article:stm32 nRF24L01 wireless module (1): SPI2 to SPI1 migration
Next article:How to see the program occupying STM32 flash and SRAM from the Keil compilation result

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号