View previous topic :: View next topic |
Author |
Message |
tolliug
Joined: 09 Aug 2018 Posts: 15
|
PIC18F46K80 and mcp2561 |
Posted: Thu Aug 09, 2018 10:46 am |
|
|
Hi everyone, I am observing a strange thing using a custom board and mcp2561. On a subset of 2 boards over 10, the following phenomena occurs. If I plug the GND after VCC these two boards fail at sending CAN frames. However can_putd does not return O. Tx is high. If I plug GND first all is ok.
Do you have any advice? (no pullup were inserted on Rx Tx line). |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19552
|
|
Posted: Thu Aug 09, 2018 11:19 am |
|
|
Seriously, if you connect Vcc before GND, on a board that has a signal wire also attached, then the transistors in the output drives will be reverse biased. Depending on their design, this could cause them to become locked up....
This is why cables for kit expecting to be hot plugged are designed so the GND connection makes first. |
|
|
tolliug
Joined: 09 Aug 2018 Posts: 15
|
|
Posted: Thu Aug 09, 2018 11:39 am |
|
|
The thing is that the devices are connected to standard M12(5pins) connectors. I observed the same lock while switching on the power supply. I decided to change the board to investigate in the office and in the office all was perfect the only way to reproduce was by connecting VCC first. In automotive, devices are protect against that bug (I don't really know how this is achieved). |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19552
|
|
Posted: Thu Aug 09, 2018 10:59 pm |
|
|
Lets ask a silly question!.
Get a magnifying glass and check the transceivers are 2561's. Just a 'horrid thought', that you have been sent some 2551's instead!. These had 'issues'.... |
|
|
tolliug
Joined: 09 Aug 2018 Posts: 15
|
|
Posted: Fri Aug 10, 2018 1:20 am |
|
|
This could have been the issue but no, parts are well mcp2561E. I am already aware about ESD issue with MCP2551. Now the questions are, may I solve the issue in a software manner (how to know that CAN engine is locked? and how to unlock it?) and if there's no software solutions, how to enhance the design to avoid this? |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19552
|
|
Posted: Fri Aug 10, 2018 1:41 am |
|
|
Obvious thing would be to send a CAN message to yourself.
If you don't receive this, the bus is hung.
You can then try disabling the CAN peripheral and re-initialising it. However if the hang is actually a gate locked up somewhere either in the peripheral or the transceiver this won't recover it.
Do you have an ESR protection on the bus?.
Normal technologies are TVS devices, common mode chokes, and split termination. TVS devices in particular might help this particular problem. |
|
|
tolliug
Joined: 09 Aug 2018 Posts: 15
|
|
Posted: Tue Sep 04, 2018 10:00 am |
|
|
Ok I am back from holidays, tomorrow I will try to restart the can peripheral and will let you know. I hope this will help (the strange thing is that the problem occurs only on 2 board over tens). |
|
|
tolliug
Joined: 09 Aug 2018 Posts: 15
|
|
Posted: Thu Sep 06, 2018 6:09 am |
|
|
When the problem occurs, the reception of messages does not work neither. I do not succeed to enable a loopback mode is there any tutorial? |
|
|
tolliug
Joined: 09 Aug 2018 Posts: 15
|
|
Posted: Fri Sep 07, 2018 7:25 am |
|
|
Weird changing the transceiver by hand soldering seems to solve the problem... |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19552
|
|
Posted: Sat Sep 08, 2018 2:43 pm |
|
|
Interesting. I was very suspicious of a fault in this chip, sounds as if you may have received some faulty examples. :( |
|
|
tolliug
Joined: 09 Aug 2018 Posts: 15
|
|
Posted: Wed Sep 12, 2018 1:48 am |
|
|
I changed the transceiver on a second unit but problem still occurs, less often but still there. I rechecked the transceiver and Rx toggle properly however the pic does not seems to see anything. I will go on about these investigations however I do not succeed to enable loopback mode after configuration and a minimal code sample would be very helpfull. if anyone has something like that... |
|
|
|