I am using nrf 52840dk board i need to know how to reset the devlopment using software reset when we press the Button 1 in the nrf 52840dk board
1. Give some software reset function example (eg: if i press the Button 1 it need to call this function, inside this reset function all necessary things for reset that will make to work like a hardware reset
2. for reset what are the things need to do in software?
3. give simple example code for software reset
4. this is the sample reset function i am using
// reboot function
void factory_reset_work_handler(struct k_work *work)
{
//print_uart("Factory reset started...\n");
// Reset Bluetooth Mesh provisioning
bt_mesh_reset();
// Delete all stored settings (flash/NVS)
int ret = settings_delete("");
if (ret) {
//print_uart("Failed to delete settings: %d\n", ret);
} else {
//print_uart("All settings deleted.\n");
}
//print_uart("Rebooting device...\n");
sys_reboot(SYS_REBOOT_COLD);
}
i am using this function for reset in main.c in nrf mesh light sdk in this reset function any code modification need or any other files need to change?
5. I am facing some issues after reset using the above reset function
I explain the issue facing in above reset function in below
consider 5 nrf52840 dk all have same code it will transmit and recive ok first time i provisioned all the devices in the same mesh group i am getting 4 reply in master its ok fine if i reset 2 devices like one master and one slave from mesh and again provision in the same group then i got 1 reply in same mesh group i provision , id i power on and off the 2 device one is master and slave which is resently reset then all the 4 devices is showing and if i give s v on command the slave is receving and led is turn on but no reply. can you say what is the root cause and how power disconnect and connect then this issue is fixed , what is the problem and how to solve it ?
i am using nrf mesh app for provisioning the 5 devices into mesh
can you give example solution and give solution for all the 5 questions
Thankyou