s32k312 flexcan interrupt

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

s32k312 flexcan interrupt

Jump to solution
454 Views
fengba_360
Contributor III

Hello, I am implementing FlexCAN transmission and reception on an S32K312 using interrupts, but the data transmitted by the S32K312 does not match what I receive using a CAN card. Could you please advise me on possible reasons for this? Attached is an illustration of my configuration setup.微信图片_20240903112421.png微信图片_20240903112337.png微信图片_20240903112144.png微信图片_20240903112513.png

0 Kudos
Reply
1 Solution
414 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@fengba_360

1.first, the demo you send to me can build sucess cause missing some file. please double check it.

2.second, In your code, the “dummyData” array has not been modified, so the data in your screenshot is inconsistent with your code.

View solution in original post

0 Kudos
Reply
7 Replies
435 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@fengba_360

Could you please provided your project so that we can help you find the root cause.

0 Kudos
Reply
432 Views
fengba_360
Contributor III

hello,The attachment is the project information. Please check it. I feel like I sent the address information. thanks。

0 Kudos
Reply
415 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@fengba_360

1.first, the demo you send to me can build sucess cause missing some file. please double check it.

2.second, In your code, the “dummyData” array has not been modified, so the data in your screenshot is inconsistent with your code.

0 Kudos
Reply
407 Views
fengba_360
Contributor III

The CAN transmission is called in the following part of the code.

dummyData[8]={1,2,3,4,5,6,7,8}

 

微信图片_20240903152907.png

0 Kudos
Reply
391 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@fengba_360

There is a problem with the usage of C pointer.

Please try to change the highlighted part below.

Senlent_0-1725354043327.png

 

0 Kudos
Reply
363 Views
fengba_360
Contributor III

Thank you. I made a big mistake. I'm sorry.

0 Kudos
Reply
411 Views
fengba_360
Contributor III

Hello, no matter what data I fill in the dummy array, the data I receive through the CAN card is always the same (the CAN ID is correct, but the CAN data seems to be address information). The attachment is the latest successfully compiled code. It is consistent with the phenomenon I described.

0 Kudos
Reply