- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hallo, I have a problem with SPI communication, I am using Triboard_TC357_ADAS_V2.0. I can see the correct data on the scope but I am able to receive the data of a specific frame on the next frame. I don't know what is the cause of that however I believe it has something to do with the triggering of the RX interrupt. I would appreciate if I can get any help regarding this issue. Thanks in advance.
Solved! Go to Solution.
- Labels:
-
Aurix
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hallo,
Currently the issue is fixed. it was happening as my code was breaking before the receive of the slave message and as a result when the code is continued again I was getting the slave message of the previous frame not the current one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Zeidan,
Please refer to the below code example available in github:
https://github.com/Infineon/AURIX_code_examples/tree/master/code_examples/SPI_CPU_1_KIT_TC375_LK
It is for TC375LK but can adapt it for your device. In addition to that, as you have a doubt on Rx Interrupt, please check the priorities configured in the example. The configuration of the priorities shall be as like in the example (ERR > Rx > Tx).
Regards,
Prudhvi.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hallo Prudhvi,
I checked already the priorities it is as the example, what I can see now that for some reason the TX interrupt is triggered before the RX interrupt even though the RX has higher priority ! also what is weird that for the first transmission there is nothing being received which indicates that only for the first transmission the RX interrupt is not triggered ? Do you have any thoughts on that ? Thanks in advance.
Best Regards,
Zeidan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You will also get a TX interrupt when the BACON is written to the TXFIFO.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hallo,
Currently the issue is fixed. it was happening as my code was breaking before the receive of the slave message and as a result when the code is continued again I was getting the slave message of the previous frame not the current one.