s32k312

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

s32k312

2,178 次查看
youxi
Contributor IV

Hello:

I wonder how S32k312 distinguishes which is active block and which is passive block with hse fw (ab_swap) installed

标记 (1)
0 项奖励
回复
1 回复

2,134 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

According to the description in chapter 12.3 HSE Firmware update (AB_SWAP) of RM758221-HSE-B Firmware Reference Manual - V2.1(2.1):
The host (application) can read the DCM status register (DCMSTAT) to identify which partition is Active and which partition is passive; For more information, refer to the DCM register DCMSTAT.

12.3 HSE Firmware update (AB_SWAP).png

The bit 17 DCMOTAR of  DCM register DCMSTAT will show whether it is currently active at a high or low address
For the 2MB part number(S32K312), the low address is flash block 0, and the high address is 1. 
For the 4MB part number(S32K344), the low address is flash block 0, 1, and the high address is 2, 3.

14.2.4.5 DCM register DCMSTAT DCMOTAR.png

According to the Figure 29. Output information of ab_swap demo of AN744511-Secure Boot Application note v0.1.1.0(1.1):
Also, compared to the full-mem demo, the ab_swap demo will additionally output the AB-SWAP status when running, so that the user can know the active partition(low address or high address) and some prompt information, as the Figure 29 shows.

AN744511-Secure Boot Application note v0.1.1.0(1.1) know the active partition(low address or high address).png

S32K344_SecureBootAppABSwap_Example_100_341_FW0110 DCMOTAR.png


Best Regards,
Robin
-------------------------------------------------------------------------------
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 项奖励
回复