AnsweredAssumed Answered

How to save a data structure to flash memory in ADuCM360?

Question asked by JiaIR on Nov 17, 2014
Latest reply on Nov 18, 2014 by JiaIR

I’d like to save some calibration data and user settings to Flash in ADuCM360. The user guide 367 (p87) says “Note that only 32-bit writes are supported; 16-bit and 8-bit writes are not supported.” My calibration data and user settings are a combination of 8-bit and 16-bit, eg.

typedef struct usersetting_s

{

uint16_t Sensor_Add;

uint16_t SensorID;

uint8_t  usersetting_1;

uint8_t  usersetting_2;

......

} Settings;

 

Settings user_data =

{

1,

0,

10,

20,

...

};

 

What is the right way to save this data structure,ie, user_data, in Flash? Can you please give an example? Thanks a lot!

Outcomes