Content originally posted in LPCWare by v0ynich on Thu Feb 26 06:52:41 MST 2015
Thank you for your response
After changing the argument from 96000 to 12000 the "compare" command returns "compare_error" right after the first page. After dumping the flash, I can confirm the first page is indeed badly programmed. Some of the words are wrong.
Am I supposed to perform the "init" command only one time or every time I do a "prepare to write" ?
I tried both ways and noticed exactly the same behaviour.
Thank you
EDIT:
After making sure the clock is 12 Mhz by using the following code:
iap_regtmp = *((uint32_t *)0x4005006C);
iap_regtmp &= 0xE0FFF7FE;
iap_regtmp |= 0x01000000;
*((uint32_t *)0x4005006C) = iap_regtmp;
*((uint32_t *)0x40050044) |= 0x00000001;
and setting the write, erase, etc,, argument as 12000, the whole process behaves as described in the first post...
Ideas?
Thanks