Hello, i am having problems with a loop in the function "flash_manager_wait()"; in the begining of the code.
main()-> initialize()-> mesh_init()-> mesh_stack_init(&init_params, &m_device_provisioned))-> dsm_flash_config_load()-> (void) dsm_flash_config_load()-> flash_manager_wait();
static inline void flash_manager_wait(void) { #if !defined(HOST) //__LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "HOLA 1..1..0..1\n"); while (!flash_manager_is_stable()) { /* Temporary hack to make sure that bearer events are handled while waiting for * the flash manager to finish. * TODO: Find a solution for this that does not include busy-waiting. */ if (bearer_event_handler()) { __WFE(); } } #endif }
this happen after many reboots thath i do each 1 minute, and the only form to recover it, is erase all the flash, and re flashing soft-device and program.
i do the reboot whit the timer1 and the " function mesh_stack_device_reset()"
void TIMER1_IRQHandler(void) { if (NRF_TIMER1->EVENTS_COMPARE[0] == 1 ) { __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "----- Count1 -----\n"); NRF_TIMER1->EVENTS_COMPARE[0] = 0; if ( TIMER_REINICIO1 == 1) { nrf_delay_ms(100); mesh_stack_device_reset(); } } if (NRF_TIMER1->EVENTS_COMPARE[1] == 1) { __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "----- Count2 -----\n"); NRF_TIMER1->EVENTS_COMPARE[1] = 0; if ( TIMER_REINICIO2 == 1) { nrf_delay_ms(100); mesh_stack_device_reset(); } } }
help please.