msCAN driver AN2726

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

msCAN driver AN2726

7,640 Views
burra
Contributor II
Hi,
have anybody experiance with the freescale msCAN driver an2726SW. I have made a new project to work with my evo bord sk-s12xdp512-a. Anybody knows what CAN speed it runs on? And what the demo main.c realy does?

Is also any there any other msCAN diver written? Because the Freescale does not really fulfil my needs.

//Burra
Labels (1)
0 Kudos
7 Replies

1,360 Views
burra
Contributor II
Hi,
have looked att the example now. It fulfil my needs better, the only downside is that it uses the Core processor and not the Xgate. Is it difficult to change the driver so it is run by the Xgate?

//Burra
0 Kudos

1,360 Views
Steve
NXP Employee
NXP Employee

Burra,

 That's not quite true. The software uses the XGATE to manage all the CAN communications and provides some drivers for the CPU to allow it to retrieve the messages. The bulk of the activity is handled by the XGATE.

  I should also point out that the driver as published is for the first silicon of the XD512. It is mentioned on page 8 that it supports this mask set (L40V). The silicon you most likely have is from the second mask set (L15Y) and there are some differences in the initialisation of XGATE required. The format for the CodeWarrior project also changed.

 The app note is in the queue to be updated but at the moment I don't have a completion date. The difference is in the XGMCTL register which is now a word write rather than a byte.

 The latest version of codewarrior also has the option for automatically downloading the XGATE code to RAM, but this function is included in the source code as well.

 If you want to use the app note as a starting point you should be able to use most of the code and update the XGATE initialisation and project format. If you want to use the app note "as is" it may be better to wait unitl the new app note & software is available.

0 Kudos

1,360 Views
timob
Contributor I
Hello Steve,
I can't get the AN2726 example running on my Softec HCS12X starter kit. Is the new version finished or can you give me a hint how to get it running with only the USB debug interface of the Softec board and no P&E ICD.
0 Kudos

1,360 Views
Steve
NXP Employee
NXP Employee

timob, I've asked for the converted version to be posted immediately.

The app note revision is still underway and you'll see an update to that before long. Of course we may find that we want to make further enhancements to the software as we are updating the app note - in which case there may be another update in the near future.

0 Kudos

1,360 Views
Steve
NXP Employee
NXP Employee
Just a heads-up folks. The updated app note has now been published.
0 Kudos

1,360 Views
burra
Contributor II
Hi, Steve

When I was talking about that the driver not using the Xgate I was refering to the Softec example that comes with the Softec cd, not the AN2726. I would glady use the Freescale driver (AN2726) but the problem is the mail boxes. When I looked at the driver. It seems like if I recive a CAN message with CAN ID 0x8 and want to send the message but only on a different CAN port. I need to configure a mail box to have the CAN ID 0x8 and send the message to that mailbox for the message to get sent with CAN ID 0x8. Is it like a have understood it?

I would like to be able to have a tx queue and send messages with CAN ID,DLC and DATA to the tx queue and it would get sent when the HW tx buffers are ready.


// Burra
0 Kudos

1,360 Views
MichaelA
Contributor I

Hey burra,

The Softec board should come with a CD that has some example projects on it.  One of them is a MSCAN example and has some functions that do the basic CAN operations (initialize, receive, send).  May want to take a look at those to see if they help.

- Michael

0 Kudos