Hi,
I am currently working with the Flash_Partitioning_s32k144 example project in S32 Design Studio. I have configured the code to partition the flexNVM as 32KB D-Flash and 32KB EEPROM by setting the DEPartitionCode to 0x03u in the FLASH_DRV_DEFlashPartition based on the refernece manual below.
#INSERT IMAGE
After running debugger and completing the project (DEBUG_RAM), I will run it again with a breakpoint at main to check the DEPART field value of the FCFG register to confirm that it has saved a value of 0011 to represent the 32 KB split.
It will show 0011 the first time, however if I switch to debug another project, for instance the hello world example project, the DEPART value will be 1111 which is the default value and unconfigured. 1. Does this mean that the partition was unsuccessful? Notably, the EEERAMSIZE field will always be 0010b to represent 4KB of EEERAM.
Also, a couple smaller questions I had about the flash partition example project:
2a. Further in main.c, the project begins erasing and writing a sector of P-Flash and D-Flash. If I had partitioned all of FlexNVM to EEPROM (all 64 KB) so there is no D-Flash, what sector of D-flash would that be referring to?
2b. If I plan to setup a firmware updating bootloader on S32k144 as mentioned in the Firmware Update Application Note, as shown below, do i need to keep the bootloader section as D-Flash?
Pay attention to following thread:
Is this blank new device or have you performed mass erase operation before programming the example code?
It is a blank device.
I checked the other form and still don't understand why the partition info in FCFG doesn't remain, mainly of the DEPART field, when i try to run another program.
In the future, if I wanted to perform a mass erase, is there a function for that in the flash driver? or a project example?
Pay attention to following thread:
https://community.nxp.com/t5/S32K/S32K144EVB-Flash-programming-error-occurring/td-p/693753