Set +3dbm power on nrf5340

Hello,

We want to set Tx power of +3dbm i followed the procedure as mentioned in following ticket:

 nRF5340 Radio Tx power 

I set the high voltage in network core main as following:

	nrf_vreqctrl_radio_high_voltage_set(NRF_VREQCTRL, true);
	while(!nrf_vreqctrl_radio_high_voltage_check(NRF_VREQCTRL));
	if (nrf_vreqctrl_radio_high_voltage_check(NRF_VREQCTRL)) {
		LOG_DBG("VREQH configuration success");
	} else {
		LOG_DBG("VREQH configuration failed");
	}

we set value 3 using 

bt_hci_cmd_send_sync(BT_HCI_OP_VS_WRITE_TX_POWER_LEVEL,
buf, &rsp);


While testing with analyzer we get +1.8dbm value.


Can you help us how we can get exact +3dbm?

Regards

  • Hi mapg,

    My apology for claiming it to be not a public API. I cannot find it in the documentation and thought that it is some inner functions being used directly.
    It seems that it is the way to do it, as officially demonstrated in the Bluetooth: HCI Power Control Zephyr sample.

    Just to be sure that software is not the problem, could you please share how buf is setup in your call to bt_hci_cmd_send_sync()?

    Meanwhile, I cannot find an alternative way to set TX Power via software (so as to rule out software as a potential cause).

    If it turns out to be not software, would you mind sharing your hardware files for a review?

    Best regards,

    Hieu

  • Hello Hieu,

    We are already using the bt_hci_cmd_send_sync and its working values -40dbm, 0dbm.
    But for 3dbm its not giving the correct measurements.

    I am doing doing the configuration in following order:


    • Enable the high voltage on RADIO using  nrf_vreqctrl_radio_high_voltage_set
    • The setting the Tx power as mentioned in the Bluetooth: HCI Power

    Is there any stack configuration i am missing? Which needs to be enabled.
    Another question Do the stack already configured to have maximum 3dbm value? May be there is some define in the stack which set the maximum to 0dbm.

    I am passing 3 as argument to set_tx_power for setting 3dbm.

    I have seen that in hal/nrf5/radio/radio_nrf5340.h


    Which says the maximum power is 0dbm. Then how the 3dbm can be configured?

     

  • Hi mapg,

    That is a very interesting discovery. I will have to double check with the internal team on why that file is implemented like that and if it affects anything. My quick check shows that it is probably an error of the author, and it shouldn't affect anything.

    Meanwhile, a colleague points out that you might be affected by this erratum. Could you please give it a look and see if the step to trigger that errata problem matches your current software behavior? 
    https://infocenter.nordicsemi.com/topic/errata_nRF5340_Rev1/ERR/nRF5340/Rev1/latest/anomaly_340_158.html

    Best regards,

    Hieu

Related