[En-Nut-Discussion] IAP Api proposal, was: Re: nvmem problems with STM32F103

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Sat Jul 20 16:10:46 CEST 2013


>>>>> "Ole" == Ole Reinhardt <ole.reinhardt at embedded-it.de> writes:

    Ole> Hi Uwe,

    Ole> The LPC does only allow to write 256 | 512 | 1024 | 4096 at
    Ole> once. Single byte writes are not allowed. So a single byte access
    Ole> would need to be simulated.

I  looked at the LPC17xx user manual. It doesn't expose the Flash controller
registers directly, only high level Flash access routines in ROM are
provided. The "Copy RAM to Flash" routine doesn't have an error "Sector not
erased", so at least you can _try_ to overwrite Flash data with that routine
without explicit sector erase before.
To be clean:
Flash overwrite won't be able to change the patter 0x55555555
in flash to 0xaaaaaaaa. But for STM, it can change any data to the
complement of the erased pattern, and I guess the same holds for LPC.
Most flash will have an erased pattern of 0xffffffff, but STM32L1 has 0, so
to be able to overwrite already written flash, the IAP API probably should
also expose the erased pattern.

Bye
-- 
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------


More information about the En-Nut-Discussion mailing list