Hello!
I wrote my own version of the bootloader for nFR52832.
If I go into the loader, check the application and switch to its execution via nrf_bootloader_app_start (), then everything is fine.
But if I download the firmware via BLE, I cannot go to the application via nrf_bootloader_app_start (). The error is 0xDEADBEEF.
It appears in the app_start () function, namely on ASSERT (current_isr_num == 0);
where current_isr_num = __get_IPSR () = 38 != 0
My understanding is that you cannot move the vector table while the loader is in some kind of interrupt.
But I am trying to complete all communications before switching to the application
ble_conn_params_stop ();
sd_ble_gap_disconnect (m_conn_handle, BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);
sd_softdevice_disable ();
nrf_bootloader_app_start ();
But this does not work. What is my problem? How to painlessly switch from the BLE mode to the application?