例程中,
static void Reset_Device( void )
{
#if ( CFG_HW_RESET_BY_FW == 1 )
Reset_BackupDomain();
Reset_IPCC();
#endif
return;
}
该函数Reset_BackupDomain();导致RTC复位,函数原型为
static void Reset_BackupDomain( void )
{
if ((LL_RCC_IsActiveFlag_PINRST() != FALSE) && (LL_RCC_IsActiveFlag_SFTRST() == FALSE))
{
HAL_PWR_EnableBkUpAccess(); /*< Enable access to the RTC registers /
/
* Write twice the value to flush the APB-AHB bridge
* This bit shall be written in the register before writing the next one
*/
HAL_PWR_EnableBkUpAccess();
__HAL_RCC_BACKUPRESET_FORCE();
__HAL_RCC_BACKUPRESET_RELEASE();
}
return;
}
直接注释掉Reset_BackupDomain();,问题解决。
本文详细解析了在特定例程中RTC复位的问题,通过注释掉Reset_BackupDomain()函数,成功解决了由该函数调用导致的RTC复位问题。文章深入探讨了Reset_BackupDomain()函数的内部实现,包括如何使能备份域访问、强制及释放备份域复位等关键步骤。
3543

被折叠的 条评论
为什么被折叠?



