|
|
发表于 2025-12-5 10:58:21
|
显示全部楼层
1、HAL库时间基准和ThreadX时间基准,可以都使用systick
ThreadX的系统时钟节拍和STM32的HAL库时间基准都使用Systick的简单方法
https://forum.anfulai.cn/forum.php?mod=viewthread&tid=99213
2、然后就是Systick优先级问题,这个默认在low level init.s文件里面已经将systick配置为小于15了
@
@ /* Configure handler priorities. */
@
LDR r1, =0x00000000 @ Rsrv, UsgF, BusF, MemM
STR r1, [r0, #0xD18] @ Setup System Handlers 4-7 Priority Registers
LDR r1, =0xFF000000 @ SVCl, Rsrv, Rsrv, Rsrv
STR r1, [r0, #0xD1C] @ Setup System Handlers 8-11 Priority Registers
@ Note: SVC must be lowest priority, which is 0xFF
LDR r1, =0x40FF0000 @ SysT, PnSV, Rsrv, DbgM
STR r1, [r0, #0xD20] @ Setup System Handlers 12-15 Priority Registers
@ Note: PnSV must be lowest priority, which is 0xFF
3、这个可能是你的DWT时钟周期计数器没有正常运行,这个统计是基于DWT时钟周期计数器实现的。
|
|