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.