MSCAN communication for SKEAZ64MLH4

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

MSCAN communication for SKEAZ64MLH4

3,844 Views
ekta_rathod
Contributor II

Hello,

I am trying to transmit the data over CAN bus for nxp controller (SKEAZ64MLH4) using Processor Expert auto-generated code in 'Codewarrior'. CAN lines are connected to the 'PEAK' CAN adapter and observing the output on an open source software 'BUSMASTER'. But output terminal is continuously giving bus error messages.

Also Interrupt for TX is not getting generated as it is not coming in TX ISR. I am unable to figure out the problem with the CAN transmission.

Code has been attached here. Please help me out to resolve this issue.

 

Regards,

Ekta Rathod

0 Kudos
6 Replies

3,747 Views
ekta_rathod
Contributor II

Hello,

As mentioned above, I tried to transmit and receive CAN data on custom board. TJA1040 CAN transceiver is used.

While transmission or reception, voltage level on CAN Bus is as expected (CANH - 3.2V, CANL - 1.8V) but unable to observe data on BUSMASTER using Kvaser or PEAK Adapter.

Please check the attached code and suggest me if I did anything wrong.

Regards,

Ekta

0 Kudos

3,715 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hello @ekta_rathod ,

Overall your code looks good, so I'm wondering if the receiver your using is configurated correctly. I will suggest trying sending messages to the receiver to confirm if any type of communication is being done correctly.

Best Regards,

Alexis Andalon

0 Kudos

3,765 Views
ekta_rathod
Contributor II

Sir, I am using custom board. 

Okay I will try to test it using loop back mode

Thanks.

0 Kudos

3,765 Views
ekta_rathod
Contributor II

Which pin need to be initialized?

CAN init is done as shown in attached images and CAN transceiver is in active mode

0 Kudos

3,765 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hello Ekta,

Looking at your code closely I see that you already set the tx/rx pin. Are you using one of our development boards to test this or is it a custom board? 

Also, only to check if the module is working correctly, you could try using the loop mode to test the functionality. 

Best Regards,

Alexis Andalon

0 Kudos

3,765 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hello ekta.rathod@deviseelectronics.com‌,

In the main code I didn't see the Pin initialization function, are you initializing this in other places?

Best Regards,

Alexis Andalon

0 Kudos