Hello,
I am experiencing some problems with flashing on my cc2540 128kB custom board running stack 1.3.2. The original idea was to flash 2 bytes into the chip using osal_snv_write function at id 0x80. I modified simpleBLEPeripheral to my uses by adding a flash write event and a flash read event. However, writing fails as when I read it back I only get 0x0000.
I then put break points in my code to pin point where the flash process is failing. This is what I found:
- osal_snv_init() calls initNV()
- initNV() finds that pgHdr does not equal OSAL_NV_XFER_PAGE_STATE or OSAL_NV_ACTIVE_PAGE_STATE
- after erasing (cleanErasedPage) 2 pages, the init function finds activePg is = OSAL_NV_PAGE_NULL and xferPg = OSAL_NV_PAGE_NULL as well
- the whole function returns false and thus !initNV() is returned in osal_snv_init() and the initialization fails.
Could someone please help me find out why and what I have to do to get it working? I have not changed the project settings much (removed Power Saving, CC2540_MINIDK symbols and changed device description to CC2540F128 instead of the default CC2540F256).
Apologies in advance if I have misunderstood something, I am new to this after all.
Thanks.