Announcements

Help us improve the Power & Sensing Selection Guide. Share feedback

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Zeidan
Level 2
Level 2
First like received 5 replies posted 10 sign-ins

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. 

0 Likes
1 Solution
Zeidan
Level 2
Level 2
First like received 5 replies posted 10 sign-ins

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. 

View solution in original post

4 Replies
Prudhvi_E
Moderator
Moderator
Moderator
250 replies posted 100 solutions authored 25 likes received

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.

0 Likes
Zeidan
Level 2
Level 2
First like received 5 replies posted 10 sign-ins

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

0 Likes
cwunder
Employee
Employee
10 likes given 100 solutions authored 5 likes given

You will also get a TX interrupt when the BACON is written to the TXFIFO. 

0 Likes
Zeidan
Level 2
Level 2
First like received 5 replies posted 10 sign-ins

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.