Protection from a bad reflash

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Protection from a bad reflash

1,155 次查看
joao_ribeiro
Contributor IV

Hello,

We are implementing a bootloader on our device based on the one supplied in the SDK so that we can update remotely our device via UART. Everything is going good, but I was wondering what if a remote flash goes bad in the middle of the remote flashing process, do we have a way to get back to the bootlodear or for instance have the micro controller flashed with two images and if one goes wrong it goes to the previous one flashed?

I am using MCUxpresso and a Kinetis K64F.

Thank you in advance for the help

Regards

3 回复数

1,087 次查看
Alexis_A
NXP TechSupport
NXP TechSupport

Hello Joao,

In the following section of the reference manual, it explains the swap command: 29.4.12.14. This could help you to give you the status of the flashing. Also if something goes wrong in the update, the command swap command will let you know if there was a problem.

Also, you can check the following application note that explains more about this.

Best Regards,

Alexis Andalon

1,087 次查看
joao_ribeiro
Contributor IV

Hello Alexis,

Thank you for the reply. I appreciate the support.

While reading the application note that you mentioned I realized that we will not need the conventional bootloader (for instance the one provided in the SDK example), am I correct? It will be our main program that will enter in a additional flashing mode that will flash the upper or lower segment of memory. Correct?

The application note also mentions an example code, but I was not able to find it on the SDK examples. Where can we found an example code?

Thank you onde more for the help.

Regards

0 项奖励
回复

1,087 次查看
Alexis_A
NXP TechSupport
NXP TechSupport

Hello João,

That's right, the main program should be the one to enter this swap routine. In the TWR-K65 SDK, there's an example code that works with this feature.

Best Regards,

Alexis Andalon

0 项奖励
回复