MOD54415 CAN bus works like a charm IF

Discussion to talk about hardware related topics only.
Post Reply
Hans1965
Posts: 4
Joined: Mon Mar 04, 2013 4:30 am

MOD54415 CAN bus works like a charm IF

Post by Hans1965 »

Hello fellow Netburner users & developers,

I had to implement a CAN bus communication for out MOD54415 application. Because our CAN0 is used for I2C (we migrated from MOD5272) I had to switch to CAN1.
In the example which came 2.6.0 NNDK the pins 42 & 39 where set to CAN0_TX and CAN0_RX, so I made in my application pin 44 = CAN1_TX and pin 41 = CAN1_RX.
Did CanInit, setup the RX fifo, called SendMessage and CanRxMessage like in the example, but nothing happened. After adding 'result = SendMessage(..)' it turned out that I was getting timeouts on SendMessage.
To cut a long story short, it turned out the canif.cpp was writen completly for CAN0 only. Luckily my boss already invested in a makefile to rebuild netburner.lib inside my project I was able to adapt canif.cpp for both controllers. I'll send Netburner a copy of my canif.cpp, maybe they can make it available on request and/or implement in an updates NNDK for the MOD54415.

Happy CANopen interfacing and with regards,

Hans van Herwijnen

PS if you have any questions, just PM me
User avatar
dciliske
Posts: 624
Joined: Mon Feb 06, 2012 9:37 am
Location: San Diego, CA
Contact:

Re: MOD54415 CAN bus works like a charm IF

Post by dciliske »

Oh, the irony... 2.6.2 adds a multican driver specifically for this problem...

-Dan
Dan Ciliske
Project Engineer
Netburner, Inc
User avatar
pbreed
Posts: 1087
Joined: Thu Apr 24, 2008 3:58 pm

Re: MOD54415 CAN bus works like a charm IF

Post by pbreed »

The current beta has a driver
look at

nburn\mod5441x\include\multican.h
or nburn\nano54415\include\multican.h
Post Reply