AnsweredAssumed Answered

rts throws Address Error after PIT enable

Question asked by Alexander Caldwell on Mar 23, 2011
Latest reply on Apr 8, 2011 by Alexander Caldwell

This subroutine of TCP/IP stack in mcf 5223.c throws an exception when calling rts.  A7 points to the correct return address.

/*
 * Setup PIT Timer
 */
void
PIT_Timer_Init(uint8 PCSR, uint16 PMR)
{

 /* Set tic for timers */

 MCF_PIT0_PCSR  = (uint16)(MCF_PIT_PCSR_PRE(PCSR)); /* Divide system clock/2 by 2^PCSR */
 MCF_INTC0_ICR55 = MCF_INTC_ICR_IL(TIMER_NETWORK_LEVEL)|MCF_INTC_ICR_IP(TIMER_NETWORK_PRIORITY);
 MCF_INTC0_IMRH &= ~MCF_INTC_IMRH_MASK55;
 MCF_PIT0_PMR = PMR;      /* modulo count */
 MCF_PIT0_PCSR |= MCF_PIT_PCSR_OVW | MCF_PIT_PCSR_PIE |
                  MCF_PIT_PCSR_PIF | MCF_PIT_PCSR_RLD |
                  MCF_PIT_PCSR_EN;
}

Any ideas?

Outcomes