Hi,
I try to write values in the LPC2138 flash, but after IAP call, my software is executing very, very, very slow, slower than running without PLL. I have the same behaviour when only erasing a sector.
Using google, I foud a lot of exemple, but also contradictive infos:
-
PLL settings: some says it must be off, but I found examples for full speed CPU (using CCLK)
-
Supervisor/System mode: ???
My system is running Freertos and I disable/enable interrupts by changing bits in CPSR register.
The 32 bytes on top of ram needed by IAP are not usable. I removed them in the .LD file
The flash sectors are declared in the .LD file and my flash variables are located using a compiler directive. Everything is ok.
Using Eclipse and OpenOCD, I stepped in the code and found that writing is working. My values are in the flash, I can re-read them restarting the code. Same for erasing, all bytes are returned to 0xFF.
I then tried to disable the PLL, write or erase, re-enable the PLL. The flash contains my values, but CPU still very slow.
Before I decide to use the SD card, has anyone an idea or tips ???
Angelo