NXP KL03--7.相同程序JLINK运行与FLASH直接运行,结果不一致
【摘要】
KL03 1个问题
1.相同程序JLINK运行与FLASH直接运行,结果不一致,程序是在vlps低功耗模式与正常工作模式之间切换
JLINK运行,打印信息无乱码,RF无丢包FLASH运行,打印信息乱码...
KL03 1个问题
1.相同程序JLINK运行与FLASH直接运行,结果不一致,程序是在vlps低功耗模式与正常工作模式之间切换
JLINK运行,打印信息无乱码,RF无丢包 | FLASH运行,打印信息乱码(查看hex ,乱码HEX全是0x0),并且导致RF丢包严重 |
---|---|
dwCounter=0x68
aSendData counter little noeffect
event timeout tick=30072
enter_vlps start...
enter_vlps timer int
lptmr0_timeout =30573
enter_vlps exit as rf dio3
event restart tick=30627
rf data len=24
event restart tick=30649
aSendData V2 des ok
dwCounter=0x69
aSendData counter noeffect 2
event timeout tick=31149
enter_vlps start...
enter_vlps timer int
lptmr0_timeout =31651
enter_vlps exit as rf dio3
event restart tick=31705
rf data len=24
event restart tick=31727
aSendData V2 des ok
dwCounter=0x6a
aSendData counter noeffect 2
event timeout tick=32227
enter_vlps start...
enter_vlps timer int
lptmr0_timeout =32728
event timeout tick=123882
enter_vlps start...C嫊蓕俦镣亖靴禃蓙ス?5)绷训闪}靴禃秸褋跖赏迳?)
enter_vlps exit as rf dio0
event restart tick=123984
event restart tick=123985
Buf_Type2_Flag=1
aSendData V2 des ok
dwCounter=0xb3
aSendData counter little noeffect
event timeout tick=124485
enter_vlps start...C嫊蓕俦镣亖靴禃蓙ス?5)绷训闪}靴禃秸褋跖裳胀?)肖T寡暽}俦镣仌幞褋呁伾檨懃搅5)曎暪褋蓵脱吷褋佈派颜彷)5)曎暪褋蓵脱吷褋佈派颜後)5)櫏櫧伖絹憛褏5)?event timeout tick=125088
enter_vlps start...C嫊蓕俦镣亖靴禃蓙ス?5)绷训闪}靴禃秸褋跖烧磐?)肖T寡暽}俦镣仌幞褋呁伾檨懃酵5)曎暪褋蓵脱吷褋佈派张辶)5)?event restart tick=126121
rf data len=24
event restart tick=126587
aSendData V2 des ok
dwCounter=0xb7
aSendData counter noeffect 2
event timeout tick=127087
enter_vlps start...C嫊蓕俦镣亖靴禃蓙ス?5)绷训闪}靴禃秸褋跖奢磐?)C嫊蓕俦镣仌幞褋呁伾檨懃搅5)曎暪褋蓵脱吷褋佈派菖徨)5)曎暪褋蓵脱吷褋佈派菖辶)5)櫏櫧伖絹憛褏5)?event timeout tick=127690
enter_vlps start...C嫊蓕俦镣亖靴禃蓙ス?5)绷训闪}靴禃秸褋跖奢萃?)
解决方法: 进入 VLPS低功耗语句 使用 __wfi(); 替换。
进入 VLPS低功耗语句使用 __wfi(); 替换。 UART乱码问题没有,RF数据丢失暂时没有发现,这个替换,实际上并未进入低功耗吧?
void enter_vlps(void)
{
#if 0
volatile unsigned int dummyread;
/* The PMPROT register may have already been written by init code
If so then this next write is not done since
PMPROT is write once after RESET
allows the MCU to enter the VLPR, VLPW, and VLPS modes.
If AVLP is already writen to 0
Stop is entered instead of VLPS*/
SMC->PMPROT = SMC_PMPROT_AVLP_MASK;
/* Set the STOPM field to 0b010 for VLPS mode */
SMC->PMCTRL &= ~SMC_PMCTRL_STOPM_MASK;
SMC->PMCTRL |= SMC_PMCTRL_STOPM(0x2);
/*wait for write to complete to SMC before stopping core */
dummyread = SMC->PMCTRL;
/* Now execute the stop instruction to go into VLPS */
/* Set the SLEEPDEEP bit to enable deep sleep mode (STOP) */
SCB->SCR |= SCB_SCR_SLEEPDEEP_MASK;
#endif
__wfi();
}
文章来源: blog.csdn.net,作者:悟空胆好小,版权归原作者所有,如需转载,请联系作者。
原文链接:blog.csdn.net/xushx_bigbear/article/details/123783756
【版权声明】本文为华为云社区用户转载文章,如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)