当前位置:网站首页>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.
边栏推荐
- ClickHouse入门介绍与其特性
- MTK6225-紧急电话
- Meeting OA (Upcoming Meetings & All Meetings)
- SQL Server database schema and objects related knowledge notes
- 对于小应用来讲,使用哪款数据库比较好?
- How to implement deep copy in js?
- How programmers learn open source projects, this article tells you
- ASP.NET Core 6框架揭秘实例演示[30]:利用路由开发REST API
- BGP综合实验
- 企业微信群:机器人定时提醒功能数据库配置化
猜你喜欢
随机推荐
基于CAP组件实现补偿事务与消息幂等性
redis
世界第4疯狂的科学家,在103岁生日那天去世了
Opencv creates a window - cv.namedWindow()
杨辉三角(c语言实现)
notes....
指针的介绍及应用
用OpenCV的边缘检测
SkiaSharp's WPF self-painted five-ring bouncing ball (case version)
关于#SQL#的问题,如何解决?
改版去不图床 Token 的获取
Prime Ring Problem(素数环问题)
[Interview: Concurrency 39: Multithreading: Thread Pool] ThreadPoolExecutor Class - Submit, Stop
Leicester Weekly 304 6135. The longest ring in the picture Inward base ring tree
MySQL query advanced - from the use of functions to table joins, do you remember?
URL.createObjectURL、URL.revokeObjectURL、Uint8Array、Blob使用详解
朴素贝叶斯--学习笔记--基本原理及代码实现
量化日常工作指标
Yang Hui Triangle (C language implementation)
Idea common plugins