erase sector does not erase completely

Hi everyone,

I am having a strange problem with openocd flash erase_sector command. If I erase each sector individually it works fine. If I erase a group of sectors using the following command only the first sector in the list gets erased.

For e.g.

flash erase_sector 0 131 132

erased sectors 131 through 132 on flash bank 0 in 0.068296s

I do not get any errors but if I check only sector 131 is erased. But as I said I can individually erase sector 131 and 132 using

flash erase_sector 0 131 131

flash erase_sector 0 132 132

The board has a iMX27 processor connected to spansion NOR flash using cfi interface.

Any help/suggestion is welcome.

Thanks,

Harish

Could you provide a full debug log?

openocd -d3 -lopenocd.log …

Cheers

Spen

Thanks Spen for the reply. Please find the attached log.

Mmm slight debug log overload i think.

Can you turn off the DEBUG_USB_COMMS and just include the std debug info.

Have you tried any other adapter as the jlink support is not as mature as say the ftdi based adapters.

Cheers

Spen

Unfortunately I don’t have any other adapters to try. I am attaching the log with DEBUG_USB_COMMS and DEBUG_JTAG_IO disabled. Hope this has information you are looking for. Thanks again Spen.

Harish

Nothing looks incorrect, my only suggestion is to try the latest openocd from git.

If you have time it may also be worth stepping through the cfi_erase code.

If that still fails then send an email to the dev mailing list, as someone may have an answer:

https://lists.berlios.de/mailman/listin … evelopment

Cheers

Spen