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

Some Old Chips are failing

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



Joined: 03 Dec 2013
Posts: 215

View user's profile Send private message

Some Old Chips are failing
PostPosted: Wed Oct 21, 2015 3:15 pm     Reply with quote

I have a few old units using the PIC18LF6720 chips that are losing the program.
Unfortunately the chips were protected so I can't read them to see what exactly got lost or corrupted.

The code uses a fairly normal bootloader, and most of the time boot loading the code cures the problem, and hardware reprogramming also works but if a chip messed up it will also mess up again.

Replacing the chip cures the problem.

I did a fair amount of investigation when this first happened. I had suspicions about Vdd rise time.

Power On rise time is fast: slope to 3.3(V)/462*10^-6(sec) = 7142 V/sec = 7.142 V/mS which is about 150 times faster than the minimum required slope of 0.05 V/mS and MCLR circuit is really not needed.

The MCLR does have the classic RC as shown in most PIC data sheets.
I even tried a reset generator. Of course it may not have anything to do with Vdd rise time or MCLR.

The PUT fuse is set and I've tried not using any MCLR at all.

Nothing seems to help, if a chip first starts losing the code it continues.

Has anyone else had failures of this kind, and if so was there a reason it ?
temtronic



Joined: 01 Jul 2010
Posts: 9221
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Oct 21, 2015 6:15 pm     Reply with quote

Since you can't read them you really don't know that they've 'lost their program'. Now a 'messed' up PIC can be reprogrammed but 'messes' up again indicates to me a possible 'bad memory' problem, perhaps caused by EMI, creating a bad cell or two within the program space.
If 'new' PICs does 'cure' the problem, look at the batch numbers ( production dates) to see if all the 'bad'' PICs are the same batch.

Jay
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

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

Re: Some Old Chips are failing
PostPosted: Wed Oct 21, 2015 7:50 pm     Reply with quote

soonc wrote:
I have a few old units using the PIC18LF6720 chips that are losing the program.
Unfortunately the chips were protected so I can't read them to see what exactly got lost or corrupted.

The code uses a fairly normal bootloader, and most of the time boot loading the code cures the problem, and hardware reprogramming also works but if a chip messed up it will also mess up again.

Replacing the chip cures the problem.

I did a fair amount of investigation when this first happened. I had suspicions about Vdd rise time.

Power On rise time is fast: slope to 3.3(V)/462*10^-6(sec) = 7142 V/sec = 7.142 V/mS which is about 150 times faster than the minimum required slope of 0.05 V/mS and MCLR circuit is really not needed.

The MCLR does have the classic RC as shown in most PIC data sheets.
I even tried a reset generator. Of course it may not have anything to do with Vdd rise time or MCLR.

The PUT fuse is set and I've tried not using any MCLR at all.

Nothing seems to help, if a chip first starts losing the code it continues.

Has anyone else had failures of this kind, and if so was there a reason it ?


I had a similar problem yes ago with the 5 volt PIC18F controllers. The problem in my case was that I had the BROWN-OUT set too low. The result was the PICs crashed at low battery voltage and overwrote their own code space. Increasing the BROWN-OUT voltage fixed the problem. From memory (it was a long time ago) accidentally leaving LVP enabled (a ridiculous default config bit setting) could also result in this happening.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
Ttelmah



Joined: 11 Mar 2010
Posts: 19496

View user's profile Send private message

PostPosted: Thu Oct 22, 2015 3:40 am     Reply with quote

You say it has a 'classic RC'. Is this with just one resistor?.

The 'simple' circuit, depending on the size of the capacitor, and the design of the supply, can get the MCLR pin being held _above_ the supply as it falls when you power off. On some chips this can cause a spurious programming operation to start, corrupting some cells....

There are a number of recommended circuits. The one if you use ICSP, has an extra resistor to limit the current into the MCLR pin, and allow this to be pulled high for programming. This also serves to prevent the MCLR pin being taken high during the reset operation.The 'classic' MCLR without this, is OK, on older chips, that actually use the MCLR voltage to program. On these the current required to trigger programming is high enough that it is not likely to happen, unless you have a very large capacitor. However later chips, only use the MCLR as a _reference_ to the programming generator, and the current needed is tiny. On these a method of ensuring that this does not happen accidentally is needed.
On your chip (for example), the actual current needed to start a programming operation, is only 5uA. 10mA is then drawn to actually perform the write, but it it has started, some corruption may occur even if this is not available. Also though the programming voltage is specified as 9v, it can start any-time the Vpp is more than a couple of volts above Vdd.

I was told my Microchip, that for later chips, it was _necessary_ to ensure that the circuit could not draw the MCLR significantly above Vdd, when the power was switched off, or memory corruption could occur on some chips.....
newguy



Joined: 24 Jun 2004
Posts: 1907

View user's profile Send private message

PostPosted: Thu Oct 22, 2015 6:48 am     Reply with quote

