Hi Oliver,
Firstly, the following table shows(Page 68 of S32K1xx Series Reference Manual, Rev. 11, 06/2019 ) the main differences between S32K146 and S32K148:
Based on the above table, below tips are recommended when you migrate your codes from S32K146 to S32K148:
For HW: the avaiable p2p compatible page are : MAPBGA-100, LQFP-100 and LQFP-144. For the same package, S32K148 has all periphrals/functions pin map of S32K146, so no hardware schematic & PCBA rework requires.
For SW:
1. if you used the EEE(Emualted EEPROM), please double check the FlexNVM partition code you applied on S32K146 is avaibale & valid on S32K148:
the avaiable FlexNVM paritition code of S32K146 is as below:
the avaiable FlexNVM paritition code of S32K148 is as below, only 0b000, 0b0100 and 0b1111:
2. if you used FlexNVM as D-Flash, please note that: S32K146 has only 64KB FlexNVM/D-Flash with sector size of 2KB, while S32K148 has 512KB P-Flash as its FlexNVM/D-Flash with sector size of 4KB.
S32K146(1MB flash(1MB P-Flash + 64KB D-Flash) memeory map):
S32K148(2MB(1.5MB + 0.5MB) flash memeory map):
so when erase the D-Flash sector(i.e. call the following SDK Flash driver API function-FLASH_DRV_EraseSector()), please ensure the D-Flash sector address and length are 4KB aligned instead of 2KB:
/*FUNCTION**********************************************************************
* Function Name : FLASH_DRV_EraseSector
* Description : Erases one or more sectors in P-Flash or D-Flash memory.
* This API always returns STATUS_SUCCESS if size provided by the user is
* zero regardless of the input validation.
* Implements : FLASH_DRV_EraseSector_Activity
*END**************************************************************************/
status_t FLASH_DRV_EraseSector(const flash_ssd_config_t * pSSDConfig,uint32_t dest, uint32_t size)
Tips: you can make a lookup table in your application code based the chip feature to use the different parameters of the EEE parition code and sector size and achieve a apdtive switch with the SIM->SDID register:
Hope this can help you.
Best regard,
Enwei Hu(胡恩伟).