YUDONG JIN

SDK_2.3.0_MKE06Z128xxx4 WDOG问题

Discussion created by YUDONG JIN on Mar 13, 2018
Latest reply on Mar 22, 2018 by Daniel Chen

SDK_2.3.0_MKE06Z128xxx4  SDK中,Refresh程序如下,

static inline void WDOG8_Refresh(WDOG_Type *base)
{
 uint32_t primaskValue = 0U;

 

 base->CNT = WDOG_REFRESH_KEY1;
 base->CNT = WDOG_REFRESH_KEY2;
}

这个程序不能稳定工作,改成下面的就可以了,感觉MKE06Z的SDK问题很多?!

static inline void WDOG8_Refresh(WDOG_Type *base)
{
 uint32_t primaskValue = 0U;
 
 primaskValue = DisableGlobalIRQ();
 base->CNT = WDOG_REFRESH_KEY1;
 base->CNT = WDOG_REFRESH_KEY2;
 EnableGlobalIRQ(primaskValue);
}

Outcomes