Ladies and Gents,
I'm sure you've seen this topic a million times, and I have searched and searched for an exact answer for my question, but hit my head a few times.
I dabble with MSP430 to drive some of TI's audio devices. I want to be able to able to UART from my PC into the 430 that is on the launchpad and update some variable, and store those variables, so that next time I power up the board, the new saved settings are used.
The UART bit I got working, thanks to some excellent code from 430oh, but I'm still a complete amateur when it comes to storing those updated coefficients in non-volatile memory. I have 8 coefficients that I need to store, so INFOB seems ideal.
I only need to initialise them to preset values once, after that, updated will only be done by UART, with multiple power up power downs happening in between. That's what throws me. How do guarantee that the initialization only happens once in it's lifetime?
I've seen some code on the e2e that suggests that I set up variables like this:
#pragma DATA_SECTION(myvariablename,
".infoB"
);
Int
myvariablename = 0x07;