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?

Parents
  • @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.

Reply
  • @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.

Children
No Data
Related