完全 按照control suite里的例程(如下配置)Example_2803xLinSci_DLB_int,使用GPIO28和29,把loopback置0取消后,还是没办法对外发送信号,做了些尝试还是一样只输出12V高电平(用SCI验证过 外接LIN芯片可正常使用);

    请问:是不是还要配置什么才能实现对外发送LIN信号波形。

    急,在线等,谢谢~

void SetupSCI(void)
{
//Allow write to protected registers
EALLOW;

LinaRegs.SCIGCR0.bit.RESET = 0; //Into reset
LinaRegs.SCIGCR0.bit.RESET = 1; //Out of reset

LinaRegs.SCIGCR1.bit.SWnRST = 0; //Into software reset

//SCI Configurations
LinaRegs.SCIGCR1.bit.COMMMODE = 0; //Idle-Line Mode
LinaRegs.SCIGCR1.bit.TIMINGMODE = 1; //Asynchronous Timing
LinaRegs.SCIGCR1.bit.PARITYENA = 0; //No Parity Check
LinaRegs.SCIGCR1.bit.PARITY = 0; //Odd Parity
LinaRegs.SCIGCR1.bit.STOP = 0; //One Stop Bit
LinaRegs.SCIGCR1.bit.CLK_MASTER = 1; //Enable SCI Clock
LinaRegs.SCIGCR1.bit.LINMODE = 0; //SCI Mode
LinaRegs.SCIGCR1.bit.SLEEP = 0; //Ensure Out of Sleep
LinaRegs.SCIGCR1.bit.MBUFMODE = 1; //Buffered Mode
LinaRegs.SCIGCR1.bit.LOOPBACK = 1; //Internal Loopback ???
LinaRegs.SCIGCR1.bit.CONT = 1; //Continue on Suspend
LinaRegs.SCIGCR1.bit.RXENA = 1; //Enable RX
LinaRegs.SCIGCR1.bit.TXENA = 1; //Enable TX

//Ensure IODFT is disabled
LinaRegs.IODFTCTRL.bit.IODFTENA = 0x0;

//Set transmission length
LinaRegs.SCIFORMAT.bit.CHAR = 7; //Eight bits
LinaRegs.SCIFORMAT.bit.LENGTH = 7; //Eight bytes

//Set baudrate
LinaRegs.BRSR.bit.SCI_LIN_PSL = 96; //19.2 kbps for SYSCLKOUT = 60 MHz
LinaRegs.BRSR.bit.M = 10;

//Enable interrupts
LinaRegs.SCISETINT.bit.SETRXINT = 1; //Enable RX interrupt

//Set interrupt priority
LinaRegs.SCICLEARINTLVL.all = 0xFFFFFFFF; //Set Int level of all interrupts to LVL 0

LinaRegs.SCIGCR1.bit.SWnRST = 1; //bring out of software reset

//Disable write to protected registers
EDIS;
}