I’m trying to configure Serial Port E on PD6/PD7 from an RCM4310.
Code&BIOS in Flash, Run in RAM, when debugging & hits the line
WrPortI(SECR, &SECRShadow, 0x11)
the program crashes. What’s wrong?
WrPortI(PDCR, &PDCRShadow, 0x00); // clear all bits to pclk/2
WrPortI(PDDCR, &PDDCRShadow, 0x00); // clear all bits to drive high and low
WrPortI(PDAHR, &PDAHRShadow, 0x30); // bit 6 alternate output
WrPortI(SECR, &SECRShadow, 0x11); // pport D serial port input, int priority 1
WrPortI(PDDDR, &PDDDRShadow, 0x44); // set TxF and TxE output
WrPortI(PDDR, &PDDRShadow, 0x44); // set Txf and TxE high