Receive messages with CAN_LDD is not working

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

Receive messages with CAN_LDD is not working

802 次查看
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

标记 (2)
0 项奖励
回复
2 回复数

607 次查看
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 项奖励
回复

607 次查看
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 项奖励
回复