Preface
Today's summary of "STM32F103 https://yunpan.cn/cSq3WajiZIcx8 Access password 30c0
External SRAM as running memory:
https://yunpan.cn/cSq3n5iBTHuDc Access password: 4102
The information of STM32F10x can be downloaded from my 360 cloud disk:
https://yunpan.cn/crBUdUGdYKam2Access password ca90
Content explanation
Project Overview: The routine defines a global BUF and a local BUF. By assigning values to the two BUFs and then printing the values and their corresponding addresses, the address of the running memory can be detected.
The projects provided are based on the principle of simplicity, with detailed Chinese annotations to facilitate yourself and everyone.
Regarding "STM32F103 external SRAM as running memory", I will describe the important points below:
1. Configure the startup file
We use the official standard library, copy the "startup_stm32f10x_hd.s" file in the FSMC routine of the standard library (the project uses 103ZE, if you use an interconnected chip, copy the corresponding file), and replace the startup file of our previous project, as shown below:
2. Configure FSMC
We use the ready-made function interface (using register configuration) in the "system_stm32f10x.c" file in the official standard library to configure FSMC. We only need to open the macro "DATA_IN_ExtSRAM" on line 122 in the "system_stm32f10x.c" file, as shown in the figure below:
3. Allocating RAM
The allocation of RAM addresses is done by the compiler, so the project needs to be configured accordingly, that is, to use external RAM, as shown below:
This function is located below the main.c file;
This function is mainly used to test the above configuration and rectification project. Define a global variable and a local variable, and print their addresses through the serial port to determine whether the running memory is external or internal.
5. Print (test) results
After looking at the test function, we know what the data printed out in sequence is. Here we can clearly see that the printed address is 0x6800xxxx . The 0x6800xxxx address data here is the external SRAM address (if you don’t understand, please see yesterday’s explanation), indicating that the running memory is indeed external SRAM.
5. Today’s Focus
A. In actual development, please try to use the ready-made function interface (using register configuration) in the "system_stm32f10x.c" file in the official standard library to configure FSMC, which is more efficient. Or, if you like the code style configured by STM32CubeMX , you can use either one. The use of STM32CubeMX is actually very simple, and there are some tutorials on the Internet. I will add an article about STM32CubeMX later.
illustrate
The software project provided today is based on the STM32F103 large-capacity chip. Medium- and small-capacity chips do not have the FSMC function and naturally cannot be used. In fact, as long as some configurations of the project are appropriately modified, all STM32F1 chips with FSCM function are applicable.
Previous article:STM32F1_FSMC reads and writes external SRAM
Next article:STM32F1_External NorFlash storage program code
- Popular Resources
- Popular amplifiers
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- Read the white paper on Renesas Electronics' power module series and win double gifts: energy boost gift & 100% recommendation gift!
- Understanding common mode and differential mode
- 【McQueen Trial】Unboxing and microbit
- Use MicroPython to program quickly and efficiently
- A quick memory method for instructions of the MCS-51 series of single-chip microcomputers
- STM32f767zi UART
- [Synopsys IP Resources] Complete Die-to-Die IP Solution: Use Cases and Requirements
- C51 Voice Time System
- How to achieve low power consumption of TI MSP430 microcontroller?
- Sub-library: Summary of other official Chinese technical documents