在线时间13 小时
UID212138
注册时间2008-5-25
NXP金币0
TA的每日心情 | 奋斗 2019-6-9 17:24 |
---|
签到天数: 1 天 连续签到: 1 天 [LV.1]初来乍到
注册会员

- 积分
- 178
- 最后登录
- 2019-7-18
|
MCU--SKEAZN64 CW10.5
问题1:重新配置看门狗,总是引起MCU复位?(下面是看门狗重新配置代码,刷新的代码)
/***********************************************************************************************
*
* @brief ReWatchdog - Reconfiguring the Watchdog
* @param none
* @return none
*
************************************************************************************************/
void ReWatchdog(void)
{
/* Initialize watchdog with ~1-kHz clock source, ~1s time-out */
WDOG_CNT = 0xc520;
WDOG_CNT = 0xD928; /* write the 2nd unlock word*/
WDOG_TOVAL = 0xE803; // setting timeout value
WDOG_CS2 = 0x01; // setting 1-kHz clock source
WDOG_CS1 = 0xA3; // Watchdog Enabled,
// Watchdog interrupts are disabled. Watchdog resets are not delayed,
// Updates allowed. Software can modify the watchdog configuration registers within 128 bus clocks after performing the unlock write sequence,
// Watchdog test mode disabled,
// Watchdog disabled in chip debug mode,
// Watchdog enabled in chip wait mode,
// Watchdog enabled in chip stop mode.
}
/***********************************************************************************************
*
* @brief FeedWatchdog - Refresh watchdog
* @param none
* @return none
*
************************************************************************************************/
void FeedWatchdog(void)
{
DisableInterrupts; /* disable global interrupt*/
WDOG_CNT = 0xA602; /* write the 1st refresh word*/
WDOG_CNT = 0xB480; /* write the 2nd refresh word to refresh counter*/
EnableInterrupts; /* enable global interrupt*/
}
问题2:用OPENSDA调试时,设置硬件断点不起作用?
问题3:新建工程时,怎样加载自己定制启动代码?
问题4:能否提供一段FLANH做EEPROM代码?
|
|