S32K Flexcan can continuous send data

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32K Flexcan can continuous send data

ソリューションへジャンプ
2,218件の閲覧回数
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 件の賞賛
1 解決策
1,893件の閲覧回数
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 件の賞賛
5 返答(返信)
1,893件の閲覧回数
xiabin
Contributor II

pastedImage_1.png

1  What is the state of J108 and 109 ?

pastedImage_3.png

How much voltage is Vbat?

0 件の賞賛
1,893件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

J108/J109 are placed and Vbat is 12V.

BR, Petr

0 件の賞賛
1,893件の閲覧回数
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 件の賞賛
1,894件の閲覧回数
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 件の賞賛
1,893件の閲覧回数
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 件の賞賛