Hi.
I' m using nRF52832, SDK v15.0.0, S132.
I'm want tutorial how make bootloader DFU in IAR.
How I make bootloader DFU for nrf52832 in IAR?
Hi.
I' m using nRF52832, SDK v15.0.0, S132.
I'm want tutorial how make bootloader DFU in IAR.
How I make bootloader DFU for nrf52832 in IAR?
You call the following function
uint32_t ble_dfu_buttonless_bootloader_start_finalize(void) { uint32_t err_code; NRF_LOG_DEBUG("In ble_dfu_buttonless_bootloader_start_finalize\r\n"); err_code = sd_power_gpregret_clr(0, 0xffffffff); VERIFY_SUCCESS(err_code); err_code = sd_power_gpregret_set(0, BOOTLOADER_DFU_START); VERIFY_SUCCESS(err_code); // Indicate that the Secure DFU bootloader will be entered m_dfu.evt_handler(BLE_DFU_EVT_BOOTLOADER_ENTER); // Signal that DFU mode is to be enter to the power management module nrf_pwr_mgmt_shutdown(NRF_PWR_MGMT_SHUTDOWN_GOTO_DFU); return NRF_SUCCESS; }
its defined in ble_dfu.c and its called in so just include ble_dfu.h in the file, I assume main.c, and then call ble_dfu_buttonless_bootloader_start_finalize when you want to jump to the bootloader.
I got an error again.
What do I do wrong?
bootloader uploaded
Which error code is returned by ble_dfu_buttonless_init()? Can you step into ble_dfu_buttonless_init and see which internal function that returns the error code?
Returns the error code function err_code = sd_ble_uuid_vs_add(&nordic_base_uuid, &m_dfu.uuid_type);
err_code = sd_ble_uuid_vs_add(&nordic_base_uuid, &m_dfu.uuid_type);
VERIFY_SUCCESS(err_code);
0x04 means NRF_ERROR_NOMEM, which is generate by sd_ble_uuid_vs_add when there are no more free slots for VS UUIDs,
You need to increase NRF_SDH_BLE_VS_UUID_COUNT in sdk_config.h to 1.
* @param[in] p_vs_uuid Pointer to a 16-octet (128-bit) little endian Vendor Specific base UUID disregarding
* bytes 12 and 13.
* @param[out] p_uuid_type Pointer to a uint8_t where the type field in @ref ble_uuid_t corresponding to this UUID will be stored.
*
* @retval ::NRF_SUCCESS Successfully added the Vendor Specific base UUID.
* @retval ::NRF_ERROR_INVALID_ADDR If p_vs_uuid or p_uuid_type is NULL or invalid.
* @retval ::NRF_ERROR_NO_MEM If there are no more free slots for VS UUIDs.
*/
SVCALL(SD_BLE_UUID_VS_ADD, uint32_t, sd_ble_uuid_vs_add(ble_uuid128_t const *p_vs_uuid, uint8_t *p_uuid_type));