Other Parts Discussed in Thread: CC2650
Tool/software: TI-RTOS
Hi, everyone,
I have the CC2650MODA module and CC2650 LaunchPad with CC2650F128RGZ IC for developing the projects.
I need to use the internal flash memory to store the calibration and advertising data. I loocked to the manual ( from this link www.ti.com/.../swru393 ) and read about the functions uint8 osal_snv_read( osalSnvId_t id, osalSnvLen_t len, void *pBuf) and uint8 osal_snv_write( osalSnvId_t id, osalSnvLen_t len, void *pBuf) that were mentioned in the paragraph 3.10.3. But from the manual I couldn't understand how to use them:
1. What is the first parameter osalSnvId_t id? what data must it have? Is this data the address in the flash memory? If so why is it given as 8-bit value? - the value that can't be neither global nor a local at the page. And if this parameter is not the address in the memory what can it be else?
2. In the example on this manal this parameter (osalSnvId_t id) is given as the value 0x80 why this value cannot be for example 0x00?
3. These unctions doen't write the data correctely. If I store the data it is reread incorrectely. Even more when I tried to loock this data by the flash programmer It was fragmented that means thet the part of the data is stored at the beginning and the part at the middle of the used fragment.
4. When I try to save the data during the program run (after the calibration) the function "osal_snv_write" gives me the error 0x02: INVALIDPARAMETER and not 0x0A: NV_OPER_FAILED as written in the manual.
what does this error INVALIDPARAMETER mean? the osalSnvId_t id is given 0x80 as in the example.
Thanks for payin attention
Best regards
Boris Fridman