hello,
I am using SDK 16.0 and I use flash storage to store some value which is critical for our application, when I use fstorage_write as below inside main(),
int main()
{
uint32_t mode=0x22;
uint32_t address_reg=0x54000;
fstorage_init(); // Initializing the flash_storage
fstorage_write(address_reg,&mode);
}
and view memory location using segger I am getting 0x22 int address ox54000, which is correct
but when I put fstorage_write inside another function, and observe the memory location it showing completely unrelated values.
void write_test(uint32_t mode)
{
uint32_t address_reg=0x54000;
fstorage_write(address_reg,&mode);
}
int main()
{
uint32_t mode=0x22;
fstorage_init(); // Initializing the flash_storage
write_test( mode)
}
I am really confused and what may be the reason, when I change this function to inline function it seems to work fine,