This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

pstorage and mesh

I add my own codes in nRF51-ble-bcast-mesh-sdk-8-support project,

then I find that if device_flash_init() is compile to this project,

the program cannot finish rbc_mesh_init(),

and stop at sd_rand_application_bytes_available_get() in rand_init(void).

image description image description image description

Here is my device_flash_init() function

#define FLASH_BLOCK_SIZE  20
void device_flash_init(void)
{   

      uint8_t *block_list=NULL;
      uint32_t retval,  retval_addrgroup;
      
      retval = pstorage_init();
     if(retval != NRF_SUCCESS)
     {   nrf_gpio_pin_set(LED_0);
     } 
     param_addrgroup.block_size  = FLASH_BLOCK_SIZE;                   
     param_addrgroup.block_count = 1;                    
     param_addrgroup.cb          = flash_operation_cb; 
  
     retval_addrgroup = pstorage_register(&param_addrgroup, &handle_addrgroup);	
     if(retval_addrgroup !=NRF_SUCCESS)
     {  
        nrf_gpio_pin_set(LED_0);
     }

     pstorage_block_identifier_get(&handle_addrgroup, 0, &block3_addrgroup);

     block_list = malloc(FLASH_BLOCK_SIZE);
     if(block_list!=NULL)
     {  
        memset(block_list,0,FLASH_BLOCK_SIZE);
        pstorage_load(block_list, &block3_addrgroup, FLASH_BLOCK_SIZE, 0);  
        get_device_addrgroup(block_list);
        free(block_list);		
     }
    else
    {block_list=NULL;}
}

can you one give me some clues? THANK YOU!

Parents
  • No,it is not working by now.I just use one sd_ble_enale in my ble_stack_enable function,and delete the other two ,

    then put device_flash_init() between rbc_mesh_init() and nrf_adv_conn_init(),the demo board can

    advertise ,but when I try to connect it using APP , failed with "Timeout interrogating the peripherial"

    and the while(1)-loop stop running

Reply
  • No,it is not working by now.I just use one sd_ble_enale in my ble_stack_enable function,and delete the other two ,

    then put device_flash_init() between rbc_mesh_init() and nrf_adv_conn_init(),the demo board can

    advertise ,but when I try to connect it using APP , failed with "Timeout interrogating the peripherial"

    and the while(1)-loop stop running

Children
No Data
Related