STM8 simulation shows swim error [30004]: comm timeout:
Understanding the problem:
IO multiplexing for option byte write operation. The option byte includes the configuration of the chip hardware characteristics and the protection information of the memory. These bytes are stored in a dedicated block in the memory. In addition to the ROP (read-out protection) byte, each option byte must be saved twice, one in the usual format (OPTx) and one for backup complementary format (NOPTx). The option byte can be modified by the application in IAP mode, but the ROP option can only be modified in ICP mode (through SWIM). For the content of the SWIM programming process, please refer to the corresponding chip manual of STM8S.
The option bytes of different chips are different in size. For details, please refer to the chip data sheet. For example, using STM8S003F3, the option bytes are as follows:
STM8S003F redefines the multiplexing function bits for 20-pin package products:
The Chinese content of the above picture is as follows:
From this, we can know that: in this program, PC3 and PC6 are complementary PWM, PC4 and PC7 are complementary PWM, all of which are complementary PWM with dead time control, PC3 is the multiplexing function TIM1_CH1N, PC4 is the multiplexing function TIM1_CH2N, PC6 is the multiplexing function TIM1_CH1, and PC7 is the multiplexing function TIM1_CH2. Therefore, it is necessary to turn on the remapping option of the multiplexing function of AFR7 and AFR0.
The IAR compiler settings are as follows:
Previous article:Introduction to Stm8 bootloader
Next article:IAR for stm8 burns configuration operations through ST-link
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
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
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- 【RT-Thread Reading Notes】Reading Notes for Chapters 1~4
- Use MOS tube or triode?
- Award-winning live broadcast | Power supply, motor, electronic control, new energy vehicle power design technology is coming
- On the road to 5G, is GaN technology really important?
- I called Knowles today and it was hilarious.
- Is there any sensor that can detect whether there is someone in front through the tinted glass?
- [2022 Digi-Key Innovation Design Competition] 1. STM32F7508-DK Unboxing
- Some predictions about the national competition questions - about power supply questions
- RFID low frequency and high frequency antenna technology
- First look at Texas Instruments' C2000 series