AnsweredAssumed Answered

SNVS general purpose registers

Question asked by Daniele Pagani on Sep 12, 2019
Latest reply on Sep 18, 2019 by Victor Jimenez

    Dear sirs,

we're wondering if it's correct to use the SNVS module for temporary storage of some variables, in order to keep their value even after a Reset Software. 

As example:

#include "fsl_snvs_lp.h"

int main(void){

...

uint32_t registers[4];

SNVS_LP_Init(SNVS);

registers[0]=SNVS->LPGPR_ALIAS[0];

registers[1]=SNVS->LPGPR_ALIAS[1];

registers[2]=SNVS->LPGPR_ALIAS[2];

registers[3]=SNVS->LPGPR_ALIAS[3];

PRINTF("Registers:%u,%u,%u,%u\n",registers[0],registers[1],registers[2],registers[3]);

registers[0]++;

registers[1]+=2;

registers[2]+=3;

registers[3]+=4;

SNVS->LPGPR_ALIAS[0]=registers[0];

SNVS->LPGPR_ALIAS[1]=registers[1];

SNVS->LPGPR_ALIAS[2]=registers[2];

SNVS->LPGPR_ALIAS[3]=registers[3];

SNVS_LP_Deinit(SNVS);

NVIC_SystemReset();

...

}

 

The example seems to work fine, but at Chapter 19.2 - SNVS introduction of IMXRT1060 Reference Manual (we're using MIMXRT1060-EVK board) we read:

"SNVS incorporates both security and non-security functionality. The SNVS non-security functionality is described in this document, but the SNVS security functionality is described only in the Security Reference Manual."

We don't know if some security-related features can affect general purpose registers.

BR

Daniele

Outcomes