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

How to modify Tx Power and Mode of NRF52832 ?

Hello, 

I am using ble_app_uart_c example for my nRF52832 based central application. I would like to modify Tx Power and MODE of my device. 

As per datasheet, I should write into TXPOWER register having address offset 0x5C  and MODE register having address offset 0x510.

Please tell how to write into these registers in a program. What are the default values of these register in ble_app_uart_c example?

nRF SDK I am using - nRF5_SDK_12.2.0_f012efa

SoftDevice - S132

IC - nRF52832 SoC

Someone please help me in this regard.

Thank you in advance.

Parents
  • Hi Saiteja, 

    the ble_app_uart_c example is a Bluetooth Low Energy Central example that uses the S132 SoftDevice. When the SoftDevice is enabled it takes control of several HW peripherals that are needed by the BLE protocol stack. The following peripherals are blocked from Application access

    • RADIO
    • TIMER0
    • RTC0
    • CCM
    • AAR
    • EGU4/SWI5
    • EGU5/SWI5

    The SoftDevice also restricts access to certain peripherals, see Chapter 8System on Chip resource requirements in the S132 v3.0 SoftDevice Specification

    So in order to adjust the TX output power you will need to use the sd_ble_gap_tx_power_set function in the SoftDevice API. The SoftDevice is a BLE protocol stack so you can only switch between the BLE_1Mbit and BLE_2Mbit modulations. This is also done through the SoftDevice API. However, the S132 v3.x.x SoftDevicewhich is used in SDK v12.2.0 is a Bluetooth v4.2 stack, so it does not support the 2Mbit modulations, which is a Bluetooth 5 feature. If want to use this feature you need to migrate to a newer SDK and SoftDevice version, i.e. SDK v15.3.0 and S132 v6.1.1.

    Best regards

    Bjørn

Reply
  • Hi Saiteja, 

    the ble_app_uart_c example is a Bluetooth Low Energy Central example that uses the S132 SoftDevice. When the SoftDevice is enabled it takes control of several HW peripherals that are needed by the BLE protocol stack. The following peripherals are blocked from Application access

    • RADIO
    • TIMER0
    • RTC0
    • CCM
    • AAR
    • EGU4/SWI5
    • EGU5/SWI5

    The SoftDevice also restricts access to certain peripherals, see Chapter 8System on Chip resource requirements in the S132 v3.0 SoftDevice Specification

    So in order to adjust the TX output power you will need to use the sd_ble_gap_tx_power_set function in the SoftDevice API. The SoftDevice is a BLE protocol stack so you can only switch between the BLE_1Mbit and BLE_2Mbit modulations. This is also done through the SoftDevice API. However, the S132 v3.x.x SoftDevicewhich is used in SDK v12.2.0 is a Bluetooth v4.2 stack, so it does not support the 2Mbit modulations, which is a Bluetooth 5 feature. If want to use this feature you need to migrate to a newer SDK and SoftDevice version, i.e. SDK v15.3.0 and S132 v6.1.1.

    Best regards

    Bjørn

Children
Related