Hi sir,
I tried with this code by changing linker file but flow is going default ISR and I have one more quarry, I used condition but this condition will become true and then EEPROM READY resistor bit will set I am confused weather the partition is done successfully are not.
if(flashSSDConfig.EEESize == 0)
{
ret = FLASH_DRV_DEFlashPartition(&flashSSDConfig, EEE_SIZE, EEE_BACKUP, 0x0u, false, true);
DEV_ASSERT(STATUS_SUCCESS == ret);
ret = FLASH_DRV_Init(&Flash1_InitConfig0, &flashSSDConfig);
DEV_ASSERT(STATUS_SUCCESS == ret);
ret = FLASH_DRV_SetFlexRamFunction(&flashSSDConfig, EEE_ENABLE, 0x00u, NULL); /* flex Ram to flex NVM */
DEV_ASSERT(STATUS_SUCCESS == ret);
}
****************************************************************************************************************************************
code
****************************************************************************************************************************************
#include "Cpu.h"
volatile int exit_code = 0;
#define EEE_SIZE 0x02u
#define EEE_BACKUP 0x08u
typedef struct
{
int timestamp;
char fault_details[2];
} fault_details_t;
typedef struct
{
int timestamp;
char runtime_data[2];
} runtime_data_t;
fault_details_t fault_details __attribute__ ((section(".eeeprom")));
runtime_data_t runtime_data __attribute__ ((section(".eeeprom")));
flash_ssd_config_t flashSSDConfig;
status_t ret;
int main(void)
{
/* Write your local variable definition here */
/*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
#ifdef PEX_RTOS_INIT
PEX_RTOS_INIT(); /* Initialization of the selected RTOS. Macro is defined by the RTOS component. */
#endif
/*** End of Processor Expert internal initialization. ***/
CLOCK_SYS_Init(g_clockManConfigsArr,CLOCK_MANAGER_CONFIG_CNT,g_clockManCallbacksArr,CLOCK_MANAGER_CALLBACK_CNT);
CLOCK_SYS_UpdateConfiguration(0U, CLOCK_MANAGER_POLICY_AGREEMENT);
FLASH_DRV_Init(&Flash1_InitConfig0, &flashSSDConfig);
if(flashSSDConfig.EEESize == 0)
{
ret = FLASH_DRV_DEFlashPartition(&flashSSDConfig, EEE_SIZE, EEE_BACKUP, 0x0u, false, true);
DEV_ASSERT(STATUS_SUCCESS == ret);
ret = FLASH_DRV_Init(&Flash1_InitConfig0, &flashSSDConfig);
DEV_ASSERT(STATUS_SUCCESS == ret);
ret = FLASH_DRV_SetFlexRamFunction(&flashSSDConfig, EEE_ENABLE, 0x00u, NULL); /* flex Ram to flex NVM */
DEV_ASSERT(STATUS_SUCCESS == ret);
}
fault_details.timestamp = 10;
fault_details.fault_details[0] = 5;
runtime_data.timestamp = 20;
runtime_data.runtime_data[0] = 30;
/* For example: for(;;) { } */
/*** Don't write any code pass this line, or it will be deleted during code generation. ***/
/*** RTOS startup code. Macro PEX_RTOS_START is defined by the RTOS component. DON'T MODIFY THIS CODE!!! ***/
#ifdef PEX_RTOS_START
PEX_RTOS_START(); /* Startup of the selected RTOS. Macro is defined by the RTOS component. */
#endif
/*** End of RTOS startup code. ***/
/*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/
for(;;) {
if(exit_code != 0) {
break;
}
}
return exit_code;
/*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/
} /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/
/* END main */
/*!
** @}
*/
/*
** ###################################################################
**
** This file was created by Processor Expert 10.1 [05.21]
** for the NXP S32K series of microcontrollers.
**
** ###################################################################
*/