Receive messages with CAN_LDD is not working

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

Receive messages with CAN_LDD is not working

589 Views
viniciuszuccopa
Contributor I

Hello,

I'm trying to use CAN comunication with microcontroler MKE06Z128VLK4 and a MCP2562 transceiver. I'm using CAN_LDD component from processor expert configured to RX pin PTH2 and TX pin to PTE7. The SendFrame Method is working fine, I can send messages continuosly from uc to my CANUSB tool normaly, but the ReadFrame Method retruns a Cpu_INT_Hard_FaultInterrupt when I try send some message to uc:

pastedImage_1.png

I'm using the CodeWarrior 10.7

Thanks for your attention.

Att.

Vinicius

Tags (2)
0 Kudos
2 Replies

394 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Vinicius,

- Please check whether the interrupt vector for CAN_receive configured correctly.

- Also there is sample code , please right click CAN component -> choose "Help on component"->

pastedImage_1.png

Hope it helps


Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

394 Views
viniciuszuccopa
Contributor I

Hi Alice,

I found my issue. It was because I did not initialize correctly the LDD_CAN_TFrame structure before receive some message. I just created it and the vector pointer " *Data " didn't know Its size to work properly. So I initialized all the Structure with some dummy data with all eight bytes in the vector pointer before the use.

pastedImage_1.png

Thanks for your attention.

Att.

Vinicius

0 Kudos