This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Softdevice - I cannot set tx power above +4dBm but as per the datasheet it supports up to +8dbm

Hello,

I am doing BLE advertising on the nRF52833  and using nRF5 SK 17.0.2. I cannot set TX power above +4dbm from sd_ble_gap_tx_power_set(). I have checked in nrf_gap.h header file there also written " @note Supported tx_power values: -40dBm, -20dBm, -16dBm, -12dBm, -8dBm, -4dBm, 0dBm, +3dBm and +4dBm." So then how can I set it to +8dbm?

Thanks in advance.

Regards,

Neeraj Dhekale

  • Hello Einar Thorsrud,

    Sorry for the late reply. I was busy solving my other problems of nRF.

    As you suggested I have copied the PCA10056 > S140 folder from other projects and by comparing I made the required changes in the above folder and it got built successfully. But whenever nrf_sdh_ble_enable() function executes from ble_stack_init() function.  it throws error "<error> app: Fatal error". If you want I can explain what changes I have made to create the PCA10056 > S140 folder.

    But when I tried to go back and check the working in PCA10040 > S132 folder. It works completely fine.

    Please correct me if I am doing anything wrong.

    Thanks and regards,

    Neeraj

  • Hi Neeraj,

    When you get "Fatal error" that mens an APP_ERROR_CHECK has detected an error. If you make a debug build (define DEBUG and DEBUG_NRF for the project), the log should tell you which error code was detected at which line in which file. That gives much more to go on, so please check that first (note that if you are using a SES example project, you can simply select the Debug build target, which will do this for you automatically).

    Einar

  • Hello Einar Thorsrud,

    Thanks for this information.

    I did the same as you suggested and got below error log.

    <info> app: *****************DEVICE STARTED********************.
    <info> app: [1;32mEvent: FDS_EVT_INIT received (NRF_SUCCESS)
    <info> app: After fds_record_find.
    <info> app: nrf_sdh_enable_request 0
    <info> app: nrf_sdh_ble_default_cfg_set 0
    <error> app: ERROR 4 [NRF_ERROR_NO_MEM] at /home/neeraj/Applications/EmbeddedStudio_ARM_Nordic_v568_linux_x64/nRF5SDK1702d674dde/nRF5_SDK_17.0.2_d674dde/examples/peripheral/iotians_device_loadcell/IG_BLE.c:456
    PC at: 0x0002A4D3
    <error> app: End of error report

    I belive this is because of incorrect flash setting. So I have tried to change Linker > Section Placement Macros >But the problem still remains. My Current  Section Placement Macros  is as follows:

    FLASH_PH_START=0x0
    FLASH_PH_SIZE=0x100000
    RAM_PH_START=0x20000000
    RAM_PH_SIZE=0x40000
    FLASH_START=0x27000
    FLASH_SIZE=0xd9000
    RAM_START=0x200018d8
    RAM_SIZE=0x3e728

    Please check if this is correct.

    Thanks and regards,

    Neeraj Dhekale

  • Hello Einar Thorsrud,

    I did one thing. It was known that it works on PCA10040 > S132 folder as mentioned above. So I opened project PCA10040 > S132 and copied below 2 lines from Section Placement Macros from S132 and used it in the PCA10056 > S140 folder. And it works fine now.

    RAM_START=0x20005968
    RAM_SIZE=0xa698
    

    Let me know, is this correct way to do so?

    Thanks for your support.

    Regards,

    Neeraj Dhekale

  • Yes, the error you got indicates that the application RAM needs to be adjusted to make more room for the SoftDevice. For details on how to optimize, I suggest you refer to Adjustment of RAM and Flash memory.

Related