CAN FD in s32k3xx (flex CAN) data rate

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

CAN FD in s32k3xx (flex CAN) data rate

Jump to solution
2,186 Views
Shreyas_Bhat_Karkala
Contributor III

hi, i was going through the CAN example where the S32k344 BMU is used, problem is when i send with dlc 8 and baud rate to 500Kbps  its working , and if i change the configuration to 16 bytes with brc to 1Mbps its receiving but data is zeros and while transmitting it gives bit stuff error or bit and form errors   , i have attached the example code with configurations changed to FD and required baud rate .

Tags (2)
0 Kudos
Reply
1 Solution
1,798 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @Shreyas_Bhat_Karkala,

Please find attached the project I've used to test TX & RX with CAN0. I modified the RX event to configure a data length of 16 if extended ID is received, and 8 if standard ID is received. Here are the messages in the PCAN view:

Julin_AragnM_0-1751321268905.pngJulin_AragnM_1-1751321276338.png

Again, this is tested in the S32K344EVB, but I can test it in the BMU reference design if you give me some time.

Best regards,
Julián

View solution in original post

5 Replies
1,946 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @Shreyas_Bhat_Karkala,

I imagine you are testing the reception with the script you've shared, is this correct? Are you able to connect a CAN analyzer or oscilloscope and share the signal to confirm if the frame is being sent correctly?

Currently I do not have the S32K344BMU at hand, so I tested your configuration in the CAN0 instance; There should not be any major differences:

Julin_AragnM_0-1751053924694.png

Julin_AragnM_0-1751053629171.png

Best regards,
Julián

0 Kudos
Reply
1,784 Views
Shreyas_Bhat_Karkala
Contributor III

This is bus master V3.2.2 this version can only send 8 bytes so i used python , in both python and bus master 8 bytes are sent and received properly with the current config and main code that i have attached ,please check with this config

 

0 Kudos
Reply
1,799 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @Shreyas_Bhat_Karkala,

Please find attached the project I've used to test TX & RX with CAN0. I modified the RX event to configure a data length of 16 if extended ID is received, and 8 if standard ID is received. Here are the messages in the PCAN view:

Julin_AragnM_0-1751321268905.pngJulin_AragnM_1-1751321276338.png

Again, this is tested in the S32K344EVB, but I can test it in the BMU reference design if you give me some time.

Best regards,
Julián

1,790 Views
Shreyas_Bhat_Karkala
Contributor III

Hi @Julián_AragónM , the callback in the code is for reception but also in the callback before that i try to transmit a FD frame , my can analyzer tool can only send 8 bytes so i am using python to transmit and receive  ,the image 1 i have attached is the rx and tx mb config

Shreyas_Bhat_Karkala_0-1751256159701.pngimage 1

in this config if i send 8 bytes data it is able to receive and transmit , but if i change the data length and then transmit its able to receive but data length and the data are zero , i am trying this through ixxat ,image 2 ,3 are reception when the data byte was more than 8 bytes and other two images are when the data is 8 bytes, according to your reply i think you are telling that the current configurations and the main.c code are fine right?, so is it a issue in the script , also can you share the code for CAN FD that is working

thank you 

0 Kudos
Reply
2,058 Views
Shreyas_Bhat_Karkala
Contributor III

please check the code and let me know if the configuration are correct, this is the python code that i am running in v3.10

0 Kudos
Reply