Can Bus message receive rate

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

Can Bus message receive rate

Jump to solution
1,239 Views
Dannii
Contributor II

Hey Guys,

i have a Question regarding the can bus rate of receiving from different nodes. At the moment i am using a K60D100M and FRDM-K64 to send Can Messages to a RT1064-EVK. Therefor i edited the "flexcan_interrupt_transfer" example on all 3 of them and set the k60 and k64 to mode A and the 1064 to mode B. I also extendet the rx filter on the 1064 to recieve from two devices and i am able to recieve messages and the id's. But when sending from both in a loop I have to implement a __asm("NOP") command for like 1 million cycles to slow both sending Nodes down. By shortening the sleep time the 1064 starts to crash. So is there a like a buffer which gets clogged or a limit on the recieving side? Cause when looking at the CAN line with an Oscilloscope there is plenty of bandwith left. also changing the baudrate to a higher one doesnt change the crashing. So I guess the limiting part is on the 1064. Has someone an Idea?

Baudrate 25.000 - 250.000
NOP 1.000.000 per TX
frame.length = 2 per TX

Best regards
Daniel

0 Kudos
Reply
1 Solution
1,210 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hello @Dannii,

I think it shouldn't need all the NOPs since the capabilities to receive using in a bus at 250 kbps is much higher than two bytes per node. Some things to check is that all the devices are at the same baud-rate and the same sampling point.

The only thing is that if you're using the same mailbox and two messages are coming consecutively and the mailbox is not free could cause some unexpected behavior. I will suggest to configure two mailboxes and check if this fix the issue.

Best Regards,

Alexis Andalon

View solution in original post

0 Kudos
Reply
2 Replies
1,202 Views
Dannii
Contributor II

Yes Thank you! The two messages are coming consecutively were the problem. 

Thank you for your help!

Best Regards,

Daniel

0 Kudos
Reply
1,211 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hello @Dannii,

I think it shouldn't need all the NOPs since the capabilities to receive using in a bus at 250 kbps is much higher than two bytes per node. Some things to check is that all the devices are at the same baud-rate and the same sampling point.

The only thing is that if you're using the same mailbox and two messages are coming consecutively and the mailbox is not free could cause some unexpected behavior. I will suggest to configure two mailboxes and check if this fix the issue.

Best Regards,

Alexis Andalon

0 Kudos
Reply