51 One reason why the MCU program runs away (Mark)

write picture description here
If EA = 1; is added before the TI = 1; statement, the following warning will appear:
* error 65: access violation at C:0x0023 : no 'execute/read' permission

This warning means that the program has run away.

Just put the EA = 1; statement in TI = 1; or somewhere else. The error will disappear after that. The sp value is also normal. See picture for details.

write picture description here

write picture description here

write picture description here
Possible reasons for other programs running away:
https://blog.csdn.net/wacflp/article/details/67637506

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325579915&siteId=291194637