This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

bootloader not showing advertising data on custom board

Hi

I used the boot loader example successfully on the nrf51DK board. Now I want to use it on my custom board. So I recompiled the boot loader code, with 1 difference: routed the UPDATE_IN_PROGRESS_LED and BOOTLOADER_BUTTON to a different IO. For the rest everything stays the same, same clock source and everything.

When I program SD v7.3.0 and boot loader example from the SDK7.2.0 on the nrfDK board, I can see it advertising as DFU Targ. When I program it on my own board, I see no advertising.

I know the board is ok, as I developed and tested all my application software on my own board, all ok. The only real difference that I can see is that I use an nrf51822 with 256k Flash and 16k RAM, rather than the nrf51422 on the development kit.

I tried putting in some blinking led statements to see where it might go wrong, and I notice that I do not get past the following statement (in fu_transport_ble.c, dfu_transport_update_start):

err_code = dfu_ble_get_peer_data(&m_ble_peer_data);

When digging down deeper, it seems that something goes wrong when returning from crc16_compute().

Any ideas?

  • @wim: You need to reconfigure the bootloader to make it debug-able. You can have a look here on how to do it, at section F. dfu_ble_get_peer_data() shouldn't cause any trouble, what it does it to check if you have peer data in IRAM2 to re-encrypt the link. In your case you would not have anything there and the function return NRF_ERROR_INVALID_DATA. This is normal.

    Make sure you have configured the IROM1, IRAM1, IRAM2 in the project setting correctly. Secondly, make sure dfu_ble_svc.c file is configure so that it has "Memory Assignment" of Zero Initialized Data at IRAM2.

  • Make sure you have configured the IROM1, IRAM1, IRAM2 in the project setting correctly. Secondly, make sure dfu_ble_svc.c file is configure so that it has "Memory Assignment" of Zero Initialized Data at IRAM2. How do I do that? in my project IROM1 is set to start 0x3C00 and size 0x3C00, IRAM1 is set to 0x20002C00 and size 0x5380, and IRAM2 is set to start 0x20007F80 and size 0x80. Furthermore, on IROM1, IRAM1 and IRAM2 the 'default' checkbox is checked, and on IRAM2, the NoInit checkbock is checked. Or in other words: I kept the defaults of the (Keil) project. Do I have to set different values for these fields? And how do I do memory assignment of zero initialized data at IRAM2?

Related