当前位置:网站首页>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.
边栏推荐
猜你喜欢

sqlserver怎么查询一张表中同人员的交叉日期

Prime Ring Problem(素数环问题)

Redis middleware (from building to refuse pit)

rpm和yum

The soul asks: How does MySQL solve phantom reads?

Detailed explanation of JVM runtime data area and JMM memory model

招聘随想2022

【数据集】各类绝缘子、鸟巢及防震锤数据集汇总

HoloView -- Tabular Datasets

Shell: Conditional test action
随机推荐
安装GBase 8c数据库的时候,报错显示“Resource,如何解决?
用OpenCV的边缘检测
How to query database configuration parameters in GBase 8c, such as datestyle
【应用推荐】常见资源管理器整理,含个人使用体验和产品选型推荐
Ogg synchronizes oracle to mysql, there may be characters that need to be escaped in the field, how to configure escape?
[Software Architecture Mode] The difference between MVVM mode and MVC mode
SkiaSharp 之 WPF 自绘 五环弹动球(案例版)
Introduction and application of pointers
笔记。。。。
灵魂发问:MySQL是如何解决幻读的?
shell脚本------条件测试 if语句和case分支语句
The use of scrapy crawler framework
sqlserver怎么查询一张表中同人员的交叉日期
InputStream转成String
Redis中间件(从搭建到弃坑)
Node's traditional and advanced practices for formatting time (moment)
从零开始Blazor Server(4)--登录系统
[Dataset] Dataset summary of various insulators, bird's nests and anti-vibration hammers
18张图,直观理解神经网络、流形和拓扑
Prime Ring Problem