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
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
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- [STM32WB55 Review] 3# STM32WB development board boot sequence and radio module
- First unpacking test
- Output adjustable solution
- bq769x0, recharging problem after undervoltage
- TMS320F28379D User Experience SCI
- Respeaker Mic array Far-field microphone array AI intelligent voice recognition module
- What should I do if there are multiple initialization and redefinition errors? Please give me some advice
- The difference between electrolytic capacitors and ordinary ceramic capacitors of the same capacity
- The microcontroller gadgets I collected before are very convenient!!!
- Future Transformer Development Trend-Planar Transformer