AliOS-Things icon indicating copy to clipboard operation
AliOS-Things copied to clipboard

developerkit board power management function is unstable

Open kentzh opened this issue 7 years ago • 1 comments

Ubuntu主机,Rel_2.1.0版本下:

  1. 用blink例程进行测试,在频繁按下按键对灯进行控制时,设备偶尔而卡死
  2. 同样例程,如果再把CLI打开,设备将直接卡死无法启动,调试口也无任何输出

--------------------以下粗略调试仅供参考-------------------------

  1. 经过简单调试,发现卡在时钟恢复函数中,原因似乎是在进入STOP时,有待处理中断,这时MCU会忽略WFI,但后面还是会执行时钟恢复函数SystemClock_Config(),该函数中判断PLL状态时,发现已经使能,从而导致进入Error_handler
  2. 目前串口默认使用的是DMA传输方式,依据芯片手册,STOP前需要关掉DMA,醒来后再打开,这个操作串口驱动中目前似乎没有实现,请确认

kentzh avatar Mar 28 '19 23:03 kentzh

使用RTC wakeup timer作为Tickless timer存在问题:外部中断会导致tick无法计数。

改用LPTIM1作为Tickless timer,patch见附件: tickless_lptimer_developerkit.zip

kentzh avatar Apr 02 '19 05:04 kentzh