Bootloader corruption (2550)

Coding and general discussion relating to user created compiler modules

Moderators: David Barker, Jerry Messina

Post Reply
User avatar
xtrabit
Posts: 23
Joined: Tue May 03, 2016 10:04 am

Bootloader corruption (2550)

Post by xtrabit » Mon Jan 09, 2017 10:00 am

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,)
"See God, then brake" -Kevin Schwantz

Jerry Messina
Swordfish Developer
Posts: 1237
Joined: Fri Jan 30, 2009 6:27 pm
Location: US

Re: Bootloader corruption (2550)

Post by Jerry Messina » Mon Jan 09, 2017 12:13 pm

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?

User avatar
xtrabit
Posts: 23
Joined: Tue May 03, 2016 10:04 am

Re: Bootloader corruption (2550)

Post by xtrabit » Mon Jan 09, 2017 1:30 pm

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
"See God, then brake" -Kevin Schwantz

User avatar
xtrabit
Posts: 23
Joined: Tue May 03, 2016 10:04 am

Re: Bootloader corruption (2550)

Post by xtrabit » Mon Jan 09, 2017 1:36 pm

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.
"See God, then brake" -Kevin Schwantz

User avatar
xtrabit
Posts: 23
Joined: Tue May 03, 2016 10:04 am

Re: Bootloader corruption (2550)

Post by xtrabit » Thu Jan 12, 2017 12:57 pm

Any ideas?
"See God, then brake" -Kevin Schwantz

Jerry Messina
Swordfish Developer
Posts: 1237
Joined: Fri Jan 30, 2009 6:27 pm
Location: US

Re: Bootloader corruption (2550)

Post by Jerry Messina » Thu Jan 12, 2017 2:14 pm

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.

Post Reply