Reflash vector table in a secure way

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

Reflash vector table in a secure way

1,045 次查看
emmanuelaguilas
Contributor II

Hello,

I'm having troubles finding if there is a secure way to reflash the vector table, with other micro-controllers that I just to work with, this was done by manually flashing a vector table in another region and set it as the starting point, then reflashing the default region with the new vector table and making it the start point again when the reflash process done.

Is this handle in a similar way on the S32K? do you have any document for reference?

Regards.

2 回复数

759 次查看
RadekS
NXP Employee
NXP Employee

Hi Emmanuel,

As Diana said, you may create new vector table in another region and change VTOR register.

That may be important e.g. for dual application solution like Bootloader at default vector table area and application vector table in another Flash/RAM region.

 

The reflashing default vector table may be dangerous since the vector table occupied the same flash sector as initial Stack Pointer and Program Counter values.

Unexpected reset during first sector reflashing may cause MCU brick (you may need JTAG for loading new software).

 

Some of Kinetis MCUs offers flash bank swap, but this feature is not available for the S32k family.

 

So, if you expect that your application will be changed in the future without debugger connection, the vector table should be located out of the first sector anyway.  


I hope it helps you

Have a great day,
Radek

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

759 次查看
dianabatrlova
NXP TechSupport
NXP TechSupport

Hi Emmanuel,

The CM0+ and CM4 core support a programmable Vector Table Offset Register (VTOR).
Vector table is located at addresses 0x0 (Stack Pointer) and 0x4 (Program Counter).

I assume you can move the vector table to another address and after reset set VTOR to point to this vector table address.

Best regards,

Diana