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.

Problem to use osal_snv_read and write

Other Parts Discussed in Thread: CC2540

Hello… :)

 I’m using evaluation board cc2540 and working over simpleBLECentral and simpleBLEperipheral projects. I’m able to send messages through bluetooth connection and in the function static void simpleProfileChangeCB( uint8 paramID ) I’m using these messages to call functions of my application. Now I’m trying to use osal_snv_read and osal_snv_write but I’m facing some problems. Through the joystick on central project I'm able to increase and decrease a duty cycle value on peripheral project and using one button I'm sending the message “save” and I want to register this value of duty cycle in flash memory. However when I initialize my function I must see if there is a value that was saved before and if there isn’t  I set a value by default and my application waits the interruption with the save command.

The problem is: when the function initializes and tries to read, this isn’t working. I’ve tried to put breakpoints and see the value of my variable and I’ve got 0x02. :(

 I have been reading some posts and I saw in one of these posts, we must have written at least one time to can use the read function. But, I need to read before. So, how this really works?

Thank you guys and I’m sorry my English isn’t so good. ;)