CAN Bus "Bus-Off error" EMX

I’m using the EMX module to communicate to another device (LPC11C14). It worked on using the EMX Dev board. I now built my own hardware using a MCP2551 transceiver. On my board it does not work.

When I try to send a message it goes to BusOff error immediately. I measured to see if there is data out from the EMX module’s CAN TD1 pin and I get a single “pulse” but on the CAN RD1 pin there is no “pulse”, and if I am not mistaken CAN monitors the RD pin while transmitting.

I can however receive data from the LPC11C14 chip. I used the exact same circuit for the CAN transceiver on the EMX board as I have used on the LPC board.
EMX PIN23 to MCP PIN1
EMX PIN25 to MCP PIN4
MCP PIN2 to GND
MCP PIN3 to 5V
MCP PIN5 left open
MCP PIN8 to 10k to GND

I have a 120 Ohm resistor at either side of the BUS.

I know it is not the code as it works perfectly on the DEV SYS. And I can’t see anything wrong on the hardware side.

Is there anything I can look at that I might have missed?

Any help is greatly appreciated.

Hi Andre,

Thanks for the reply although not very helpful.

Anyway, I never said that there is nothing wrong on the hardware side. I said that “I CAN’T SEE ANYTHING WRONG”. Was hoping that there is something that I missed that somebody else might have dealt with before.

Any real help is still appreciated.

My understanding of my problem was that it was hardware related from the start.

Yes, it works LPC to Dev Sys. But with exact same code my hardware does not work. I will upload schematic tomorrow. Like I said I was hoping someone could point out something silly that I missed.

The MCP2551 transceiver should be ok, i use the same, the pin layout is also ok.
But I have a simmilar problem with a can test setup and the G120HDR (http://www.tinyclr.com/forum/topic?id=11220)
did not have a solution yet, i’m rebuilding my test setup in the next day’s to sort this out.

You said you have used the same layout as the dev board. On the dev board the RS input is connected to ground for high speed mode. You have a 10K resistor which gives a very slow slope control.

What bus speed are you using?

If I am correct, 10K with a high bus speed will tend to give you errors. I saw this with a design years ago. I ended up just connecting RS to ground to get it reliable. Admittedly this was in an application where EMC was not a problem (underwater vehicle) :o)

Just a thought.

Dave…

Dave,

I have tried that as well with no success. My bus speed is very low anyway, 125k. And my layout is not the same as the Dev Sys. I’m using a MCP2551, The Dev Sys uses an SN65HVD230. My layout on the EMX based board is however the same as on my other embedded board (with an LPC11C14) which also has a 10k on the RS pin.

David,
I’m glad to see that I am not the only one with this problem, which makes me wonder, hardware is “fine” software is working, but the combination of the two is giving problems.

I’m going to play around with it today to hopefully get it fixed.

I got it working.

I replaced the MCP2551 with the SN65HVD230 (removed from my DEV SYS). It works perfectly now. I did try a different MCP2551 first (In case I broke my first one) and that did not solve the problem.

Has anybody else ever got the EMX to work with a MCP2551?

Does any GHI engineers have any idea why the MCP2551 might not work?

Out of curiousity, have you tried the MCP2551 with RS tied low?

Dave, Yes I have, with no change in results.

Strange. I have used the MCP2551 for many years and intermixed with the SN65HVD230 and PCA82C250 transcievers and all worked well even at 500Kbps.

Hang on. I just spotted it after downloading the SN65HVD230 datasheet.

The MCP2551 is a 5V device and the SN65HVD230 is a 3.3V device. I’ll bet you a few beers this is why it don’t work.

:o)

Have you used MCP2551 on EMX based design?

I’ve only used MCP2551 exclusively in all my designs, until now. First time ever that I’ve encountered a problem with CAN.

Yes, but like I said, it works on another design that is also based on a 3.3V processor. And I replaced the MCP2551 with the SN65 still powered from 5V (Supports up to 6V).

High level and low level input on both devices are the same (2V and 0.8V). So it should not be a problem.

What voltage is your EMX running at? Sorry, not familiar with that module.

With the MCP2551 fitted, did you see the transmission on pin 1 appear on the actual CAN bus? You said there was no output on pin 4 which would indicate that there was nothing so just want to check what you were seeing.

I had to change from using the MCP2551 on a 3.3V processor because I was seeing too many errors. When I changed to the SN65HVD230 I got good data.

The EMX is running at 3.3V. No Transmission on Pin1 (basically just a single pulse) and then the busoff error. My comm speed is very slow (125k) so haven’t seen any errors on the other systems.

The MCP however is powered from 5V, the processor pins are 5V tolerant.

Did you perhaps power your MCP from 3.3V?

I just hooked up a EMX Dev board with a MCP2551 for CAN2 and wired the CH and CL from 2 back to CAN1.
Basic sending and receiving in both direction works just fine.

Great. Now I’m stumped. I have no idea what else it could have been.
At least I got it working.

Any chance to post part of your schematic?

Here it is. The important parts, anyway.

Looks like you use Altium Designer (Protel) :slight_smile:

Your EMX module is being powered by 3.3V and the MCP2551 is 5V.

In theroy, the 3.3V should be enough to drive the MCP2551 as you state but you are not seeing anything.

Putting in the same IC as the dev board works but then again, this is a 3.3V capable device.

Looking at the datasheet for the MCP2551 I am sure that the 5V is an issue. Check page 9 and you will see that the CANH and CANL are only active when the transmit input is greater than 3.8V. This would confirm why you are not seeing anything on the bus when using 3.3V logic. The SN65HVD230 is 2V from what I can see.

Hope this helps?

Dave…
PS. One thing I don’t see on your schematic is decoupling on the supply at the IC. I am assuming that this is located elsewhere on the design and just not shown in your image you posted? You would be surprised at what works and doesn’t work with this missing. Anyway, I believe you have these.