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.

TMS320F280040C-Q1: Multibuffer mode, LIN MODE (NOT SCI), DMA, 1 RXID, 2 TXID, SLAVE MODE

Part Number: TMS320F280040C-Q1

Tool/software:

Hello, I am writing a slave board code that receives 8 bytes of data and transmits 8 bytes of data using LIN MODE. At first, communication was performed using the interrupt method using level0 and level1, but a conflict occurred with the ADCC_INT1 ISR. I would like to ask you a few questions.

1. It seems that the data transmission and reception speed is slow, causing a crash. Can this problem be solved by sending and receiving LIN data using DMA?

2. Currently I am using LIN MODE. When using DMA, do I need to switch to SCI mode to use two TX IDs?

If you have any relevant data, please add them. thank you

  • Hi Donguk,

    Could you elaborate what you mean by too slow - are you seeing data sent/received ok? What do you mean by "crash"? Is this a timeout on the LIN?

    You can use DMA in LIN mode- I believe the 2 TX ID's should not affect the DMA functionality here. If using the LIN DMA trigger, the trigger will happen when TXENA is set and SWnRST is released initially. Subsequent triggers in LIN mode with the multibuffer option enabled will occur after each transmission (up to eight data bytes stored in the transmit buffers (TDy) in the LINTD0 and LINTD1 registers)  to reload the transmit buffer for the next transmission. 

    The ID match determines when the transmission should occur, so the DMA functionality shouldn't be directly affected by using more than one TX ID.

    Best Regards,

    Allison

  • Hi Allison

    The slow occurrence was because OverflowStatus occurred in ADCC after using the LIN interrupt.

    The statement causing the occurrence is while(!LIN_isTxBufferEmpty(LINA_BASE)); in the interrupt function.

    That was the problem, and it has now been resolved.

    But we still haven't reached our goal. When controlling a 3-phase motor with CAN communication, the motor runs normally, but when controlling the motor with LIN by adding only LIN communication to the same code, the motor does not run. I think this is due to differences in communication methods.

    The only difference between the two methods is whether the motor drive ON signal is sent via LIN or CAN.

    Best Regards,

    Donguk

  • Solved it, thank you.
  • Glad it's resolved! I'll go ahead and close the thread. Feel free to open a new one if you have further questions.

    Best Regards,

    Allison