hello Nordic
i am using nrf52832 soc, sdk 16.0, s132 v7.01
my app requires the s132
i am trying to understand the bootloader issue, not so successful on that unfortunately.
i am using the pca_10040_uart example / pca_10040_uart_debug (which uses different flash space but i believe both should work)
my scenario:
1. erase the chip
2. flash s132 hex
3. flash bootloader form the uart example (Q0: when must i prepare a bl_setting file and merge it or flash it before or with the bootloader ?? )
4. use the nrfutil dfu serial .. on a zip file of my app
Q1: when it works, there are more the 30 seconds that nothing happens, then (if i am on the debug example) i can see the files being moved, is this time normal (it seems to create a problem when i use wtd in my app and do another dfu after app has run) ??
could it be related to the "wait for event" mechanism ? which operates without the sd though there is a softdevice on the flash (see following code)??
static void wait_for_event(void)
{
#if defined(BLE_STACK_SUPPORT_REQD) || defined(ANT_STACK_SUPPORT_REQD)
(void)sd_app_evt_wait();
#else
// Wait for an event.
in_forever_loop++;
__WFE();
// Clear the internal event register.
__SEV();
__WFE();
#endif
}
Q2: if i want to have an app that uses ble, should i use the dfu over ble example and reconfigure it to use uart for dfu ?? .. if so, how can this be done ?? and if i do use the BLE dfu as bootloader base will i have problems with initiation of sd in the application init ??
Q3: i have tried to compare to uart and ble dfu examples to find out where there is a choice between initiating a uart or ble event handler, and i could not find it .. i saw that this define: "NRF_DFU_TRANSPORT_BLE" make some difference in fstorage which i am not sure i got what it does and what is the difference between sd to nvcm and if that can create some issues with flash placements and bootloader or sd overwritten by app or some mess like that ( cause the mentioned defined also defines the flash area to be protected which is neglected in the uart example
// Size of the flash area to protect.
uint32_t area_size;
area_size = BOOTLOADER_SIZE + NRF_MBR_PARAMS_PAGE_SIZE;
if (!NRF_BL_DFU_ALLOW_UPDATE_FROM_APP && !NRF_BL_DFU_ENTER_METHOD_BUTTONLESS && !NRF_DFU_TRANSPORT_BLE)
{
area_size += BOOTLOADER_SETTINGS_PAGE_SIZE;
}
size_of_flash_to_protect = area_size;
ret_val = nrf_bootloader_flash_protect(BOOTLOADER_START_ADDR,
area_size,
NRF_BOOTLOADER_READ_PROTECT);
)
also, in the uart sdk_config there is this define : SLIP_ENABLED 1, which i could not find any reference to it in the bootloader project, and in the ble dfu there is this define (which is not in the uart dfu) NRF_SECTION_ITER_ENABLED 1 and again, not sure what what kind of distinction it creates between the uart and the ble dfu
my app flash info is: FLASH_START=0x26000;FLASH_SIZE=0x3a000 (if this may be required)
i have read docs about bootloader and bl_setting etc. unfortunately all this theory does not help me to understand what's going on in the bootloader examples
any help would be most appreciated
best regards
Ziv