CAN Driver MPC 5777M

cancel
Showing results for 
Search instead for 
Did you mean: 

CAN Driver MPC 5777M

1,000 Views
yalamandadosaky
Contributor V

Hi Petr Stancik, I have written the can driver for mpc 5777m same as the example for mpc5777c, It 's working fine and transmission and reception is happening, but My doubt in your code is your always making TXBAR = 1 for Tx buffer 0 when transmitting , as you configured 2 Tx buffers  for transmitting can messages.What about  another Tx buffer .

 

Why can't we check the whether txbuffer 2 is pending or not  and make txbuffer 2 'sTXBAR  = 1. so that we can transmit messages very fast and if we configure all 32 tx buffers , then we can transmit with high speed.

Labels (1)
5 Replies

578 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

Yes, you are right. I have created space for 2 TX buffers but within a code I used only single one.

It is up to you how many TX buffers you prepare for transmit. Once you request transmission for all TX buffers using the TXBAR[ARn] they are transferred based on priority, lowest Message ID gets highest priority and is transmitted next. In

case that multiple Tx Buffers are configured with the same Message ID, the Tx Buffer with the lowest buffer number is transmitted first.  

BR, Petr

578 Views
yalamandadosaky
Contributor V

Hi Petr Stancik, Currently I am using 1 Tx Buffer to transmit CAN Messages, the transmission is very slow , Can you help me how to solve this problem.PetrS

0 Kudos

578 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

see attached example tested on the MPC5777M EVB. It is the same one as for MPC5777C, just MCAN2 is sending and MCAN1 is receiving.

MCAN_2 sends 32 messages each 1sec. This interval is generated by PIT. The 32 TX buffers are filled with the same ID and byte length.

Hope it helps.

BR, Petr

578 Views
yalamandadosaky
Contributor V

Hi Petr Stancik, Thank you for your reply. I am almost finished my M_CAN_driver for MPC5777M and it is also working fine . I am very thankful  for your support during can driver development .PetrSb55689

0 Kudos

578 Views
yalamandadosaky
Contributor V

Hi Petr Stancik, As per my project requirement I have to use all 32 buffers for transmit , currently I am using your code to transmit the messages(1 tx buffer TXBAR = 1). But it is very slow , So Kindly help me , what are the modifications  I can do for your transmit msg function(defined in your example code for MPC5777C) so that I can transmit messages using all 32 buffers at a time . May be If I use all 32 buffers will make it fast .PetrS

0 Kudos