Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

PA/LNA in bootloader

Hello.

I have pa/lna on my device. It works properly in application (rssi is about 30 dbm). But when application goes into bootloader (dfu over ble using nrfconnect on android) rssi is about 95-100 dbm. 

I tried to add pa/lna init to secure_bootloader code. And when i download this on erased chip, I see that rssi is about 20-30 in bootloader mode. But function sd_ble_opt_set() return 1. And when I download the application and start dfu, the application goes into bootloader mode and the signal level becomes 100 again.

Why it happens?

Parents
  • Hi,

    I assume the PA/LNA is controlled by GPIO pins using the PA/LNA support in the SoftDevice? Essentially this is just the SoftDevice asserting selected GPIO pins when there is radioactivity, so it is no different than controlling any other GPIO pins. It should be the same in the bootloader and application, but it has to be configured in both since the SoftDevice is initialized separately in the bootloader and application. Have you checked with a logic analyzer to see if the GPIO pins are controlled as expected? How do you configure the PA/LAN control in the SoftDevice and application?

  • I did some experiments:

    1. I use this script:

    nrfutil settings generate --family NRF52840 --application ../Output/Debug/Exe/app.hex --application-version 0 --bootloader-version 0 --bl-settings-version 1 bootloader_setting.hex
    mergehex --merge s140_nrf52_6.1.0_softdevice.hex secure_bootloader_ble_s140_pca10056_debug.hex bootloader_setting.hex --output bl_with_sd.hex
    mergehex --merge ../Output/Debug/Exe/app.hex bl_with_sd.hex --output my_app.hex
    nrfjprog --family NRF52 --reset --program my_app.hex --chiperase --verify

    And in my app I call function ble_dfu_buttonless_bootloader_start_prepare() after ble_dfu_support_service_init() and device enter bootloader mode. Result: rssi over 90-100.

    2. I use this script:

    mergehex --merge s140_nrf52_6.1.0_softdevice.hex secure_bootloader_ble_s140_pca10056_debug.hex bootloader_setting.hex --output bl_with_sd.hex
    nrfjprog --family NRF52 --reset --program bl_with_sd.hex --chiperase --verify

    Result: rssi over 20-30.

    My changes in secure_bootloader code are adding pa_lna_start() function and initialization pins before nrf_bootloader_init().

Reply
  • I did some experiments:

    1. I use this script:

    nrfutil settings generate --family NRF52840 --application ../Output/Debug/Exe/app.hex --application-version 0 --bootloader-version 0 --bl-settings-version 1 bootloader_setting.hex
    mergehex --merge s140_nrf52_6.1.0_softdevice.hex secure_bootloader_ble_s140_pca10056_debug.hex bootloader_setting.hex --output bl_with_sd.hex
    mergehex --merge ../Output/Debug/Exe/app.hex bl_with_sd.hex --output my_app.hex
    nrfjprog --family NRF52 --reset --program my_app.hex --chiperase --verify

    And in my app I call function ble_dfu_buttonless_bootloader_start_prepare() after ble_dfu_support_service_init() and device enter bootloader mode. Result: rssi over 90-100.

    2. I use this script:

    mergehex --merge s140_nrf52_6.1.0_softdevice.hex secure_bootloader_ble_s140_pca10056_debug.hex bootloader_setting.hex --output bl_with_sd.hex
    nrfjprog --family NRF52 --reset --program bl_with_sd.hex --chiperase --verify

    Result: rssi over 20-30.

    My changes in secure_bootloader code are adding pa_lna_start() function and initialization pins before nrf_bootloader_init().

Children
No Data
Related