I need to determine in the program whether the earlier partition instruction contains CSES operations,so I read out the whole 32bit in the FCFG1 register for comparison.I found that I could see the difference between bits 20 and 23 in the register, but these four bits were reserved in the manual and were not defined. Can I use them as a yardstick for judging? I worry if the future products will have these bits' function changed without notice.
Solved! Go to Solution.
We do not recommend using these reserved area for any operations,these reserved areas values may vary with different chip part numbers.
BR!
Jim,
We do not recommend using these reserved area for any operations,these reserved areas values may vary with different chip part numbers.
BR!
Jim,
In fact I have test the issue in S32K118 and S32K116. I found that the initial values in the 20~23bits is 0011, after I write FlexNVM Partition Code with CSEs operations it will be changed to 0001.if I write FlexNVM Partition Code with no keys operations it will be changed to 0000. the two chips perform alike, so I think the values may actually already be defined.
I would like to ask if there are other status flags in some register for me to choose if these values cannot be used as a criterion. I need to distinguish whether the last partition had a CSEs operation.
I did not find such a status register,
/* Get DEPART from Flash Configuration Register 1 */
DEPartitionCode = (uint8_t)((SIM->FCFG1 & SIM_FCFG1_DEPART_MASK) >> SIM_FCFG1_DEPART_SHIFT);
/* Get data flash size */
FLASH_DRV_GetDEPartitionCode(pSSDConfig, DEPartitionCode);
if (pSSDConfig->DFlashSize < FEATURE_FLS_DF_BLOCK_SIZE)
{
pSSDConfig->EEESize = FEATURE_FLS_FLEX_RAM_SIZE;
}
else
{
pSSDConfig->EEESize = 0U;
}
Is that possible to get DFlash size from FlexNVM partition code,then judge the EEPROM size. If it is 0, enable EEPROM without partitioning and partition; if the EEPROM size is non-zero, it has already been partitioned and there is no need to partition again. through this mechanism, it can be ensured that FlexNVM is only partitioned once in the entire product life cycle.
BR!
Jim,