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
Recommended ReadingLatest update time:2024-11-15 07:25
- Popular Resources
- Popular amplifiers
- IAR fully supports the new industrial-grade PX5 real-time operating system
- Foundations of ARM64 Linux Debugging, Disassembling, and Reversing Analyze Code, Understand Stack Me
- ARM Cortex-M4+Wi-Fi MCU Application Guide (Embedded Technology and Application Series) (Guo Shujun)
- zephyr dev summit pres_debugging_irnas_memfault
- 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
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- [MPS Mall Big Offer Experience Season] Unboxing
- MSP430F5529 IO port pin interrupt study notes
- Circuit-level electrostatic protection design techniques and ESD protection methods
- [ESK32-360 Review] +TFT screen display function and expansion (3)
- Can the 7805 and 1117-5 power supplies be used within ±0.05?
- CC3200 Kit OURS-SDK-WFB_Exploration 4——FreeRTOS Run
- The microcontroller outputs PWM wave to control the load supply voltage 0-12V adjustable
- 【Insights】If you don’t plant flowers in your heart, weeds will grow
- [ESP32-Korvo Review] 1: ESP32-Korvo Audio Development Board Hardware Circuit Connection
- I would like to ask which manufacturers produce unipolar TMR tunneling effect switches. I only found MDT, and Magne does not have unipolar ones.