I am using EzPort to program bootloader to K70 MCU at factory, everything works fine if I don't set Flash security. When I attempt programming an image (srec) which has FSEC secured (tried 00 and 11 for SEC) in flash configurations, the first chunk (first 0x400 bytes) programs fine, the next chunk which has the flash configurations comes back with WriteError flag set. I have made sure the MCU is not reset at any point during programming after the flash is erased. The same srec image when I program through a JTAG programmer (P&E Micro) works fine.
If anybody can help is greatly appreciated.
Thanks for the response Mark !. I am using my own application, driving EzPort through an FTDI chip FT2232H. I never tried uTasker before, will give it a try and let you know.
Meanwhile if someone else has any point, please shoot at me.
What do you use to program via EzPort? It may be that, if it is an adapter that you have bought, the adapter doesn't allow programming security by default. You may need to configure it appropriately to allow it to be performed.
I use the following application to do it [ http://www.utasker.com/docs/uTasker/uTaskerEzPortCloner.pdf ] and have no problems writing the sector with the flash configuration with security set and then continuing with the rest - as you have pointed out, the new security setting becomes valid only after the next reset, so if no reset is made the values written have no effect yet.
EzPort Cloning: http://www.utasker.com/docs/uTasker/uTaskerEzPortCloner.pdf
Professional Kinetis support, one-on-one training and complete fast-track project solutions: http://www.utasker.com/support.html