nRF52840 dongle, BLE peripheral_uart example, SDK migration from 2.6.0 to 2.9.0

Hello,

I have working BLE peripheral_uart example based application using nRF52840 dongle with SDK v2.6.0.

I tried to upgrade SDK to v2.7.0/v2.8.0/v2.9.0.

v2.7.0 seems to start, if I do NOT use sysbuild; with sysbuild application hangs.

Others (v2.8.0/v2.9.0) with sysbuild might print something to USB ACM uart console, but they stuck either earlier or latest to bt_enable() call.

Tried also DevAcademy BLE Lesson 4 exercise 3 solution, but it does not work either (when trying to use sysbuild). I tried to compare changes in this example v2.6.0 vs. v2.7.0 folders, but no luck.

BLE peripheral_uart example with SDK v2.9.0 with "no sysbuild" seems to work (led is blinking, nRF mobile app is able to connect). Below log printed to terminal.
*** Booting My Application v2.9.0 - unknown commit ***
*** Using nRF Connect SDK v2.9.0-7787b2649840 ***
*** Using Zephyr OS v3.7.99-1f8f3dc29142 ***
Main Feb 3 2025 22:41:16
Starting Nordic UART service example
[00:00:00.001,892] <inf> peripheral_uart: Wait for DTR
[00:00:00.502,288] <inf> peripheral_uart: DTR set
[00:00:00.511,749] <dbg> peripheral_uart: uart_cb: UART_TX_DONE
[00:00:00.514,068] <inf> fs_zms: 4 Sectors of 4096 bytes
[00:00:00.514,068] <inf> fs_zms: alloc wra: 0, f90
[00:00:00.514,099] <inf> fs_zms: data wra: 0, 10
[00:00:00.514,221] <inf> bt_sdc_hci_driver: SoftDevice Controller build revision:
2d 79 a1 c8 6a 40 b7 3c f6 74 f9 0b 22 d3 c4 80 |-y..j@.< .t.."...
74 72 82 ba |tr..
[00:00:00.516,937] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
[00:00:00.516,967] <inf> bt_hci_core: HW Variant: nRF52x (0x0002)
[00:00:00.516,998] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 45.41337 Build 3074452168
[00:00:00.517,456] <inf> bt_hci_core: No ID address. App must call settings_load()
[00:00:00.517,578] <inf> peripheral_uart: Bluetooth initialized
[00:00:00.518,188] <inf> bt_hci_core: Identity: F8:5E:7B:DF:16:5E (random)
[00:00:00.518,218] <inf> bt_hci_core: HCI: version 6.0 (0x0e) revision 0x106b, manufacturer 0x0059
[00:00:00.518,249] <inf> bt_hci_core: LMP: version 6.0 (0x0e) subver 0x106b

So I'm needing help how to use this BLE peripheral_uart example to make it work with SDK v2.9.0 and sysbuild.

Parents
  • Hello,

    Sysbuild automatically enables the Partition Manager to manage the device memory layout. The problem is that places the settings storage partition used for storing BLE bonding information at the end of the flash. This overlaps with the pre-programmed bootloader. The solution is to create a static partition for the Partition Manager to reserve this area as I've done in the modified version of the project below.

    Modified peripheral_uart sample (SDK v2.9.0)

    peripheral_uart_dongle.zip

    Changes

    diff --git a/Kconfig b/Kconfig
    index 20633d3..e1ce3da 100644
    --- a/Kconfig
    +++ b/Kconfig
    @@ -33,6 +33,9 @@ config BT_NUS_UART_RX_WAIT_TIME
     	help
     	  Wait for RX complete event time in microseconds
     
    +config UART_ASYNC_ADAPTER
    +	default y if BOARD_NRF52840DONGLE
    +
     config SETTINGS
     	default y
     
    diff --git a/boards/nrf52840dongle_nrf52840.overlay b/boards/nrf52840dongle_nrf52840.overlay
    new file mode 100644
    index 0000000..b994ffb
    --- /dev/null
    +++ b/boards/nrf52840dongle_nrf52840.overlay
    @@ -0,0 +1,5 @@
    +/ {
    +	chosen {
    +		nordic,nus-uart = &cdc_acm_uart;
    +	};
    +};
    \ No newline at end of file
    diff --git a/boards/nrf52840dongle_nrf52840_pm_static.yml b/boards/nrf52840dongle_nrf52840_pm_static.yml
    new file mode 100644
    index 0000000..ae8446e
    --- /dev/null
    +++ b/boards/nrf52840dongle_nrf52840_pm_static.yml
    @@ -0,0 +1,10 @@
    +nrf5_bootloader:
    +  address: 0xE0000
    +  end_address: 0x100000
    +  placement:
    +    align:
    +      start: 0x1000
    +    before:
    +    - end
    +  region: flash_primary
    +  size: 0x20000
    \ No newline at end of file
    diff --git a/sample.yaml b/sample.yaml
    index dbf218c..4469dba 100644
    --- a/sample.yaml
    +++ b/sample.yaml
    @@ -10,6 +10,7 @@ tests:
           thingy53/nrf5340/cpuapp/ns nrf21540dk/nrf52840 nrf54l15dk/nrf54l05/cpuapp
           nrf54l15dk/nrf54l10/cpuapp nrf54l15dk/nrf54l15/cpuapp
           nrf54h20dk/nrf54h20/cpuapp nrf54h20dk/nrf54h20/cpurad
    +      nrf52840dongle/nrf52840
         integration_platforms:
           - nrf52dk/nrf52832
           - nrf52833dk/nrf52833
    diff --git a/sysbuild.cmake b/sysbuild.cmake
    new file mode 100644
    index 0000000..aa2619b
    --- /dev/null
    +++ b/sysbuild.cmake
    @@ -0,0 +1,3 @@
    +if(SB_CONFIG_BOARD_NRF52840DONGLE)
    +  set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_LIST_DIR}/boards/nrf52840dongle_nrf52840_pm_static.yml CACHE INTERNAL "")
    +endif()

  • Hello,

    Thank you for very fast response!

    These modifications helped and know I'm able to use SDK v2.9.0 with sysbuild.

Reply Children
No Data
Related