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.

cc2540 osal_nv_item_init??error[e46]

Other Parts Discussed in Thread: Z-STACK

I am using BLE stack 1.3.2 and got error listed as below

Error[e46]: Undefined external "osal_nv_item_init::?relay" referred in keyfobdemo ( C:\Texas Instruments\BLE-CC254x-1.3.2\Projects\ble\KeyFob_cma3000_18Junepm\CC2540DB\CC2540DK-mini Keyfob Slave\Obj\keyfobdemo.r51 )
Error[e46]: Undefined external "osal_nv_write::?relay" referred in keyfobdemo ( C:\Texas Instruments\BLE-CC254x-1.3.2\Projects\ble\KeyFob_cma3000_18Junepm\CC2540DB\CC2540DK-mini Keyfob Slave\Obj\keyfobdemo.r51 )
Error[e46]: Undefined external "osal_nv_read::?relay" referred in keyfobdemo ( C:\Texas Instruments\BLE-CC254x-1.3.2\Projects\ble\KeyFob_cma3000_18Junepm\CC2540DB\CC2540DK-mini Keyfob Slave\Obj\keyfobdemo.r51 )

I already include "OSAL_NV.h" in my applicaition.c seems missing OSAL_NV.c in the osal folder

thanks

  • In BLE Stack 1.3.1, it should be osal_snv_init not osal_nv_item_init. You can refer to osal_snv.c.
  • Thank you very much for your reply, quite confuse for osal_snv_write and read range, can I use 0x0400 to 0x0FFF? or 0x80 to 0xFE as mentioned in osal document. If I use osal_snv_write to the same address, do I need to erase the block of flash before rewrite it? How to do erase if necessary

    Is it for ble stack 1.3.2 cannot use osal_nv api, and must use osal_snv api. osal_nv.c is missing in the project
    Thanks
  • 1. osal_snv_write and osal_snv_read can only use uint8 as NV ID so you cannot use 0x0400 to 0x0FFF.
    2. You can use osal_snv_write to the same NV ID. There is no need to erase the block of flash before rewrite it.
    3. You can only use osal_snv api in BLE Stack 1.3.2

    By the way, BLE stack 1.3.2 is obsolete so I would suggest you to use BLE Stack 1.4.1.
  • Dear Mr Chen
    Many thanks for your reply, getting wise.
    By the way, if we use BLE 1.4.1 , can we use osal_nv api?
    Also for osal_snv_write /read range, can we use 0x00 to 0xff or limited to 0x80 to 0xFE
    Thank you very much in advance
  • 1. You still can only use osal_snv in BLE Stack 1.4.1. osal_nv API is for Z-Stack.
    2. Some of ID between 0x00 to 0x8F are used by BLE stack so I would suggest you to use ID after 0x90.
  • Hi
    How many byte I can save under each NV ID? and total available nv memory can be used?

    For each ble connection either read or write, is it only 21 byte payload can be used. I am using 1.3.2, any increase of amount of byte in later ble stack

    thanks