S32K Flexcan can continuous send data

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

S32K Flexcan can continuous send data

跳至解决方案
4,652 次查看
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 解答
4,327 次查看
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 回复数
4,327 次查看
xiabin
Contributor II

pastedImage_1.png

1  What is the state of J108 and 109 ?

pastedImage_3.png

How much voltage is Vbat?

0 项奖励
回复
4,327 次查看
PetrS
NXP TechSupport
NXP TechSupport

J108/J109 are placed and Vbat is 12V.

BR, Petr

0 项奖励
回复
4,327 次查看
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 项奖励
回复
4,328 次查看
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 项奖励
回复
4,327 次查看
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 项奖励
回复