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.
Hi,
On F280049 TRM Figure 27-8 Receive Buffers and Figure 27-9 Transmit Buffers, it says
“The 3-bit compare register contains the number of data bytes expected to be received or transmitted.the LENGTH value in SCIFORMAT register indicates the expected length and is used to load the 3-bit compare register.”
How to set LIN length when there are three different lengths data are received? My customer need to receive LIN data which length is 1, 7 and 8 byte separately.
Do we need to switch length value frequently? When to set SCIFORMAT register LENGTH?
We have enabled Multi-buffer mode by calling “LIN_enableMultibufferMode(base); in LIN initialization.
By the way, we find when use polling method to call LIN_isTxMatch(LINA_BASE) and LIN_isRxReady(LINA_BASE), it need to process LIN_isTxMatch(LINA_BASE) firstly, otherwise, LIN_isRxReady(LINA_BASE) can not be set after data received.
Thanks.
Hi Daniel,
Yes you will have to set length value frequently depending on the ID received since the length of each ID can vary.
I presume that TMS320F390049 is acting as a slave device, and if customer is trying to receive the data why are they using LIN_isTxMatch() function?
In order to set length based on ID, first ID should be read and then length needs to be set based on the received ID.
1. Poll on LIN_isRXMatch(LINA_BASE) until the flag is set, to make sure the ID is received without any error.
2. Read the ID using LIN_getRxIdentifier(LINA_BASE), and based on the ID set the frame length
3. Set the frame length using LIN_setFrameLength() function
Regards,
Nirav