LIN兼容SCI模式下,无法实现对外发送LIN信号,请指点!

LIN兼容SCI模式下,无法实现对外发送LIN信号,请指点!

此问题尚无答案
All Replies
  • 秀才20分

        完全 按照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;
    }

  • 探花11005分

    请问你是要做LIN 功能还是SCI功能,如果是LIN功能的话,请参考lina_external_loopback例程。

    如果此回复解答了您的问题,请在“ 这问题是否已被解答?” 点击 ” 是 “,谢谢!