Hi
On the S32DS2.2 for ARM platform, the flash module can control the internal flash erasure and writing of the MCU. But in S32DS3.5, the flash module cannot be used for operation. My specific code:
/*test flash demo start*/
uint8_t bufferii[8] = {1,2,3,4,5,6,7,8};
volatile uint8_t readbuoo[8] = {0};
/* Declare a FLASH config struct which initialized by FlashInit, and will be used by all flash operations */
flash_ssd_config_t flashSSDConfig;
// /* Disable cache to ensure that all flash operations will take effect instantly, this is device dependent */
// MSCM->OCMDR[0u] |= MSCM_OCMDR_OCM1(0x3u);
// MSCM->OCMDR[1u] |= MSCM_OCMDR_OCM1(0x3u);
FLASH_DRV_Init(&Flash_InitConfig0,&flashSSDConfig);
INT_SYS_DisableIRQGlobal();
FLASH_DRV_EraseSector(&flashSSDConfig,0x10000000,4096);
INT_SYS_EnableIRQGlobal();
INT_SYS_DisableIRQGlobal();
FLASH_DRV_Program(&flashSSDConfig, 0x10000000,8,bufferii);
INT_SYS_EnableIRQGlobal();
uint8_t* readbuff;
readbuff = 0x10000000;
for(uint8_t i=0;i<8;i++)
{
readbuoo[i] = *(uint32_t*)(readbuff+i) ;
}
FLASH_DRV_EraseSector this function is unavailable