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.

NV OPERATION failed

I test the following red codes in main function and it works fine too.

#define nv_test_id 0x0401
uint8 test_write= 0x78;
uint8 test_read=0x0;

int main( void )
{
  // Turn off interrupts
  osal_int_disable( INTS_ALL );

  // Initialization for board related stuff such as LEDs
  HAL_BOARD_INIT();

  // Initialize board I/O
  InitBoard( OB_COLD );

  // Initialze HAL drivers
  HalDriverInit();

  // Initialize NV System
  osal_nv_init( NULL );

  //YK test NV
 
  osal_nv_item_init(nv_test_id, 1, NULL);
  osal_nv_read(nv_test_id, 0, 1, &test_read);
  osal_nv_write(nv_test_id, 0, 1, &test_write);
  osal_nv_read(nv_test_id, 0, 1, &test_read);

  // Initialize the MAC
  ZMacInit();

as before source code, if I used the  osal_nv_item_init(nv_test_id, 1, NULL); function, do I need to use the function osal_nv_init( NULL ); in the init?

because some time after the reset, I found my parameter some time is 0xFF, so I have confused about the NV Operation, can you show me the detail about the NV init function and read/write function?

Thanks.