Hi,
I use the DEVKIT-S12VR64: Dev Board for #S12VR64 MCU and the CW V5.1. I would like to use a pure serial interface SCI0 without through the LIN interface. At first, I used the serial SCI1 as presented in the LAB3_SCI_S12VR, just to familiarize myself and be sure that the control settings are correct, everything works fine. Then I wanted to adapt this example for the SCI0 interface, but it does not work. In the MC9S12VRRM, it explains on page 82/83 that SCI0 is shared with LINPHY interface. I programmed the register MODRR2 = 0b0110 to use PS1 / TXD0 and PS0 / RXD0 but it does not work. I also tried MODRR2 = 0b1110 to use PT1 / TXD0 and PT0 / RXD0, does not work . Here is a registry initialization code:
//route SCI0
/* MODRR2: MODRR23=0,MODRR22=1,MODRR21=1,MODRR20=0, */ //Module Routing Register 2
setReg8Bits(MODRR2, 0x06U); //TXD0 on PS1, RXD0 on PS0, see page 82, 83
/* LPCR: LPE=0 */ //LIN Control Register (LPCR)
clrReg8Bits(LPCR, 0x08U); //The LIN Physical Layer is in shutdown mode, see page 82, 83
/* PPSS: PPSS1=1,PPSS0=1 */ //polarity select, pull down
setReg8Bits(PPSS, 0x03U);
/* PERS: PERS1=1,PERS0=1 */ //polarity enabled
setReg8Bits(PERS, 0x03U);
/* WOMS: WOMS1=0 */ //Output Wired mode: Push pull
clrReg8Bits(WOMS, 0x02U);
What's wrong ?