This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

how to store array of structs(48 bits) in flash?

This is the structure.I am using bitfields here, even if i don't the problem still exists.

struct CODE_T

{
uint32_t guest_code_start_time;
uint32_t guest_code_end_time;
uint32_t guest_code:30;
uint8_t is_ongoing:1;
uint8_t code_used:1;
};

The problem is it saves for first time,but on restart it shows some zero values.Also i am casting struct to char*. Pls help asap.

Parents Reply Children
Related