Serial Port F Initialization Problem

Hi!

On my RCM4010 I want to init serial port F on PE2 (Tx) and PE3 (Rx).
However, the initialization library the IO Config utility created doesn’t work.
The Rabbit stops responding when it reaches the highlighted line of code.

void ClockCheck()
{
   if (freq_divider != 96) // 29.49 MHz, doubled
   {
      exception(-ERR_LIBCLOCKSPEED);
   }
}

void SetupSerial()
{
   serFopen(19200L);
   WrPortI(SFCR,&SFCRShadow, 0x21);
}

void InitPortF()
{
   ClockCheck();
   // The following differ from BIOS settings
   SetupSerial();
   WrPortI(PEALR,&PEALRShadow,0x30);     // Serial Port F
   WrPortI(PEDDR,&PEDDRShadow,0x04);     // Serial Port F
   WrPortI(PEFR,&PEFRShadow,0x04);     // Serial Port F
   WrPortI(SFCR,&SFCRShadow,0x21);     // Serial Port F
}

Does anyone have an idea why this happens or how to work around it?

Your Configuration settings are wrong