Tool/software:
I need to write some values on flash and later access it after power reset. Currently I am using this code:
#pragma PERSISTENT(x)
static volatile uint8_t x = 10u;
SYSCFG0 = FRWPPW;
x = y;
SYSCFG0 = FRWPPW | PFWP;
Is there some direct function to write to flash or it has to be done this way. The data is not written as I checked after reset it still holds the default value.