dear team:
We use the TMS320F280049 chip to realize the reception and transmission of LIN multi-ID signals from the main node. It is found that the data is occasionally loss.
Our questions are:
1. The transmission/reception of the slave nodes are multiple IDs. For example, the IDs written by the master node are 0X06 and 0XD8, and the IDs read by the master node are 0X03, 0X85, 0X99, 0X1A. How do I set LIN_setIDSlaveTask? ), LIN_setTxMask() and LIN_setRxMask()? Currently our setup is as shown:
my code:
LIN_setIDSlaveTask(LINA_BASE, 0x01);
LIN_setTxMask(base, 0x9FU);
LIN_setRxMask(base, 0xDEU);
2. The data lengths of different ID transmissions are inconsistent. For example, the data lengths of 0X03, 0X85 and 0X99 are both 8 bytes, and the data length of 0X1A is 4 bytes. How should I set LIN_setFrameLength()? At present, we set it as follows: Will it cause data to be dropped?
my code:
switch(RXID.byte2)
{
case 0x99:
LIN_setFrameLength(LINA_BASE, 7U);
CANBUSOFFPARA.OvertimeCntTX_19=0;
HVSC_0x19TrmManage();
break;
case 0x1A:
LIN_setFrameLength(LINA_BASE, 4U);
CANBUSOFFPARA.OvertimeCntTX_1A=0;
HVSC_0x1ATrmManage();
break;
case 0x85:
LIN_setFrameLength(LINA_BASE, 8U);
CANBUSOFFPARA.OvertimeCntTX_05=0;
HVSC_0x05TrmManage();
break;
case 0x03:
LIN_setFrameLength(LINA_BASE, 8U);
CANBUSOFFPARA.OvertimeCntTX_03=0;
HVSC_0x03TrmManage();
break;
default: break;
}
In summary, we believe that the data dropped by the above two points: 1, the filter mailbox settings are unreasonable; 2, frequently set the data frame length.
Please give your suggestions or comments, thank you very much.
Yj