Secure mode and OTA updates

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Secure mode and OTA updates

ソリューションへジャンプ
949件の閲覧回数
deniscollis
Contributor V

My K8x gets locked when programming.  This is not a problem in a development environment, where I use Segger J-Link commands to unlock it.   This is not viable in a production environment, with Over-The-Air (OTA) updates.

Flash_Config is unaltered from factory defaults - (FOPT = 0x3D, FSEC = 0xFE) - which I take to mean that the secure lock feature should not be in play.  I do not use a mass erase because some data sections in internal flash may need to be preserved.  To program the chip an OTA update package is sent to the device, and staged on external SPI NOR Flash.  The package contains the target with a header - load address, length, and ECDSA (signature). The staged file is checked for integrity, and a RAM function erases sufficient 4K blocks, and then writes the target. The MCU is reset and the system reboots.

Except that sometimes it doesn't!  Connecting J-Link I find the chip in a secure locked state.

What causes this, and how do I overcome it?

ラベル(1)
タグ(3)
0 件の賞賛
返信
1 解決策
883件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Denis Collis,

  Do you mean, you didn't secure the chip in the code FOPT, but the Kinetis chip is locked up during program, right?

  If yes, please check this document at first:

https://community.nxp.com/servlet/JiveServlet/download/2019-439921-857127-396709/Kinetis+Lock+issue+...

   Whether you meet the requirement in the document.

  If you still have issues about it, please kindly let me know.

Best Regards,

Kerry

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
884件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Denis Collis,

  Do you mean, you didn't secure the chip in the code FOPT, but the Kinetis chip is locked up during program, right?

  If yes, please check this document at first:

https://community.nxp.com/servlet/JiveServlet/download/2019-439921-857127-396709/Kinetis+Lock+issue+...

   Whether you meet the requirement in the document.

  If you still have issues about it, please kindly let me know.

Best Regards,

Kerry

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 件の賞賛
返信
883件の閲覧回数
deniscollis
Contributor V

Hi kerryzhou‌, 

Correct, I did not secure the chip, but it failed to run after reset.  After a little research I now see that the lock can only  occur when I later connect with J-Link.  My guess is that the FSEC bits got corrupted during programming.   (Of course, I need J-Link to inspect flash to figure out why it failed to program!  But I have some other ideas how to do it).

I suspect a programming error.  I'll report back later, but for now I'll mark your answer correct.

Thanks,

Denis

0 件の賞賛
返信