FSMC (Flexible Static Memory Controller) is a new memory expansion technology used by the STM32 series. It has unique advantages in external memory expansion and can easily expand different types of large-capacity static memories according to system application needs .
After using the FSMC controller, the FSMC_A[25:0] provided by the FSMC can be used as the address line, and the FSMC_D[15:0] provided by the FSMC can be used as the data bus.
(1) When the storage data is set to 8 bits, (FSMC_NANDInitStructure.FSMC_MemoryDataWidth = FSMC_MemoryDataWidth_8b)
Each address bit corresponds to FSMC_A[25:0], and the data bit corresponds to FSMC_D[7:0]
(2) When the storage data is set to 16 bits, (FSMC_NANDInitStructure.FSMC_MemoryDataWidth = FSMC_MemoryDataWidth_16b)
Each address bit corresponds to FSMC_A[24:0], and the data bit corresponds to FSMC_D[15:0]
FSMC consists of 4 modules:
(1) AHB interface (including FSMC configuration register)
(2) NOR flash memory and PSRAM controller (when driving LCD, LCD is like a PSRAM with only two 16-bit storage spaces, one is DATA RAM and the other is CMD RAM)
(3) NAND flash memory and PC card controller
(4) External device interface
Note: FSMC can request AHB to perform data width operations. If the data width of the AHB operation is larger than the width of the external device (NOR or NAND or LCD), FSMC will split the AHB operation into several consecutive smaller data widths to adapt to the data width of the external device.
The FSMC address image for external devices starts from 0x6000 0000 and ends at 0x9FFF FFFF, with a total of 4 address blocks, each of which is 256M bytes. It can be seen that each address block is divided into 4 sub-address blocks, each of which is 64M in size. For the address image of NOR, we can determine which 64M sub-address block is currently being used by selecting HADDR[27:26], as shown in the table on the next page. The chip selects of these four sub-storage blocks are selected using NE[4:1]. The data line/address line/control line are shared.
NE1 ->Bank1 NE2->Bank2 NE3->Bank3 NE4->Bank4
If NE1 is connected, then
Each small block of NOR/PSRAM 64M
The first block: 6000 0000h--63ff ffffh (When the DATA length is 8 bits, it is determined by the address line FSMC_A[25:0]; when the DATA length is 16 bits, it is determined by the address line FSMC_A[24:0])
The second block: 6400 0000h--67ff ffffh
The second block: 6800 0000h--6bff ffffh
The third block: 6c00 0000h--6fff ffffh
Note: HADDR here is the internal AHB address line that needs to be converted to the external device. Each address corresponds to a byte unit. Therefore, if the address width of the external device is 8 bits, HADDR[25:0] corresponds to the STM32 CPU pin FSMC_A[25:0] one-to-one, and a maximum of 64M bytes of space can be accessed. If the address width of the external device is 16 bits, HADDR[25:1] corresponds to the STM32 CPU pin FSMC_A[24:0] one-to-one. When applied, the FSMC_A bus can be connected to the address bus pins of the memory or other peripherals.
Example: STM32F10XX FCMS controls LCD driver
FSMC provides all LCD controller signals:
FSMC_D[16:0]
Previous article:STM32 Learning: Read the unique ID of the chip
Next article:STM32 study notes Ethernet communication + lwip protocol transplantation
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- 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
- Why can't the crystal oscillator be placed on the edge of the PCB? Explain with actual examples!
- Award-winning live broadcast: ADI's technology and product registration for China's energy Internet applications has begun~
- Speechless! There will be a noise bump in the spectrum when there is no signal input at low frequency. Can you experts see what's going on?
- AD ground line width setting
- Is this injury serious?
- EEWORLD University Hall----Start using UCD3138 digital power controller tool
- CircuitPython 5.3.0-rc.0 released
- TI DSP programming - TMS320C6416
- What is the reason for the inductance noise in the peripheral circuit of the lithium battery charging chip?
- CCS Error