Hi,
One question about F280049 LIN setting in SPRUI33B.
On below picture, when HGENCTRL = 1, mask = 1 is not used for the filtering criterion.
On table 27-36, when HGENCTRL is set to 1, it must set RXIDMASK to 0xFF.
How to set it? Thanks.
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,
One question about F280049 LIN setting in SPRUI33B.
On below picture, when HGENCTRL = 1, mask = 1 is not used for the filtering criterion.
On table 27-36, when HGENCTRL is set to 1, it must set RXIDMASK to 0xFF.
How to set it? Thanks.
Hi Daniel,
Thanks for detail information. Based on that if I understand correctly the Master is going to write 2 frames i.e. PID 0xC1 and 0x06 which LIN slave node has to read and match to process the data, correct?
Difference between RXIDMASK is TXIDMASK is whenever their is a match in the ID due to RXIDMASK interrupt for RX will be enable (RXENA flag is 1), and you can process that in RX ISR, whereas if their is a match due to TXIDMASK interrupt for TX will be enable (TXENA flag is 1) and you can process that in TX ISR.
Yes, RXIDMASK is to filter when Master writes and filter by TXIDMASK when master reads.
Let me get back with you on how to configure ID-Slave-Task byte in couple of days after checking with experts here.
Regards,
Nirav
Hi Nirav,
Thanks for your help. F280049 is slave node, vehicle is master node.
Customer hope to only receive the frame that is 0xC1 and 0x06, and make response to master when frames is 0x03 and 0x85.
For other frames, It is filtered and don't to receive.
The question is how to set TXIDMASK and RXIDMASK separately.
We find both TXIDMASK and RXIDMASK will work to filter the frames when working.
Refer to the below picture, TX also handle the SCIRXSHF register.
Besides, looking forward more comments about ID-Slave-Task byte configuration later.
Hi Daniel,
From what you described, F280049 acts as a slave node. Based on my understanding:
- To receive frame 0xC1 and 0x6, you need to set the LINMASK.RXIDMASK = 0xC7
- To transmit frame 0x85 and 0x3, you need to set the LINMASK.TXIDMASK = 0x86
- ID-Slave-Task-Byte needs to be set to 0x1 (i.e. LINID.IDSLAVETASKBYTE = 0x1), whose value is same for RX and TX.
Please try this out and let me know if you still have any questions.
Regards,
Nirav
Hi Nirav,
It can't completely filter the message according to your configuration. But it can be used to identify the ID in future.
There is a new question about how to use LIN interruption.
1. Can I use LIN_INTERRUPT_LINE0 and LIN_INTERRUPT_LINE1 at the same time?
2. Can I use the interrupt vector at the same time, as shown in below table.
When I send and receive alternately, the send data is incorrect.
Hi Daniel,
Here are answers to your questions:
1. No, you cannot get interrupts on both lines at the same time, since the interrupt flags can be mapped to 1 line at a time.
2. Did not quite understand your questions, but yes you can enable all the interrupt flags at the same time. Any interrupt flag set out of all will give an interrupt to PIE depending on whether mapped to Line0 or Line1. Line0 and Line1 have separate channels mapped on Pie.
Regards,
Nirav
Hi Daniel,
Is this issue resolved? If yes, please close this thread.
Regards,
Nirav