Hello:
I wonder how S32k312 distinguishes which is active block and which is passive block with hse fw (ab_swap) installed
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.
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.
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.
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.
-------------------------------------------------------------------------------