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

pstorage_load stops Ble_advertising

Hey , My application stores the data on BLE disconnect to pstorage succesfully. But on reset if i try to read the data from pstorage it stops advertising, but the pstorage_load returns the same value that i stored previously.

can anyone please help me with this. Here is my code

       int main(void)
 {
	ret_code_t err_code ;
	
	SEGGER_RTT_WriteString(0, "Initialization...\n");
	// Initialize.
    timers_init();
    ble_stack_init();
	pstorage_test_init();
	gap_params_init();
services_init();
advertising_init();
conn_params_init();
	gpiote_init();
		
SEGGER_RTT_WriteString(0, "Advertising starts..\n");
advertising_start();
	
  appRTCInit();
  epoch_pstorage_load();
// Enter main loop.
for (;;)
{
    power_manage();
}

}

i have attached my code

main.c

image description

Parents
  • My application needs to store the data on ble disconnect and retrieve the data on readvertising. I can store the data to pstorage succesfully on ble_disconnect. and im calling the pstorage_load in main loop which is stopping advertising. My doubt is: does calling pstorage_load function from main loop stops advertising? is there any example such that it explains where should call the pstorage_load function so that i can get the data after reset.?

Reply
  • My application needs to store the data on ble disconnect and retrieve the data on readvertising. I can store the data to pstorage succesfully on ble_disconnect. and im calling the pstorage_load in main loop which is stopping advertising. My doubt is: does calling pstorage_load function from main loop stops advertising? is there any example such that it explains where should call the pstorage_load function so that i can get the data after reset.?

Children
No Data
Related