当前位置:网站首页>STM32 personal notes - program run and fly
STM32 personal notes - program run and fly
2022-08-01 09:48:00 【Couvrir wild beast】
Part of the notes are from the public account of "STM32 Embedded Development".
Program running score
Number out of bounds/overflow
Phenomena: When the microcontroller program runs in a function, it always runs to the end of the function, and when it wants to jump out of the function, the program runs away.
Cause: Array out of range (array overflow).such as
uint8_t ucDataBuff[10]={0};ucDataBuff[10]=0x1;
Solution: When debugging the program, if you find that the program always runs away when the function is executed, in most cases an array out-of-bounds (array overflow) error has occurred. Carefully check whether the array called in the function is out-of-bounds (overflow).)Case.
Interrupt service function is missing
Phenomena: The program always runs away during the running process.
Cause: An interrupt is enabled in the program, but there is no corresponding interrupt service routine, so that after the interrupt occurs, the entry of the interrupt service routine cannot be found, resulting in the program running away.
Solution: Check whether there is an interrupt turned on in the program, but there is no corresponding interrupt service routine.
Watchdog reset
Phenomena: When executing a relatively time-consuming program, the program runs away and always jumps to the reset position.
Reason: The watchdog is used in the program, but the dog is not fed in time, which causes the watchdog to reset and the program jumps directly to the reset position.
Solution: According to the running time of the program, especially the running time of the most time-consuming part of the program must be calculated, and then accurately set the reset time of the watchdog, and feed the dog regularly.Especially if there is an infinite loop, be sure to remember to feed the dog in the infinite loop.
边栏推荐
- WTM:ASP.NET Core快速开发利器!
- Analysis of High Availability Solution Based on MySql, Redis, Mq, ES
- net stop/start mysql80 access denied
- PHP获取时间戳后写数据库的一个问题
- SkiaSharp's WPF self-painted five-ring bouncing ball (case version)
- 使用ESP32驱动QMA7981读取三轴加速度(带例程)
- AC与瘦AP的WLAN组网实验
- C语言小游戏——扫雷
- [Dataset] Dataset summary of various insulators, bird's nests and anti-vibration hammers
- What are the common API security flaws?
猜你喜欢
随机推荐
Ogg synchronizes oracle to mysql, there may be characters that need to be escaped in the field, how to configure escape?
GBase 8c中怎么查询数据库配置参数,例如datestyle
三子棋(C语言实现)
Prime Ring Problem
Redis learning
MacOS下postgresql(pgsql)数据库密码为什么不需要填写或可以乱填写
SkiaSharp 之 WPF 自绘 五环弹动球(案例版)
自定义类型——枚举、联合
18张图,直观理解神经网络、流形和拓扑
Dataset之mpg:mpg数据集的简介、下载、使用方法之详细攻略
leetcode 42. Catch the rain
Redis中间件(从搭建到弃坑)
改版去不图床 Token 的获取
使用ESP32驱动QMA7981读取三轴加速度(带例程)
Redis middleware (from building to refuse pit)
redis
node 格式化时间的传统做法与高级做法(moment)
STM32个人笔记-嵌入式C语言优化
已解决(pip安装库报错)Consider using the-- user option or check the permissions.
Shell:条件测试操作