I've not observed this on PICs, but I have noticed age and batch-related failures in other ICs. We've had old Ramtron FRAMs that developed sticky bits (even though they're not supposed to - ever) and the latest issue I needed to figure out quickly involved a Si9979 3 phase brushless DC motor controller IC. I traced the problem to a certain batch code. What was happening was those batch codes would errantly run wide open/stop responding to control input.

As others have said, take a look at the date code on the PICs. If they're all the same AND you have units in the field with a different date code, I'd suspect a bad batch.
soonc



Joined: 03 Dec 2013
Posts: 215

View user's profile Send private message

Thanks for all the replies
PostPosted: Thu Oct 22, 2015 6:03 pm     Reply with quote

Ttelmah wrote:
You say it has a 'classic RC'. Is this with just one resistor?.

The 'simple' circuit, depending on the size of the capacitor, and the design of the supply, can get the MCLR pin being held _above_ the supply as it falls when you power off. On some chips this can cause a spurious programming operation to start, corrupting some cells....

There are a number of recommended circuits. The one if you use ICSP, has an extra resistor to limit the current into the MCLR pin, and allow this to be pulled high for programming. This also serves to prevent the MCLR pin being taken high during the reset operation.The 'classic' MCLR without this, is OK, on older chips, that actually use the MCLR voltage to program. On these the current required to trigger programming is high enough that it is not likely to happen, unless you have a very large capacitor. However later chips, only use the MCLR as a _reference_ to the programming generator, and the current needed is tiny. On these a method of ensuring that this does not happen accidentally is needed.
On your chip (for example), the actual current needed to start a programming operation, is only 5uA. 10mA is then drawn to actually perform the write, but it it has started, some corruption may occur even if this is not available. Also though the programming voltage is specified as 9v, it can start any-time the Vpp is more than a couple of volts above Vdd.

I was told my Microchip, that for later chips, it was _necessary_ to ensure that the circuit could not draw the MCLR significantly above Vdd, when the power was switched off, or memory corruption could occur on some chips.....

Thanks for all the replies:
Batch number:
Is really not a issue as this device has been in production for the past 12 years. a mixture of old and new unit can exhibit the problem.

Bad memory location:
Is certainly a possibility. I programmed a handful of devices with no protection and issued these to a trusted client. They have not failed in the last 3 years. So I'm still not able to confirm what location is corrupted.

FUSES: includes NOBROWNOUT and NOLVP

I just ran a few tests capturing the MCLR voltage at power OFF. It's clean and never rises above, it only decays cleanly.

I changed the RC circuit a few years ago and included the extra R1 to limit current into MCLR at power OFF.
I used 220 Ohm I guess I could increase that to 1K.

That last batch I simply ignored the C as the Vdd rise time is so fast the the data sheets implies I should not need the RC as the PUT really is good enough. Only one unit has failed since I did this, so it's not a fix.

The last item is something I may need to reconsider.
The pull up resistor from MCLR to Vdd.
I'm using 33K, and I've seen circuits use 10K to 47K ! Note Vdd is 3V3

How critical is this ?
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Thu Oct 22, 2015 6:17 pm     Reply with quote

a word about NOT_MCLR / prog pin.

I NEVER use a hardware controlled reset
for the reaon MR. T stated above.

if you don't need an external clear command input.
don't even declare the pin active.
newguy



Joined: 24 Jun 2004
Posts: 1907

View user's profile Send private message

PostPosted: Thu Oct 22, 2015 6:22 pm     Reply with quote

Depends on the noise your device has to endure. I used to use 47k pullup /MCLR to Vdd and in one of my products electrical noise caused it to spuriously reset. I dropped the pullup to 4.7k and haven't had a problem since. I did try several intermediate values but they all reset as well (the lower the R, the less often). The programmer (a CCS load-n-go) handles it, so 4.7k is now my standard pullup value.
soonc



Joined: 03 Dec 2013
Posts: 215

View user's profile Send private message

PostPosted: Thu Oct 22, 2015 7:25 pm     Reply with quote

asmboy wrote:
a word about NOT_MCLR / prog pin.

I NEVER use a hardware controlled reset
for the reaon MR. T stated above.

if you don't need an external clear command input.
don't even declare the pin active.


The data sheet says this:

"3.1 Power-on Reset (POR)
A Power-on Reset pulse is generated on-chip when
VDD rise is detected. To take advantage of the POR
circuitry, tie the MCLR pin through a 1 k to 10 k
resistor to VDD. This will eliminate external RC
components usually needed to create a Power-on
Reset delay. A minimum rise rate for VDD is specified
(parameter D004). For a slow rise time, see Figure 3-2."

Sounds like something should pull up the MCLR pin for normal operations.
As I have a very fast rise of Vdd no RC is really needed.

Of 3000 units I've had about 1% failure (too much). Of the units where I've replaced the PIC chip there have been no recurring failure. As the failure the rate is about 1% I may never see a return of any of the 30 or so units on which I've changed the PIC chip.
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

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

PostPosted: Thu Oct 22, 2015 7:28 pm     Reply with quote

soonc wrote:
asmboy wrote:
a word about NOT_MCLR / prog pin.

I NEVER use a hardware controlled reset
for the reaon MR. T stated above.

if you don't need an external clear command input.
don't even declare the pin active.


The data sheet says this:

"3.1 Power-on Reset (POR)
A Power-on Reset pulse is generated on-chip when
VDD rise is detected. To take advantage of the POR
circuitry, tie the MCLR pin through a 1 k to 10 k
resistor to VDD. This will eliminate external RC
components usually needed to create a Power-on
Reset delay. A minimum rise rate for VDD is specified
(parameter D004). For a slow rise time, see Figure 3-2."

Sounds like something should pull up the MCLR pin for normal operations.
As I have a very fast rise of Vdd no RC is really needed.

Of 3000 units I've had about 1% failure (too much). Of the units where I've replaced the PIC chip there have been no recurring failure. As the failure the rate is about 1% I may never see a return of any of the 30 or so units on which I've changed the PIC chip.


I think you should enable the brownout fuse.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
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