CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

PIC18F46K80 and mcp2561

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
tolliug



Joined: 09 Aug 2018
Posts: 15

View user's profile Send private message

PIC18F46K80 and mcp2561
PostPosted: Thu Aug 09, 2018 10:46 am     Reply with quote

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: 19549

View user's profile Send private message

PostPosted: Thu Aug 09, 2018 11:19 am     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Aug 09, 2018 11:39 am     Reply with quote

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: 19549

View user's profile Send private message

PostPosted: Thu Aug 09, 2018 10:59 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Aug 10, 2018 1:20 am     Reply with quote

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: 19549

View user's profile Send private message

PostPosted: Fri Aug 10, 2018 1:41 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Sep 04, 2018 10:00 am     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Sep 06, 2018 6:09 am     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Sep 07, 2018 7:25 am     Reply with quote

Weird changing the transceiver by hand soldering seems to solve the problem...
Ttelmah



Joined: 11 Mar 2010
Posts: 19549

View user's profile Send private message

PostPosted: Sat Sep 08, 2018 2:43 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Sep 12, 2018 1:48 am     Reply with quote

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...
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group