erase 18F2580 fail

For E-blocks user to discuss using E-blocks and programming for them.

Moderators: Benj, Mods

Post Reply
pbosmans
Posts: 6
Joined: Fri Feb 10, 2006 10:41 am

erase 18F2580 fail

Post by pbosmans »

Erasing the 18F2580 always fail with ppp V3.9.12.26.
The autodetect of the 'configure picmicro' work well, he detects the correct chip.
I've programmed the chip ones (with a good verify), then after a change in the source i created a new hex-file and programmed the chip. Now i get an verify error message. Erasing the chip, just before programming failed.
So i will explicity erase it by the PPP-program, and this will always fail. Even when i change the chip by another one.
Erasing a 16F88 works well, no problem at all. But when i change the chip to 18F2580, erase still fails.
I don't know anything about the erase-algorithm, can anybody help me on this ?

I've got an EB006-00-5 board.
The hex files are generated by MPLAB.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: erase 18F2580 fail

Post by Benj »

Hello

If the hex files are coming from MPLAB then are you exporting after compiling to allow the configuration settings to be embedded into the hex file? You can see the config settings via the Configure -> Configuration bits and export via the File -> Export Menu.

It is possible that your configuration settings or lack of them have put the chip into lockdown mode which stops the device from being erased or from updating the flash memory. There is no going back on this if this is the case.

One thing you can try is to take a copy of your ppp_config_data3.cfg file located in the main PPP program folder and then overwrite it with the file located in the attached zip archive. If this doesn't help with erasing then you will need to go back to the old config file and then try replacing the target device to ensure it has not become locked.

Let me know how you get on.
Attachments
ppp_config_data3.zip
(60.84 KiB) Downloaded 310 times

User avatar
Steve
Matrix Staff
Posts: 3433
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: erase 18F2580 fail

Post by Steve »

In the PPP options page, you can manually override the Vdd switching options. Doing this may help, so please try each of the 3 options when erasing the chip to see which one works for you.

pbosmans
Posts: 6
Joined: Fri Feb 10, 2006 10:41 am

Re: erase 18F2580 fail

Post by pbosmans »

Thank you very much for the attachment. It solved my problem.

You scared me about the lockdown mode, to be sure i never end in this mode, which bits of the configuration can cause this lockdown mode ?

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: erase 18F2580 fail

Post by Benj »

Hello

The configuration settings that can cause the chip to stop reprogramming if enabled are as follows.

Code Protect - Stops the flash program memory being overwritten.
Data EEPROM Code Protect - Stops the EEPROM memory being overwritten.
Boot Block Code Protect - Same as Code Protect but for lower address space eg if you want to use a locked down bootloader.
Config Write Protect - Stops the configuration values being changed.
Table Read Protect - Stops the chip from having read access to its flash memory.
Table Write Protect - Stops the chip being able to overwrite its flash memory.

When developing code it is normally a wise option to disable everything that is not directly being used by your application. It is also good practise to check that your configuration settings are correct before sending a new program to a device.

User avatar
Steve
Matrix Staff
Posts: 3433
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: erase 18F2580 fail

Post by Steve »

I don't think there will be a situation where you can not erase and reprogram the device. Even with these setting on, you should be able to erase it. But you will not be able to read the program back to see if the device has been programmed successfully.

Post Reply