[sdiy] destroying flash memory cell on a PIC
Roman Sowa
modular at go2.pl
Wed Mar 17 11:55:41 CET 2021
Hi,
I was recently playing with PIC18 self-write and encountered strange
problem. I can't be sure if it was because of my multiple write attempts
(not that many of them) or it is extremely bad luck, but the
microcontroller in question (PIC18F46K22) shows stange fault. About 20
of flash memory bytes are showing 00 even if that range was not
programmed. It is FF after bulk erase, but after programming even
several kilobytes below, they read as 00.
There's a pattern - they are all on 10-bit boundary, so it's address
400, 800, C00 and so on till FC00. To look even more strange, it's not
all, but randomly few bytes fitting that pattern work OK.
It happens either if I program it as self-write, or if using ICD3.
Have anyone ever encountered this problem?
After thousands of PICs used so far I have never encountered flash
error. OTOH, I have never used self-write before, but despite looking
like obvious coincidence I can't see a reason why self-write would
damage a memory cell, or address decoder. Chip errata does not mention
anything about memory precautions.
Maybe I'm doing this too fast? The 64-byte page write is initiated just
a couple of us after page erase is finished. This shouldn't be a problem
but maybe worth trying to put 2-3ms delay.
Thanks for your help!
Roman
More information about the Synth-diy
mailing list