Page 1 of 1

Bootloader corruption (2550)

Posted: Mon Jan 09, 2017 10:00 am
by xtrabit
Hi, i am using Jerry Messina's USB resources and bootloader. Sometimes my PIC just fail to load. I've never recreate problem myself, but some customers repeatedly came back with broken PICs.

PICKit 2 can't recognise that broken PICs, but plugging after a new PIC, PicKit2 can erase the broken PIC and i can use it. Looks like software at the PIC is getting corrupt. I've sent brand new PIC's to these problematic customers, all of them corrupted after 1-2 days. Then i removed the bootloader, they no longer break.

Why that happens? Any ideas?

(Sorry for bad English,)

Re: Bootloader corruption (2550)

Posted: Mon Jan 09, 2017 12:13 pm
by Jerry Messina
I can't say I've seen it do this, but maybe others have.

I'm not sure what would keep the PICKIT2 from seeing the chip. What are your CONFIG settings, and how are you using the MCLR, RB6, RB7 and RB3 pins?

Re: Bootloader corruption (2550)

Posted: Mon Jan 09, 2017 1:30 pm
by xtrabit
Here is my config.

Code: Select all

    FOSC = HSPLL_HS,
    PLLDIV = 5,
    CPUDIV = OSC1_PLL2,
    USBDIV = 2,
    FCMEN = OFF,
    IESO = OFF,
    PWRT = ON,
    BOR = OFF,
    BORV = 2,
    VREGEN = ON,
    WDT = OFF,
    WDTPS = 2048,
    CCP2MX = OFF,
    PBADEN = OFF,
    LPT1OSC = OFF,
    MCLRE = OFF,
    BOR = ON, 
    CPB = ON, CP0 = ON, CP1 = ON, CP2 = ON, CP3 = ON

Re: Bootloader corruption (2550)

Posted: Mon Jan 09, 2017 1:36 pm
by xtrabit
Jerry Messina wrote:I can't say I've seen it do this, but maybe others have.

how are you using the MCLR, RB6, RB7 and RB3 pins?
All these pins are NC. Just using USB and only RA0 is for input. MCLR connected to positive.

Re: Bootloader corruption (2550)

Posted: Thu Jan 12, 2017 12:57 pm
by xtrabit
Any ideas?

Re: Bootloader corruption (2550)

Posted: Thu Jan 12, 2017 2:14 pm
by Jerry Messina
Not really.

You might try adding/changing these config settings and see if that helps any:

Code: Select all

config
    BOR = ON,           // Brown-out Reset enabled in hardware only (SBOREN is disabled)
    BORV = 3,           // Setting 2 4.33V
    MCLRE = ON,         // MCLR pin enabled; RE3 input pin disabled
    LVP = OFF           // Single-Supply ICSP disabled
You'd add them to the bootloader setup since normally the config bits aren't reprogrammed by loading a new app.