亲爱的对话框,
I try to reduce the power of my system,when the phone connect to the dialog14580,i didn‘t call periph_init() until data transfer ble -> uart, I call user_wakeup_hold_set() and start data transfer, after a time, the timer callback will call to restore_sleep_mode, here the problem coming when device go to sleep, system crash !!
void user_wakeup_hold_set(void)
{
if(wakeup_hold_timer_used == 0)
{
wakeup_hold_timer_used = app_easy_timer(user_wakeup_hold_time,wakeup_hold_timer_cb_handler);
periph_init();
ARCH_FORCE_ACTIVE_MODE();
ARCH_PRINTF(“唤醒持有\ n”);
}
别的
{
wakeup_hold_timer_used = app_easy_timer_modify(wakeup_hold_timer_used,user_wakeup_hold_time);
ARCH_PRINTF(“唤醒保留重置\ n”);
}
}
静态void wakeup_hold_timer_cb_handler(void)
{
ARCH_RESTORE_SLEEP_MODE();
wakeup_hold_timer_used = 0;
ARCH_PRINTF(“唤醒保持清除\ n”);
}
我不知道搞清楚,请帮帮我,谢谢你很糊精!
更新:如果我不使用UART的RX,一切都可以!
嗨东方,
当系统醒来时,从LP_Handler调用periph_init,崩溃时的代码是多少?它击中nmi_handler,hardfault或它重置?
谢谢mt_dialog.
嗨对话人员
我调用Arch_Force_Active_Mode()将580唤醒和inituart到rx&tx数据,之后,我调用arch_restore_sleep_mode()来发布580,以便它可以睡觉,代码崩溃这次。昨天我使用了UART2(UART1之前)来测试,一切顺利。
在UART1和2之间是不同的?
谢谢!
嗨东方,
谢谢你的表明。
硬件模块是相同的,驱动程序实现有点不同,UART1代码位于ROM中,因此这可能会导致您的问题,很高兴它起作用了。
谢谢mt_dialog.