Load Google Translate I need the program my PIC32 but i cannot erase the last program, when i put for program have this message below.
When received the new chip I can program first time it works, but when i program it again have that´s problem.
MPLAB VERSION 8.66
ICD0300: Can't read code protected device.
ICD0275: Programming failed.
That´s my fuses below:
#pragma config FPLLODIV = DIV_1, FPLLMUL = MUL_20, FPLLIDIV = DIV_2, FWDTEN = ON , FPBDIV = DIV_1, POSCMOD = XT, FNOSC = PRIPLL, CP = OFF, WDTPS = PS16384, BWP = OFF, FCKSM = CSECME
// WDT - WatchDog Timer, code protect, postscaler 16384, bootflash protected, clock switch e monitoring enabled
CP = Code Protect = OFF
BWP = Boot Flash Write Protect = Writable
I buyed chip PIC32 with the AVNET USA with batch 1134WME and 1123GMU that´s I cannot erase but i have others with batch 10265J7 that erase with sucess; what F**** happens?
When the chip new I can program once
Somebody know about some problem for using ICD2 for this PIC32 or needed buy the ICD3 for this work?
Somebody can you help me?
Regards
Thanks
Hi,
Can you show your electronic schematic to make sure PIC32 environment is right ?
What is the power supply of your system ?
How long is your ICD2 ICSP cable ?
The earlier ICD2 had 30cm cables which were too long. More recent ones are 15cm long. It is necessary because 30cm is toolong for PIC32.
Moreover, it is highly recommended to use ICD3 because flshing time is 10 to 15 times faster...
It takes about 3,30mn to program a 512KB PIC32 with ICD2 and only 15s with ICD3...
Regards
Salutations
Thanks for reply
Yes I'm using for programing the PGC2 e PGD2, because the PGC1 and PGD1 I´m using for blink led on my circuit, below the process complete.
Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to target
Target Device PIC32MX360F512L found, revision = Rev 0x50900053
...Reading ICD Product ID
Running ICD Self Test
...Passed
MPLAB ICD 2 ready for next operation
Erasing Target Device...
...Erase Succeeded
MPLAB ICD 2 ready for next operation
Blank Checking...
...Loading Program Executive
...Device not blank
MPLAB ICD 2 ready for next operation
Programming Target...
...Validating configuration fields
...Erasing Part
...Loading Program Executive
ICD0300: Can't read code protected device.
ICD0275: Programming failed.
MPLAB ICD 2 ready for next operation
Cleber
Analyzing the Microchip application notes found in AN has a review J DS61145J Witch Added a new to the process step 4 to erase the target device in Section 9.0 "Erasing the Device." Maybe that's what is happening, but I do not know how to solve this, I believe the ICD 3 is already ready for programming.
Somebody know about that review ?
what I must do without buy to ICD 3?
Cléber
HI;
You must buy The ICD3 for solve this problem, I buy and test OK.
Thanks for help.
Hi,
Which PIC32 do you use ?
You need to be careful with configuration bits. Many 16bits and 32bits PIC have several pairs of ICSP pins.
Also oscillator selection through configuration bits must be done carefully.
I did not see in your configuration bits the selection of ICSP pair 2 ?
If the wrong oscillator option is chosen or the wrong ICSP pair, then, just after programming the device it fails when starting.
In 95% of the cases, if initial connection was OK the reason is bad configuration bits...
Regards
Hi;
Yep, on the first answer i don't put the complet fuses below have complet now.
#pragma config
1º - USERID,
2º - FPLLIDIV = DIV_2,
3º - FPLLMUL = MUL_20,
4º - FPLLODIV = DIV_1,
5º - FNOSC = PRIPLL,
6º - FSOSCEN = OFF,
7º - IESO = OFF,
8º - POSCMOD = HS,
9º - OSCIOFNC = OFF,
10º - FPBDIV = DIV_1,
11º - FCKSM = CSECME,
12º - WDTPS = PS16384,
13º - FWDTEN = ON ,
14º - DEBUG = ON,
15º - ICESEL = ICS_PGx2,
16º - PWP = OFF,
17º - BWP = OFF,
18º - CP = OFF
But the problem was that Microchip inserted a further step toward erasing routine in chips made in 2011 to make the erasing. When I download the frimware for the new chip with the frimware the first time everything works fine but when I turn out to record another firmware it can not erase more. Then the chip is useless for me when I use the ICD2. But I purchased the ICD3 and with it everything works fine.
Thanks for help
Cléber
© 2009 Premier Farnell plc. All Rights Reserved
Premier Farnell plc, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE