After the power failure of the host, the master and slave are disconnected.
What is the slave still doing at this time?
After the power failure of the host, the master and slave are disconnected.
What is the slave still doing at this time?
Hello,
Please describe your setup. What is the host, master, and slave in this context? Also, are you using Bluetooth?
Best regards,
Vidar
Hello,
Sorry. Let me rephrase my question.
When I add the following code and then disconnect the power supply from the central and continue the power supply from the peripheral, a fatal error is reported.
void BTN_Init(void) { nrf_gpio_cfg_input(BUTTON_1,NRF_GPIO_PIN_PULLUP); nrf_gpio_cfg_input(BUTTON_2,NRF_GPIO_PIN_PULLUP); nrf_gpio_cfg_input(BUTTON_3,NRF_GPIO_PIN_PULLUP); nrf_gpio_cfg_input(BUTTON_4,NRF_GPIO_PIN_PULLUP); nrf_gpio_cfg_input(BUTTON_5,NRF_GPIO_PIN_PULLUP); nrf_gpio_cfg_input(BUTTON_6,NRF_GPIO_PIN_PULLUP); nrf_gpio_cfg_input(BUTTON_7,NRF_GPIO_PIN_PULLUP); nrf_gpio_cfg_input(BUTTON_8,NRF_GPIO_PIN_PULLUP); nrf_gpio_cfg_input(BUTTON_9,NRF_GPIO_PIN_PULLUP); nrf_gpio_cfg_input(BUTTON_10,NRF_GPIO_PIN_PULLUP); }
00> <info> app: Disconnected, reason: 0x8 00> 00> <info> app: Connection timeout. 00> 00> <error> app: Fatal error
If you do not add this code, the result of the run will not be "Fatal error".
Please try to build your project with the "debug" build configuration instead "release". This will replace the "Fatal error" message with information about where the error raised.
Hello,
How to build my project with the "debug" ?
I have selected debug in the follwing image.
Hello,
How to build my project with the "debug" ?
I have selected debug in the follwing image.
I assumed you were using Segger embedded studio. For Keil, you can add the DEBUG flag to the list of pre-processor symbols.
Hello,
It shows that I have a problem here.
Why did my piece of code have that effect?
The error is returned because you are trying to enter System OFF mode while in debug interface mode (see Emulated System OFF mode). Do you want the chip to power down after a disconnect? If not, you need to check where sleep_mode_enter() is being called in your application.
Hello,
I only called it at this location.
Hello,
The BLE_ADV_EVT_IDLE even is raised on advertising timeout. Do you want the device to power off after a certain period of inactivity (i.e. no connections attempts), or do you want the device to keep advertising forever?