In C51, the alarm when interrupt and non-interrupt functions call the same function is RECURSIVE CALL TO FUNCTION.
The standard C language dynamically generates local variable space in the stack, so it can be recursive.
The 51 single-chip microcomputer is too weak. In order to improve operating efficiency, C51 uses the method of static allocation of local variables, so recursion is not possible.
If a function called by an interrupt and non-interrupt function runs in a non-interrupt state, after an interrupt occurs, the local variables will be destroyed, and it will be completely wrong to execute it again after the interrupt ends. This is the same principle as the non-recursive principle, so Keil also lists it as RECURSIVE CALL TO FUNCTION.
Solution: Add the reentrant modifier to this public function to make it reentrant.
Previous article:51 MCU commonly used special function registers
Next article:DS18B20 temperature format conversion
- Popular Resources
- Popular amplifiers
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
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- 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
- Excuse me, what is this component with silk screen 6023?
- [NXP Live Review] LPC55S69: General-purpose secure low-power MCU with ARM Cortex-M33 core (including video, PPT, QA)
- Onboard JLink cannot be used
- Analysis of the working principles of seven types of three-pole emitter DC circuits (updated)
- Design and implementation of FIR filter in DSP
- Some Allegro practical skills that PCB Layout engineers regret not knowing earlier
- (Newbie) WindRiver workbench cannot connect to vxsim
- After uninstalling the original KEIL 518 version and reinstalling the latest version of KEIL, the chip icon turns gray
- [Silicon Labs Development Kit Review] + Serial port printing six-axis inertial sensor ICM-20648 data
- Modern motor design could improve portable vacuum cleaners