S32K Flexcan can continuous send data

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

S32K Flexcan can continuous send data

Jump to solution
2,126 Views
xiabin
Contributor II

I use S32K evb  to send can message;when I use can continuous send  like this question;

how to program to let Flexcan can continuous send data on s32ds. 

if(FLEXCAN_DRV_GetTransferStatus(INST_CANCOM1, TX_MAILBOX) == STATUS_SUCCESS)
{
SendCANData(TX_MAILBOX, TX_MSG_ID, &ledRequested, 1);
}

The sending rate is very slow, and only 5 frames can be sent every 1 s.

The project is on the attachment. Where is the problem?

0 Kudos
1 Solution
1,801 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

once the MB is prepared for transmission, that is the CODE is written with 0xC, the MB participates in arbitration and the message is sent on the first opportunity window, when module sees a bus free.

So you can have several MBs prepared (in your case 3) for TX and those will be transmitted based on priority checked during arbitration.

BR, Petr

View solution in original post

0 Kudos
5 Replies
1,801 Views
xiabin
Contributor II

pastedImage_1.png

1  What is the state of J108 and 109 ?

pastedImage_3.png

How much voltage is Vbat?

0 Kudos
1,801 Views
PetrS
NXP TechSupport
NXP TechSupport

J108/J109 are placed and Vbat is 12V.

BR, Petr

0 Kudos
1,801 Views
xiabin
Contributor II

thank you!

The reason for the error is that I used vbat 5v。

 

I have another question: How many send mailboxes are suitable for not dropping frames?  for example, I need to send 3 messages, each message period is 10ms.

0 Kudos
1,802 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

once the MB is prepared for transmission, that is the CODE is written with 0xC, the MB participates in arbitration and the message is sent on the first opportunity window, when module sees a bus free.

So you can have several MBs prepared (in your case 3) for TX and those will be transmitted based on priority checked during arbitration.

BR, Petr

0 Kudos
1,801 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

I tested this example with PCAN tool and see message sent each cca 150us. 

This I think  confirms theoretical assumption. 

BR, Petr

0 Kudos