I am writing a boot loader again for the C8051F930 processor. I have done this before. The problem is now the current chips that I have (I have tried several) will not erase from code the code flash page 0 (0x0000 to 0x03FF). The rest of the code pages I am trying to erase will erase just fine. It is only code flash page 0 that does not erase. I can erase code page 0 with the USB Debugger C2 interface. So, page 0 of the code flash will erase, just not from code. But since all of the interrupt vectors are in low memory I really need to erase page 0 when loading new code.
Any help would be appreciated.
I see really no limitations here: https://www.silabs.com/documents/public/application-notes/AN201.pdf Other then the Flash Timing Section, which i assume you must be following.
Regards,
Hello Robert,
I have had app note AN201 for many years. I have written boot loader code for this processor for two different projects in years past. I find nothing in any documentation to explain this new problem
Now I have a 3rd project that needs a boot loader. Just starting the boot loader code and I found that code page 0 is not erasing. I have tried many things to make it work. I have tried erasing page 0 first, then the other pages. The other pages all erase, but not page 0. I have tired erasing the other pages first and then erasing page 0. No dice. I have tried writing to several different locations in page 0 to trigger the erase (0x0000, 0x0001, 0x0100, 0x03FF…) none of them work. The fact that I am able to erase the other pages confirms that I have the correct sequence for erasing a code page. Please see attached.
I am not getting a reset when I try the erase, so it is not a Vdd problem.
Page 0 erases just fine with the C2 interface, so it is not that code page 0 cannot erase.
I have tried this on multiple boards (processor chips), so it does not appear to be a hardware problem.
I am not sure what to try next. It seems like the new processors are not working the same as the old processors worked in respect to allowing the code to erase code page 0. I have started looking around the shop to see if I have one of the old projects where the boot loader worked as a test of an older processor. Older meaning a C8051F930-GM instead of the current C8051F930-G-GM.
So, I think my problem is real. Not a figment of my imagination. But I have not found any documentation to suggest anything is now special about erasing code page 0.
(attachments)
Flash erase problem 250508.asm (922 Bytes)
(removed contact info from email repy to forum)
Hello All,
I have a workaround to this problem. In the page zero fixed vector address locations I have placed LJMPs to a new vector table starting at location 0x400. This way my vectors in page 0 are fixed and do not need updating with new code. Since I can erase and reprogram at 0x400 and up this solves the problem of not being able to erase page 0 from my boot loader code.