This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F2800157: TMS320F2800157

Part Number: TMS320F2800157

HELLO

when i set lin config in F2800157, i send the master in period,but it never trigger the rx interrupt,i test the rx pin ,it has data in the pin ,and  my pinmux is GPIO29 for LINA_RX,GPIO28 for LINA_TX,my lin init config is beloew:

#define SCI_ADDR 0x6A00

 GPIO_setPinConfig(GPIO_28_LINA_TX);
GPIO_setPinConfig(GPIO_29_LINA_RX);

LIN_disableModule(SCI_ADDR);//disable tx and rx function, disable lin
LIN_enableModule(SCI_ADDR);//enable tx and rx function, enable lin

LIN_enterSoftwareReset(SCI_ADDR);//The SCI/LIN should only be configured while SWnRST = 0.

LIN_disableSCIMode(SCI_ADDR);//LIN mode is enabled

LIN_setLINMode(SCI_ADDR, LIN_MODE_LIN_RESPONDER);//Set LIN mode to Master

LIN_disableAutomaticBaudrate(SCI_ADDR);//Enable Fixed baud rate mode,disable autobaud

LIN_setCommMode(SCI_ADDR, LIN_COMM_LIN_USELENGTHVAL);

LIN_setDebugSuspendMode(SCI_ADDR, LIN_DEBUG_FROZEN);

LIN_setChecksumType(SCI_ADDR, LIN_CHECKSUM_ENHANCED);

LIN_setMessageFiltering(SCI_ADDR, LIN_MSG_FILTER_IDRESPONDER);

LIN_disableIntLoopback(SCI_ADDR);

LIN_enableMultibufferMode(SCI_ADDR);

LIN_enableParity(SCI_ADDR);

LIN_enableDataTransmitter(SCI_ADDR);
LIN_enableDataReceiver(SCI_ADDR);


LIN_disableInterrupt(SCI_ADDR, LIN_INT_ALL);

divider=(MCU_BUS_FREQ/LIN_BAUD_RATE)/16 - 1;                                                    //100M:324 120M:389
LIN_setBaudRatePrescaler(SCI_ADDR, divider, 10);                                                      //(SYSCLOCK) / ((P + 1 + M/16) * 16) = Bitrate
LIN_setMaximumBaudRate(SCI_ADDR, 120000000U);                                                 //(100000000U) / ((324 + 1 + 8/16) * 16) = 19201
                                                                                                                                         //(120000000U) / ((389 + 1 + 10/16) * 16) = 19200
LIN_setSyncFields(SCI_ADDR, 0U, 0U);


LIN_setTxMask(SCI_ADDR, 0xFFU);
LIN_setRxMask(SCI_ADDR, 0xFFU);
LIN_setIDResponderTask(SCI_ADDR,0xD6);

LIN_disableExtLoopback(SCI_ADDR);

LIN_enableInterrupt(SCI_ADDR, (LIN_INT_ID|LIN_INT_RX|LIN_INT_PE|LIN_INT_FE|LIN_INT_ISFE|LIN_INT_BE|LIN_INT_PBE));

LIN_exitSoftwareReset(SCI_ADDR);

EDIS;


LIN_setInterruptLevel0(SCI_ADDR, LIN_INT_ALL);
LIN_enableGlobalInterrupt(SCI_ADDR, LIN_INTERRUPT_LINE0);
LIN_clearGlobalInterruptStatus(SCI_ADDR, LIN_INTERRUPT_LINE0);

Interrupt_register(lin_interrupt_index[0], &lin_interrupt);

Interrupt_enable(lin_interrupt_index[0]);//lin_interrupt_index[0]       #define INT_LINA_0                  0x004C0605U // 6.5 - LINA_0 Interrupt

is there any fault in code ?

thank you very much

x 出现错误。请重试或与管理员联系。