This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

What is the Module ID and Block ID

I am using the nrf51822 and I want to use the pstorage library to save some data which is "power lost can save",but I cloud not find the example of it.I am using the SDK 8.1.0 and after init the pstorage by pstorage_init() function.I got error when I store and load .I think maybe is the module ID and block ID problem.I don't know if I set it at this way is right pstorage_handle_t PID_local={1,260096};

Parents
  • Yes, I just change the main function as below

    int main(void)
    

    {

    uint32_t err_code;

    // Initialize
    timers_init();
    	uart_config();
    //ble_stack_init();
    //bsp_module_init();
    scheduler_init();
    /*gap_params_init();
    advertising_init();
    services_init();
    conn_params_init();
    sec_params_init();*/
    
    // Start execution
    /*timers_start();
    err_code = ble_advertising_start(BLE_ADV_MODE_FAST);
    APP_ERROR_CHECK(err_code);*/
    
    	pstorage_test_store_and_update();
    
    // Enter main loop
    for (;;)
    {
        app_sched_execute();			
        power_manage();
    }
    

    }

Reply
  • Yes, I just change the main function as below

    int main(void)
    

    {

    uint32_t err_code;

    // Initialize
    timers_init();
    	uart_config();
    //ble_stack_init();
    //bsp_module_init();
    scheduler_init();
    /*gap_params_init();
    advertising_init();
    services_init();
    conn_params_init();
    sec_params_init();*/
    
    // Start execution
    /*timers_start();
    err_code = ble_advertising_start(BLE_ADV_MODE_FAST);
    APP_ERROR_CHECK(err_code);*/
    
    	pstorage_test_store_and_update();
    
    // Enter main loop
    for (;;)
    {
        app_sched_execute();			
        power_manage();
    }
    

    }

Children
No Data
Related