I created an application to set IAM interface parameters held in NVRAM using IAM parameter API. The first version of the program must have corrupted the NVRAM.
The Digi-Connect 9210 module will not make it to the applicationStart() function when loading parameters from NVRAM. (Setting APP_USE_NVRAM = APP_FOR_ALL_PARAMETERS in the appconf.h file). It keeps hitting the applicationTcpDown() function.
The module will run fine if APP_USE_NVRAM = APP_DO_NOT_USE_NVRAM and module uses parameters in appconf.h.
I then put the following code in applicationTcpDown to try and set IAM parameters back to defaults. But module still does not get to applicationStart(). I think there may be some other parameters stored in NVRAM that have been corrupted.
void applicationTcpDown (void)
{
static int ticksPassed = 0;
NaIamParamsInfo_t configs;
int i;
int success = customizeIamGetDefaultConfig(&configs);
NaIamStaticParams_t config;
memset(&config,0,sizeof(NaIamStaticParams_t));
for(i =0 ; i< NA_IAM_INTERFACE_MAX;i++)
{
success = customizeIamSetInterfaceConfig((char*)&configs.iamParams[i].ifname,&configs.iamParams[i]);
}
success =customizeIamGetConfig(&configs);
ticksPassed++;
/*
- Code to handle error condition if the stack doesn’t come up goes here.
*/
}
Do you have any suggestions to clearing or resetting NVRAM that hold parameter information?