This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Non volatile Memory Issue CC2541

Hi, I've got a problem and i dont know why.

I'm trying to write in Non volatile with Simple Non Volatile API and i do the next thing to charge write and read values from it:

Im trying to write values in Non volatile if a flag is not set. 

I run the code and the first time it writes the value cause the flag is not set. And what i want is that in the second execution the program check the flag and it appears activated. But the real thing is that the flag is not activated and the code procced to inizializate values again. 

I see the peripheral.c and it calls the functions as same as me. I dont know why is happening this?

Could it be cause when i download and debbug a project . The debbuger erase all the Non volatile memory?

Thanks

  • You last question can be answered by opening IAR and going to Project->Options->Debugger->Texas Instruments. Then check the option "Retain unchanged pages"

    Also you wrote code wrong:
    pontencia = potencia_EMision_Defecto  // <--- Correct
    pontencia=potencia_EMision_Defecto    // <---Heresy