Questions about the Hse_B Monotonic counter

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Questions about the Hse_B Monotonic counter

Jump to solution
803 Views
wuxianlong
Senior Contributor I

Hi ,NXP

At present, I need to use the Monotonic counter of HSE. How should I configure it? Are there any precautions for operations? I have referred to the HSE_B Firmware Reference Manual, but I don't understand many of the principles. I hope to get some help and answers.

  1. As I understand it, HSE_B has HSE_NUM_OF_MONOTONIC_COUNTERS (16) counters, and each HSE monotonic counter is 64 bits. It can be configured as two types of bit fields: RP/VC. Only when the accumulated sum of the increment value is greater than the range of the VC bit field will an RP update be triggered, and the accumulated sum will be updated and added to RP and saved to FLASH. Based on the above understanding, ① After the RP update is triggered, will VC be reset to 0? ② When only updating VC, the data will not be stored in dflash. So if a POR event occurs, will the data be lost?
  2. Suppose I configure RP as 64 bits. Each time the data is updated, it will be updated to FLASH. Why does an erase operation occur only when 512 bit fields are changed? Does RP use a principle similar to FEE?
  3. Suppose I configure RP as 32 bits, and VC will also be 32 bits. Will there be no trigger to save the data to Flash?
    wuxianlong_0-1763113826847.png

Best Regards,
xianlong

0 Kudos
Reply
1 Solution
765 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Rollover Protection (RP) portion of monotonic counter seems to be sort of EEPROM data storage.

Volatile counter (VC) portion of monotonic counter seems to be sort of RAM storage.

Both counter can only be incremented, that’s why the feature is unique, ensuring they cannot be decremented or reset, thereby maintaining a reliable sequence of operations and enhancing overall system security.

1) ① - I don’t think so. Just in case RP is changed, then it is stored to FLASH.

1) ② - Yes, VC portion will be lost i.e. cleared.

2) Yes, it is exactly how you said.

3) If you change RP portion, then it’ll be stored to flash.

View solution in original post

0 Kudos
Reply
1 Reply
766 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Rollover Protection (RP) portion of monotonic counter seems to be sort of EEPROM data storage.

Volatile counter (VC) portion of monotonic counter seems to be sort of RAM storage.

Both counter can only be incremented, that’s why the feature is unique, ensuring they cannot be decremented or reset, thereby maintaining a reliable sequence of operations and enhancing overall system security.

1) ① - I don’t think so. Just in case RP is changed, then it is stored to FLASH.

1) ② - Yes, VC portion will be lost i.e. cleared.

2) Yes, it is exactly how you said.

3) If you change RP portion, then it’ll be stored to flash.

0 Kudos
Reply