Jason Gossiaux

MCF5213 CAN Problem

Discussion created by Jason Gossiaux on Jul 3, 2008
Latest reply on Nov 18, 2008 by Rick Pratt
Hello everyone.  I've stumbled acrossed a bit of a problem with my MCF5213 and am out of ideas as to where it is coming from. 
 
To begin with, I ported a CAN driver from the MCF5282 to my MCF5213 eval board.  The porting went fine and I am able to hook up to a Devicenet scanner and perform limitless CAN transactions without any problems.
 
In my configuration I am using only 1 message buffer for receive and 1 message buffer for transmits.  These happen to be MB 5 for Rx and MB 14 for TX.  I wrote the driver so I can change a define and assign Rx/Tx to other MBs during bootup - and this is where my problem has arisen.
 
If I try to use MBs 0-4 for Rx, the Rx interrupts fail to fire or even set their interrupt flags. MBs 5-12 work fine for RX.  Has anyone experienced this before?  I have double checked my driver and I cannot see any differences aside from which IMRH/L register bit gets set and where my buffer pointer to the MB storage gets assigned.  Both appear to be getting set correctly from my debugging.
 
Whats even odder is MB 4 and 5 aren't at register byte boundaries on any register and don't cross registers (IMRL/IMRH).   MBs 0-12 should be using RXMASK (which is setup identically no matter what MB I am using) so it shouldn't be that.  I'm just out of options as to what it could be.  For now I can continue using MB 5 for receive.  But for my own edification I'd love to track down why MBs 0-4 fail.  Thanks in advance for any suggestions!

Outcomes