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

nRF5340 VREQCTRL for Additional 3 dB TX Power

Hi team,

I am working with the nRF5340 PDK v0.8.0 and I am trying to request the additional voltage for the VREGRADIO to support the additional 3 dB TX power on the RADIO. I am using the radio_test example in the SDK (nrf\samples\peripheral\radio_test) for this. To facilitate this, the only changes I made were to the main.c file as seen below. Is this the correct way to request the higher voltage? When debugging I am not seeing the bit value in the register change but I am printing out the correct value of the register (see screenshot below).

Unfortunately, I do not have the proper RF equipment to measure the extra 3 dB change in output power. I only have the RSSI Viewer with the nRF52840 Dongle which doesn't look to be changing from having this to not having this.

Added:

Fullscreen
1
#include <nrfx/hal/nrf_vreqctrl.h>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Fullscreen
1
2
3
nrf_vreqctrl_radio_high_voltage_set(NRF_VREQCTRL_NS, true);
while(!nrf_vreqctrl_radio_high_voltage_check(NRF_VREQCTRL_NS));
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Also some printk statements. Here is my final main.c file:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
* Copyright (c) 2020 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-BSD-5-Clause-Nordic
*/
#include <sys/printk.h>
#include <drivers/clock_control.h>
#include <drivers/clock_control/nrf_clock_control.h>
#include <nrfx/hal/nrf_vreqctrl.h>
static void clock_init(void)
{
int err;
struct device *clock;
enum clock_control_status clock_status;
clock = device_get_binding(DT_INST_0_NORDIC_NRF_CLOCK_LABEL);
if (!clock) {
printk("Unable to find clock device binding\n");
return;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Regards,

Akash Patel