本帖最后由 FSL_TICS_A 于 2014-6-16 17:53 编辑
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代码?
|