Hi Saurabh,
If you just want to use the blhost to check the 0X40C data, and you find the 0X40C still 0XFE and not the 0XFF which you want to download.
I don't know how you download the secured code to the chip? Some IDE or the debugger need to do the configuration, otherwise the secure area won't be updated.
I highly suggest you generate the .hex file, then check the 0X40C at first, make sure the app.hex 0X40C is really 0XFF, then you can use the blhost download that app, then check it again.
As I know, the IAR need to do the specific configuation, the KDS or MCUXpresso associate with the P&E debugger also may have problem, so, if you still want to use the debugger to download the code, I suggest you use the JLINK, when you select the chip, you must select the chip with partnumber<allow security>, then you can use the JLINK commander window, with JLINK commander: loadfile app.hex addr to download the code.
Please try it again in you side.
If you still have question about it, please kindly let me know.
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------