STM32 + stmcubemx + freertos 低功耗异常问题

STM32 + stmcubemx + freertos 低功耗异常问题

最近开发一款产品出现以下问题, stmL151低功耗芯片,进入低功耗退出后一段时间出现系统异常,进入vListInsert->
for( pxIterator = ( ListItem_t * ) &( pxList->xListEnd ); pxIterator->pxNext->xItemValue <= xValueOfInsertion; pxIterator = pxIterator->pxNext ) /*lint !e826 !e740 The mini list structure is used as the list end to save RAM.  This is checked and valid. */

现象:到此死循环。

系统提示信息

  1. Stack overflow -
    see http://www.freertos.org/Stacks-and-stack-overflow-checking.html
    2) Incorrect interrupt priority assignment, especially on Cortex-M
    parts where numerically high priority values denote low actual
    interrupt priorities, which can seem counter intuitive. See
    http://www.freertos.org/RTOS-Cortex-M3-M4.html and the definition
    of configMAX_SYSCALL_INTERRUPT_PRIORITY on
    http://www.freertos.org/a00110.html
    3) Calling an API function from within a critical section or when
    the scheduler is suspended, or calling an API function that does
    not end in “FromISR” from an interrupt.
    4) Using a queue or semaphore before it has been initialised or
    before the scheduler has been started (are interrupts firing
    before vTaskStartScheduler() has been called?).

经过很长一段时间的问题定位,排除栈溢出等问题,最后解决, 问题根因:
SystemClock_Config();
SystemClock_Config->HAL_RCC_ClockConfig->HAL_InitTick->HAL_NVIC_SetPriority
uint32_t uwTickPrio = (1UL << __NVIC_PRIO_BITS); /* Invalid priority */
系统配置时钟接口配置时钟的分频系数的同时复位了systick定时器的优先级,从而导致了系统调度出现异常。
总结:
1、当发现所有的怀疑都排除后,问题依旧没有找到根因时,可以考虑了排查下你所依据的是否真正无问题。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

魏振东991

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值