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 support@ccsinfo.com

Stange PIC behaviour - Help needed

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



Joined: 22 Oct 2006
Posts: 3
Location: Belgium

View user's profile Send private message Send e-mail Visit poster's website

Stange PIC behaviour - Help needed
PostPosted: Sat Mar 03, 2007 4:00 am     Reply with quote

Hi Everybody,

I have an application with multiple boards on a CAN network (56 nodes). It works well during several days but sometimes there is one board, always the same, for which the processor stop responding.
If I try a reset by holding MCLR low, nothing happens. The only way to restart is to switch power off and then on.

What could it be ? What do you think of it ?

Configuration info:

* PIC 18F2585
* MCLR not enabled as digital input
* Oscillator: 4MHz crystal with HSPLL
* Compiler: (3.236 / 4.023) I first thought of a software problem... but changing the software did not change anything; moreover, I have more than 100 boards with the same firmware running and I have no problem.
* Watchdog: enabled (in software at the beginning of the code)
* Hardware:
2 software I2C buses (50 kHz) to MCP23008 I/O extensions
1 hardware I2C bus (400 kHz) to serial EEPROM 24LC128
1 hardware RS232 for configuration with a laptop PC
1 internal CAN bus driver with MCP2551 transceiver

Waiting for your advices.
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

Re: Stange PIC behaviour - Help needed
PostPosted: Sat Mar 03, 2007 6:44 am     Reply with quote

JPA wrote:
I have an application with multiple boards on a CAN network (56 nodes). It works well during several days but sometimes there is one board, always the same, for which the processor stop responding.
If I try a reset by holding MCLR low, nothing happens. The only way to restart is to switch power off and then on.

What could it be ? What do you think of it ?
With this many units and always the same one failing it sounds more like a hardware problem than a software problem.
The reset function failing is very strange, can you provide more details on this? What does the circuit look like connected to the MCLR pin? You say you held the MCLR pin low, how exactly did you do this?

Which silicon revision of the chip is used on this particular board, and is it the same as on the other boards?

Maybe there is a problem with the power supply at that location? What happens when you swap two boards, is the same board still failing?

From the Microchip errata sheet for silicon revisions A1 and A3:
Quote:

23. Module: DC Characteristics (BOR)
The values for parameter D005 (VBOR) in
Section 27.1 “DC Characteristics: Supply
Voltage” of the Device Data Sheet, when the trip
point for BORV1:BORV0 = 11, are not applicable
as the device may reset below the minimum
operating voltage for the device.

Work around
None.

Date Codes that pertain to this issue:
All engineering and production devices.

24. Module: BOD/HLVD
Due to production tolerances, selecting the lowest
setting for Brown-out Detect (BORV1:BORV0 = 11)
or Low-Voltage Reset (LVV = 0000) is not recommended,
since it may result in an actual Brown-out
Reset or Low-Voltage Detect below the minimum
allowable VDD of 2.0V.

Work around
Use the next highest BOD or HLVD voltage threshold
to ensure a low VDD is detected before it drops
below 2.0V.

Date Codes that pertain to this issue:
All engineering and production devices.
Regarding this errata, are you using the setup_low_volt_detect() function? If yes, than don't use it in combination with the LVD_21 parameter, but use LVD_22 or higher instead.

Make sure you set brownout fuse BORV28 or higher, don't select BORV21 (default when no fuse specified).
JPA



Joined: 22 Oct 2006
Posts: 3
Location: Belgium

View user's profile Send private message Send e-mail Visit poster's website

Re: Stange PIC behaviour - Help needed
PostPosted: Sat Mar 03, 2007 8:50 am     Reply with quote

Hello, thanks for your reply,

Concerning brownout voltage, it is set to 4.5V. The measured voltage on PIC when freezed is 4.98 so it should be Ok.

I do not use setup_low_volt_detect() function.

All PIC have the same revision (moreover, when I change processor with a new one, different revision, I still get the same problem - That is why I also suspect a hardware problem but do not know which).

The MCLR pin is connected to the Vdd with a 1k resistor. When the PIC hangs up, I make a connection between MCLR and Vss but nothing happen (in normal operation mode, the PIC resets immediately).

I also think about a hardware problem but, once powered off and then on, the board is Ok for many hours.

Is it possible that, for some reason, the oscillator stops working ?
When I stop manually the oscillator (by setting OSC1 input to Vss on a similar board) I get the same behaviour. Perhaps should I try the FSCM (fail safe clock monitor)

I have not yet changed the board (only the processor has been replaced) but I think that what I will do next, so I will be able to analyze and monitor this board in my lab.

Thanks for your help
Ttelmah
Guest







PostPosted: Sat Mar 03, 2007 2:13 pm     Reply with quote

At heart, I'd suspect a board fault, or faulty crystal, leading to a capacitive coupling in the oscillator area. The coupling must be just borderline to keep the oscillator going, but if it stops, because of the AC coupling, it won't restart. Removing power, provides the AC 'kick' needed to restart the oscillator (which MCLR won't give).

Best Wishes
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