Hi,
I am trying to perform Buttonless DFU on a nrf52832 chip. I am using SES on Windows. I do DFU with nrfToolbox on my iPhone.
The way I do it is by packaging the DFU bootloader, the SoftDevice and the buttonless app. After flashing it in a PCA10040 DevKit with an nrf52832 on it, it works fine and I can upload some firmware by clicking the 'Nordic_Buttonless' advertisement.
However, when I try to flash it in my chip which is on a custom PCB, the app seems to work since it does advertise 'Nordic_Buttonless', but I get a 'Device failed to connect' notification when I try to flash some firmware.
This is the main code from the button less app, followed by my code. I've cut the 'erase_bonds' variable from the example, since it raised errors, and I wonder if it might be the cause of my issue.
bool erase_bonds; ret_code_t err_code; log_init(); // Initialize the async SVCI interface to bootloader before any interrupts are enabled. err_code = ble_dfu_buttonless_async_svci_init(); APP_ERROR_CHECK(err_code); timers_init(); power_management_init(); buttons_leds_init(&erase_bonds); ble_stack_init(); peer_manager_init(); gap_params_init(); gatt_init(); advertising_init(); services_init(); conn_params_init(); NRF_LOG_INFO("Buttonless DFU Application started."); // Start execution. application_timers_start(); advertising_start(erase_bonds); // Enter main loop. for (;;) { idle_state_handle(); }
// All inits are made before the main function if(DFU_flag == 1){ advertising_start(); ble_counter = 0; while(ble_counter < 3000){ idle_state_handle(); ble_counter++; nrf_delay_ms(10); } sd_ble_gap_adv_stop(m_advertising.adv_handle); }
Thanks for your help,
Jerome