Technology dependencies: SWIM communication, FLASH operation, serial port, DMA.
The main idea is to implement the command line tool through the serial port, and then burn the slave through the host's swim. The serial port data is sent through DMA.
SWIM communication has been introduced before, you can check it out if you need it. This article mainly introduces the idea of SWIM when programming STM8.
1. Burn directly through WOTF.
This method is indeed feasible, but after actual testing, it was found that the failure rate of WOTF during the programming process caused the programming speed to be extremely slow. It is not recommended.
2. Let the slave burn the flash by itself
We know that when burning flash, there is block burning. And the block burning program is running in RAM. We can use this feature to download the written flash block burning program (specify the address of the data to be burned and the address to be burned) to the specified address of the slave RAM through SWIM. Then control the slave through the host to complete the self-burning.
In this process, we need to transfer the data transmitted from the serial port to the specified address in the slave's RAM, and transfer the address to the specified address in the slave's RAM. We complete the "self-burning" by controlling the slave's CPU to run the code burned into the RAM in advance.
Note:
The code we need to burn cannot be written in one block, so after burning a block, we need to pause the slave (by controlling the slave CPU), reset the slave during the next burning, and then execute the code to burn FLASH.
Previous article:IAR has SWIM error [30004]
Next article:Jlink cannot perform OptionByte operation on STM05x (CM0)
- 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
- EEWORLD University Hall ---- Machine Learning Bell Labs Huang Dawei
- [Anxinke NB-IoT Development Board EC-01F-Kit] Part 1: Getting to know EC-01F-Kit
- [Jihai APM32E103VET6S development board] Evaluation 3, TFT LCD
- OV7670 simple driver for MSP430F5438A
- Looking back at 2018 and looking forward to 2019
- [Sipeed LicheeRV 86 Panel Review] 2. Firmware Burning, Linux System Test
- I2C Logic Selection Guide
- How-to video | Achieve seamless interoperability in your next IoT design
- MATLAB simulation model for online parameter identification of permanent magnet synchronous motor based on RLS least squares method
- Research on constant false alarm rate control technology of laser radar based on FPGA (1)