Hi Mark,
I have a routine which sends down the network setup, starting at the MAC address, then the parameter block is updated to FLASH. I reset the processor board, in turn the network settings are sent through the serial port.
Here is my code: (I am not using the swap method, and parameters are in FLASH)
//Ptr buffer holds network settings
uMemcpy((CHAR*)&network.ucOurMAC,&Ptr[0], MAC_LENGTH+IPV4_LENGTH+IPV4_LENGTH+IPV4_LENGTH+IPV4_LENGTH);
fnSetPar((unsigned short)(PAR_NETWORK), (unsigned char *)&network, sizeof(NETWORK_PARAMETERS));
DisplayNewSettings(); //this dispays all settings in 'network' . At this point all values are what they should be
The values printed out after the fnSetPar() command displays the correct values. But If I reset the board, the NETWORK values are only sometimes correct. It seems that the information is not always saved.
Neil