Solved my own issue. I've not had much luck with receiving help from this forum in a timely manner
. In case this helps someone else, here is what works for me.
This is the init from mcf5223_sysinit.c
void
mcf5223_wtm_init(void)
{
//
// Enable Software Watchdog Timer - Timing 2^23 * Bus Freq
//
// WatchDog Service Routine
MCF_SCM_CWSR = 0x55;
MCF_SCM_CWSR = 0xAA;
// Set Watchdog Timing Delay
// 6 = 2^27 * Bus Clock Frequency (60MHz) = 2.23 Seconds
MCF_SCM_CWCR = MCF_SCM_CWCR_CWT(6);
// Enable Watchdog
MCF_SCM_CWCR |= MCF_SCM_CWCR_CWE;
// WatchDog Service Routine
MCF_SCM_CWSR = 0x55;
MCF_SCM_CWSR = 0xAA;
// Wait to Hook ISR
Moved the ISR Hook to the init function of a FreeRTOS task for the project which executes much later:
//Hook Watchdog ISR to Interrupt
MCF_INTC0_ICR8 = MCF_INTC_ICR_IP(7) | MCF_INTC_ICR_IL(3);
MCF_INTC0_IMRL &= ~(MCF_INTC_IMRL_MASK8);
Csa_watchdog_is_ready = 1;
Serviced the Watchdog by waking a task after 1 sec within the system clock ISR:
__declspec(interrupt)
void
timer_isr()
{
++timer_ticks;
if (++timerct >= INTS_PER_CTICK)
{
cticks++;
if (Csa_watchdog_is_ready)
{
if(!(--Csa_wdog_timer_cnt))
{
Csa_wdog_timer_cnt = CSA_WDOG_CNT;
CsaProcessList |= CSA_WATCHDOG_PROCESS;
TK_WAKE(&to_csa);
}
}
The Task that services the ISR:
void csa_watchdog_process(void)
{
MCF_SCM_CWSR = 0x55;
MCF_SCM_CWSR = 0xAA;
//printf("watchdog ");
CsaProcessList &= ~CSA_WATCHDOG_PROCESS;
}