how to use mc9s12xdg256mal can04,why i used it failed?

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

how to use mc9s12xdg256mal can04,why i used it failed?

834 Views
981807702
Contributor I

how to use mc9s12xdg256mal can04,why i used it failed?how to use mc9s12xdg256mal can04,why i used it failed?

Labels (1)
0 Kudos
Reply
3 Replies

632 Views
lama
NXP TechSupport
NXP TechSupport

Hi,

XDG is a family member of S12XD family. The attached examples are made for XDP and they are fully usable for the MCU you use. Of course it is necessary to change MCU type and include file (if necessary) to be they ported to XDG256 memory size.

I believe attached examples will lead you to correct solution.

The procedure I always suggest to be sure the can is correct is:

1) create loop-back communication at one channel

2) create communication between two channels at the same MCU without external transceiver as described in attached CAN without Transceiver-siemens_AP2921.pdf

3) use transceiver for communication between two nodes

I know the approach looks to be complicated, however in the case when you are not able to analyze communication protocol by means of scope then this approach provides you possibility to localize possible mistakes. Let's imagine you will directly start with item 3. How do you then know whether issue is in your SW or transceiver or other node.

Note> Remove extension *.ddd from the attached file and replace it by *.zip.

Best regards,

Ladislav

0 Kudos
Reply

632 Views
981807702
Contributor I

thanks for your reply,but the attached example was deleted for the virus.can you send it to 981807702@qq.comor upload it again?thank you so much! I will follow your suggestion!

I use the same environment included HW and SW  in can0,it works successfully! But when I ported to can04,it failed.I dubuged and found my code stop at 

while(!(CAN4CTL0)&0X10),it meanswaiting for MSCAN to sync with CAN.

360截图20170109184220508.jpg

0 Kudos
Reply

632 Views
lama
NXP TechSupport
NXP TechSupport

Hi,

I have changed the file extension to bmp. The issue was that the CodeWarrior files contain *.cmd files which are recognized by community antivirus. Unfortunately incorrectly in this case.

Best regards,

Ladislav

0 Kudos
Reply