How to reset NVRAM in Digi-Connect ME 9210

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?

Hi, first question:
Why you need to set APP_USE_NVRAM = APP_FOR_ALL_PARAMETERS? ALl parameters is used only for wthernet configuration, and it overrides MAC setup an IP.

Jirka

There are methods that come to mind, but they are environmental dependant.

If you have access to the serial/dialog and it is connected to a terminal emulator of some kind, when the dialog asks if you want to "Press key in 5 seconds to change settings, press a key. You’ll need a user name and password. You’ll be asked if you want to reset to defaults. If you says Y, NVRAM will be reset to some reasonable settings. That might help.

Also both the command line development environment and the IDE (ESP) have a sample application that will wipe FLASH clean. Two caveats, 1) Notice I said FLASH and not just NVRAM. 2) You must be using a JTAG module. DO not try this with a non-JTAG module as your unit will trully be turned into a brick. After clearing FLASH, through the JTAG debugger yo can rewrite the bootloader and the application. Use the method above to set NVRAM to something reasonable.

maybe the knowledge base article is related:
http://knowledge.digi.com/articles/Knowledge_Base_Article/Forgot-the-root-password-for-NET-OS-firmware-Can-t-change-wrong-baud-rate-settings/