The problem occurred when debugging EEPROM operation on stm8s003. I captured IIC communication data from the logic analyzer and saw that both reading and writing were normal. Under normal circumstances, a successful operation would directly return 0x00; but this time it always returned 0x37. Single-step tracing showed that the return was indeed 0, but after assigning the return value to a variable, it became 0x37. This driver has been used before without any problems, but I don't know why it's broken this time.
The IIC driver is in an independent C file, and the call is in another file, which is referenced through the extern declaration in the header file. After cross-comparison with the previous program, it was found that the function declaration in IIC.h was commented out, which is equivalent to calling it directly without declaration. Finally, after removing the comment, it returned to normal.
Previous article:The problem of inaccurate time when using the STM8S timer for the first time
Next article:The same STM8 project generates inconsistent HEX checksums after changing the directory location
- 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
- The BLE mobile app required for RSL10 BLE development is not easy to install through Google Play, APK file downloads are collected
- LSM6DSL reads data from STM32L4R5 interrupt method
- MSP430F5529 serial port clock and SPI clock configuration issues
- [Evaluation of SGP40] + UART communication + use of at32f407 development board
- There is a prompt when checking the pads database. What is the reason?
- Solid-state devices versus vacuum tubes: Will the two coexist for a long time?
- [Atria AT32WB415 Review] 5. Bluetooth Low Energy Version (BLE) Official Demo Review
- Technical parameters of automotive sensors
- This amplifier is a bit figurative, isn't it?
- LPC1114 temperature sensor DS18B20 program