<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Setting Tramsmission-Power but current Consumption Peaks doesn&amp;#39;t change</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/107689/setting-tramsmission-power-but-current-consumption-peaks-doesn-t-change</link><description>Hello, 
 
 I am currently working with the PAN1780 EVB which is based one the nrf52840 and everything until now is working as excpected. 
 Now I wanted to change the Transmission power to lower my power consumption, I would expect if I got a lower TX</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 06 Feb 2024 14:06:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/107689/setting-tramsmission-power-but-current-consumption-peaks-doesn-t-change" /><item><title>RE: Setting Tramsmission-Power but current Consumption Peaks doesn't change</title><link>https://devzone.nordicsemi.com/thread/467764?ContentTypeID=1</link><pubDate>Tue, 06 Feb 2024 14:06:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0004fe5f-24f0-4036-9514-c6417b5f3d62</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Quirin,&lt;/p&gt;
&lt;p&gt;Don&amp;#39;t worry, I have been out of office as well, and still am partially, actually.&lt;/p&gt;
&lt;p&gt;I still suspect that is the PPK&amp;nbsp;producing that sharp overshoot towards the left side of every peaks. If you can add the dynamic TX Power control to the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.5.2/nrf/samples/bluetooth/throughput/README.html"&gt;Bluetooth: Throughput&lt;/a&gt;&amp;nbsp;sample, where the TX peak should be kept longer, it should show more clearly.&lt;/p&gt;
&lt;p&gt;The advanced equipment should help even faster, if you plan to do that already.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting Tramsmission-Power but current Consumption Peaks doesn't change</title><link>https://devzone.nordicsemi.com/thread/467712?ContentTypeID=1</link><pubDate>Tue, 06 Feb 2024 10:15:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a03ac29-b11d-4160-8c4b-693ac6fcdb1a</guid><dc:creator>qrn</dc:creator><description>&lt;p&gt;Hi Hieu,&lt;/p&gt;
&lt;p&gt;Thanks for your help.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Sorry for the late reply I was out of office.&lt;/span&gt;&lt;/p&gt;
[quote userid="9456" url="~/f/nordic-q-a/107689/setting-tramsmission-power-but-current-consumption-peaks-doesn-t-change/466951"]&lt;p&gt;Those short spikes are likely due the PPK2&amp;#39;s limitation, rather than there actually being a spike. We have seen such cases before.&lt;/p&gt;
&lt;p&gt;If you use more advanced equipment, there ought to be no irregularity like that.&lt;/p&gt;
&lt;div class="quote-header"&gt;&lt;/div&gt;&lt;blockquote class="quote"&gt;&lt;div class="quote-user"&gt;qrn said:&lt;/div&gt;&lt;/blockquote&gt;[/quote]
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I will test everything with advanced equipment to see if it&amp;#39;s indeed a problem with the PPK2.&lt;/p&gt;
[quote userid="9456" url="~/f/nordic-q-a/107689/setting-tramsmission-power-but-current-consumption-peaks-doesn-t-change/466951"]1. The current peak was too short for the PPK2 to measure properly. Try turning the sampling rate of the tool to the highest possible to mitigate this.[/quote]
&lt;p&gt;I don&amp;#39;t think that could be the Problem I&amp;#39;m&amp;nbsp; always testing with the highest possible sampling Rate of 100,000 samples per Second&lt;/p&gt;
[quote userid="9456" url="~/f/nordic-q-a/107689/setting-tramsmission-power-but-current-consumption-peaks-doesn-t-change/466951"]2. The connection TX Power was not changed to 0dB at all. This should not be the case, because the connection should be established with the same TX Power that was used for advertising. Could you please try printing NRF_RADIO-&amp;gt;TXPOWER repeatedly to see if the number is ever -40 or 8 during a connection? Note that outside of the radio TX time, the register value can go back to 0.[/quote]
&lt;p&gt;I tested the TX Power with the HCI Power Control Sample I modified the Dynamic TX power setting during Connection to a cycle like in the Advertising and read the TX_Power from the Register like you said.&lt;/p&gt;
&lt;p&gt;Here are my results&lt;/p&gt;
&lt;p&gt;The TX_Power is changing every 4s for 8dbM there is a huge difference but for the other dBm Values it&amp;#39;s pretty much the same.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/hci_5F00_pwr_5F00_cylce.png" /&gt;&lt;/p&gt;
&lt;p&gt;I did some close ups for the values.&lt;/p&gt;
&lt;p&gt;I left 8dBm out because it&amp;#39;s clearly different.&lt;/p&gt;
&lt;p&gt;0dBm:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/hci_5F00_pwr_5F00_cylce_5F00_0dBm.png" /&gt;&lt;/p&gt;
&lt;p&gt;-8dBm:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/hci_5F00_pwr_5F00_cylce_5F002D00_8dBm.png" /&gt;&lt;/p&gt;
&lt;p&gt;-20dBm:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/hci_5F00_pwr_5F00_cylce_5F002D00_20dBm.png" /&gt;&lt;/p&gt;
&lt;p&gt;-40dBm:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/hci_5F00_pwr_5F00_cylce_5F002D00_40dBm.png" /&gt;&lt;/p&gt;
&lt;p&gt;All of them look&amp;nbsp;pretty much the same. Every Peak within a TX_POWER value looks a bit different so I could look out for Peaks of different dBms to look even more similar.&lt;/p&gt;
&lt;p&gt;Here is the Console Output the TX_POWER REGISTER is printed in unsigned int but I see that its in Fact changing&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/hci_5F00_pwr_5F00_cylce_5F00_console_5F00_1.png" /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/hci_5F00_pwr_5F00_cylce_5F00_console_5F00_2.png" /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/hci_5F00_pwr_5F00_cylce_5F00_console_5F00_3.png" /&gt;&lt;/p&gt;
&lt;p&gt;I only changed some txpower values, the modulate_tx_power function and added the some code to the main loop the rest is the same.&lt;/p&gt;
&lt;p&gt;I put it together for you here:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static const int8_t txpower[DEVICE_BEACON_TXPOWER_NUM] = {8, 0, -8,
							   -18, -23, -40};

void modulate_tx_power(void *p1, void *p2, void *p3)
{
	int8_t txp_get = 0;
	uint8_t idx = 0;

	while (1) {
		// if (!default_conn) {
			printk(&amp;quot;Set Tx power level to %d\n&amp;quot;, txpower[idx]);
			set_tx_power(BT_HCI_VS_LL_HANDLE_TYPE_ADV,
				     0, txpower[idx]);
			set_tx_power(BT_HCI_VS_LL_HANDLE_TYPE_CONN,
				     0, txpower[idx]);

			k_sleep(K_SECONDS(5));

			printk(&amp;quot;Get Tx power level -&amp;gt; &amp;quot;);
			get_tx_power(BT_HCI_VS_LL_HANDLE_TYPE_ADV,
				     0, &amp;amp;txp_get);
			get_tx_power(BT_HCI_VS_LL_HANDLE_TYPE_CONN,
				     0, &amp;amp;txp_get);
			printk(&amp;quot;TXP = %d\n&amp;quot;, txp_get);
			printk(&amp;quot;TX_POWER FROM REGISTER: %u\n&amp;quot;, NRF_RADIO-&amp;gt;TXPOWER);

			idx = (idx+1) % DEVICE_BEACON_TXPOWER_NUM;
		// } else {
		// 	int8_t rssi = 0xFF;
		// 	int8_t txp_adaptive;

		// 	idx = 0;

		// 	read_conn_rssi(default_conn_handle, &amp;amp;rssi);
		// 	printk(&amp;quot;Connected (%d) - RSSI = %d\n&amp;quot;,
		// 	       default_conn_handle, rssi);
		// 	if (rssi &amp;gt; -70) {
		// 		txp_adaptive = -20;
		// 	} else if (rssi &amp;gt; -90) {
		// 		txp_adaptive = -12;
		// 	} else {
		// 		txp_adaptive = -4;
		// 	}
		// 	printk(&amp;quot;Adaptive Tx power selected = %d\n&amp;quot;,
		// 	       txp_adaptive);
		// 	set_tx_power(BT_HCI_VS_LL_HANDLE_TYPE_CONN,
		// 		     default_conn_handle, txp_adaptive);
		// 	get_tx_power(BT_HCI_VS_LL_HANDLE_TYPE_CONN,
		// 		     default_conn_handle, &amp;amp;txp_get);
		// 	printk(&amp;quot;Connection (%d) TXP = %d\n&amp;quot;,
		// 	       default_conn_handle, txp_get);

		// 	k_sleep(K_SECONDS(1));
		// 	printk(&amp;quot;TX_POWER FROM REGISTER: %d\n&amp;quot;, (int)NRF_RADIO-&amp;gt;TXPOWER);

		// }
	}
}

// in main //

	while (1) {
		hrs_notify();
		printk(&amp;quot;TX_POWER FROM REGISTER MAIN: %d\n&amp;quot;, NRF_RADIO-&amp;gt;TXPOWER);
		k_sleep(K_MSEC(200));
	}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards Quirin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting Tramsmission-Power but current Consumption Peaks doesn't change</title><link>https://devzone.nordicsemi.com/thread/466951?ContentTypeID=1</link><pubDate>Wed, 31 Jan 2024 13:27:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ccf89caf-0d16-40ab-b401-c4e5476100e7</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Quirin,&lt;/p&gt;
[quote user="qrn"]As seen there is a noticable difference between 8&lt;span&gt;dbM&lt;/span&gt; and -40dbM, which is great. But even at -40dbM there s a peak to 15mA I can&amp;#39;t explain?[/quote]
&lt;p&gt;Those short spikes are likely due the PPK2&amp;#39;s limitation, rather than there actually being a spike. We have seen such cases before.&lt;/p&gt;
&lt;p&gt;If you use more advanced equipment, there ought to be no irregularity like that.&lt;/p&gt;
[quote user="qrn"]&lt;p&gt;As seen there is a noticable difference between 8&lt;span&gt;dbM&lt;/span&gt; and -40dbM, which is great. But even at -40dbM there s a peak to 15mA I can&amp;#39;t explain?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;To test the TX power during a Connection because thats the state where the device is primally in, I tested this:&amp;nbsp;&lt;a href="https://academy.nordicsemi.com/courses/bluetooth-low-energy-fundamentals/lessons/lesson-2-bluetooth-le-advertising/topic/blefund-lesson-2-exercise-3/"&gt;Exercise 3 – Nordic Developer Academy (nordicsemi.com)&lt;/a&gt;&amp;nbsp;because it was the lowest possible Connection Example I could think of.&lt;/p&gt;
&lt;p&gt;That are the results tested during Connection:&lt;/p&gt;
&lt;p&gt;I changed the TX-power&amp;nbsp;through the prj.conf file as before in the beacon example.&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;As seen there is no noticable difference in Current Consumption is this the normal behavior, because I somehow thought the Current Consumption should be way lower when the TX power is set to -40dbM.&lt;/p&gt;[/quote]
&lt;p&gt;I have two guesses regarding this:&lt;/p&gt;
&lt;p&gt;1. The current peak was too short for the PPK2 to measure properly. Try turning the sampling rate of the tool to the highest possible to mitigate this.&lt;/p&gt;
&lt;p&gt;2. The connection TX Power was not changed to 0dB at all. This should not be the case, because the connection should be established with the same TX Power that was used for advertising. Could you please try printing NRF_RADIO-&amp;gt;TXPOWER repeatedly to see if the number is ever -40 or 8 during a connection? Note that outside of the radio TX time, the register value can go back to 0.&lt;/p&gt;
&lt;p&gt;Besides that, please&amp;nbsp;test with this sample and see if there are clear differences when changing the TX Power while running the same application:&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.5.1/zephyr/samples/bluetooth/hci_pwr_ctrl/README.html"&gt;Bluetooth: HCI Power Control&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting Tramsmission-Power but current Consumption Peaks doesn't change</title><link>https://devzone.nordicsemi.com/thread/466692?ContentTypeID=1</link><pubDate>Tue, 30 Jan 2024 09:28:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3edd536d-33f2-42e2-b673-97e16132e7bc</guid><dc:creator>qrn</dc:creator><description>&lt;p&gt;Hi Hieu,&lt;/p&gt;
&lt;p&gt;I hope you had a great Weekend.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I did some testing with the nrf sample for beacon Advertising.&lt;/p&gt;
&lt;p&gt;I manually changed the TX-Power in the prj.conf from 8dbM to -40dbM and made some screenshots.&lt;/p&gt;
&lt;p&gt;As the sample only shows non connectable advertising here are some screenshots of the peaks during Advertising. I also turned of Logging and Seriel output to reduce the idle consumption from around 750uA to around 1uA&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_BT_CTLR_TX_PWR_PLUS_8&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/bluetooth-beacon-example_5F00_8dbM.png" /&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_BT_CTLR_TX_PWR_MINUS_40&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;img style="height:auto;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x0/__key/communityserver-discussions-components-files/4/bluetooth-beacon-example_5F002D00_40dbM.png" /&gt;&lt;/p&gt;
&lt;p&gt;As seen there is a noticable difference between 8&lt;span&gt;dbM&lt;/span&gt; and -40dbM, which is great. But even at -40dbM there s a peak to 15mA I can&amp;#39;t explain?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;To test the TX power during a Connection because thats the state where the device is primally in, I tested this:&amp;nbsp;&lt;a href="https://academy.nordicsemi.com/courses/bluetooth-low-energy-fundamentals/lessons/lesson-2-bluetooth-le-advertising/topic/blefund-lesson-2-exercise-3/"&gt;Exercise 3 &amp;ndash; Nordic Developer Academy (nordicsemi.com)&lt;/a&gt;&amp;nbsp;because it was the lowest possible Connection Example I could think of.&lt;/p&gt;
&lt;p&gt;That are the results tested during Connection:&lt;/p&gt;
&lt;p&gt;I changed the TX-power&amp;nbsp;through the prj.conf file as before in the beacon example.&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_BT_CTLR_TX_PWR_PLUS_8&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/less2_5F00_ex3_5F00_8dM_5F00_conn.png" /&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_BT_CTLR_TX_PWR_MINUS_40&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/less2_5F00_ex3_5F002D00_40dM_5F00_conn.png" /&gt;&lt;/p&gt;
&lt;p&gt;As seen there is no noticable difference in Current Consumption is this the normal behavior, because I somehow thought the Current Consumption should be way lower when the TX power is set to -40dbM.&lt;/p&gt;
&lt;p&gt;For reference here is the Code from the Link shown above:&lt;/p&gt;
&lt;p&gt;main.c:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/*
 * Copyright (c) 2023 Nordic Semiconductor ASA
 *
 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
 */

#include &amp;lt;zephyr/kernel.h&amp;gt;
#include &amp;lt;zephyr/logging/log.h&amp;gt;
#include &amp;lt;zephyr/bluetooth/bluetooth.h&amp;gt;
#include &amp;lt;zephyr/bluetooth/gap.h&amp;gt;
/* STEP 3.2.1 - Include the header file of the UUID helper macros and definitions */
#include &amp;lt;zephyr/bluetooth/uuid.h&amp;gt;
/* STEP 4.1 - Include the header file for managing Bluetooth LE addresses */
#include &amp;lt;zephyr/bluetooth/addr.h&amp;gt;

#include &amp;lt;dk_buttons_and_leds.h&amp;gt;

/* STEP 5.1 - Create the advertising parameter for connectable advertising */
static struct bt_le_adv_param *adv_param = BT_LE_ADV_PARAM(
	(BT_LE_ADV_OPT_CONNECTABLE |
	 BT_LE_ADV_OPT_USE_IDENTITY), /* Connectable advertising and use identity address */
	800, /* Min Advertising Interval 500ms (800*0.625ms) */
	801, /* Max Advertising Interval 500.625ms (801*0.625ms) */
	NULL); /* Set to NULL for undirected advertising */

LOG_MODULE_REGISTER(Lesson2_Exercise3, LOG_LEVEL_INF);

#define DEVICE_NAME CONFIG_BT_DEVICE_NAME
#define DEVICE_NAME_LEN (sizeof(DEVICE_NAME) - 1)

#define RUN_STATUS_LED DK_LED1
#define RUN_LED_BLINK_INTERVAL 1000

static const struct bt_data ad[] = {
	/* STEP 3.1 - Set the flags and populate the device name in the advertising packet */
	BT_DATA_BYTES(BT_DATA_FLAGS, (BT_LE_AD_GENERAL | BT_LE_AD_NO_BREDR)),
	BT_DATA(BT_DATA_NAME_COMPLETE, DEVICE_NAME, DEVICE_NAME_LEN),

};

static const struct bt_data sd[] = {
	/* STEP 3.2.2 - Include the 16-bytes (128-Bits) UUID of the LBS service in the scan response packet */
	BT_DATA_BYTES(BT_DATA_UUID128_ALL,
		      BT_UUID_128_ENCODE(0x00001523, 0x1212, 0xefde, 0x1523, 0x785feabcd123)),
};

void main(void)
{
	int blink_status = 0;
	int err;

	LOG_INF(&amp;quot;Starting Lesson 2 - Exercise 3 \n&amp;quot;);

	err = dk_leds_init();
	if (err) {
		LOG_ERR(&amp;quot;LEDs init failed (err %d)\n&amp;quot;, err);
		return;
	}

	/* STEP 4.2 - Change the random static address */
	bt_addr_le_t addr;
	err = bt_addr_le_from_str(&amp;quot;FF:EE:DD:CC:BB:AA&amp;quot;, &amp;quot;random&amp;quot;, &amp;amp;addr);
	if (err) {
		printk(&amp;quot;Invalid BT address (err %d)\n&amp;quot;, err);
	}

	err = bt_id_create(&amp;amp;addr, NULL);
	if (err &amp;lt; 0) {
		printk(&amp;quot;Creating new ID failed (err %d)\n&amp;quot;, err);
	}

	err = bt_enable(NULL);
	if (err) {
		LOG_ERR(&amp;quot;Bluetooth init failed (err %d)\n&amp;quot;, err);
		return;
	}

	LOG_INF(&amp;quot;Bluetooth initialized\n&amp;quot;);
	/* STEP 5.2 - Start advertising */
	err = bt_le_adv_start(adv_param, ad, ARRAY_SIZE(ad), sd, ARRAY_SIZE(sd));
	if (err) {
		LOG_ERR(&amp;quot;Advertising failed to start (err %d)\n&amp;quot;, err);
		return;
	}

	LOG_INF(&amp;quot;Advertising successfully started\n&amp;quot;);

	for (;;) {
		dk_set_led(RUN_STATUS_LED, (++blink_status) % 2);
		k_sleep(K_MSEC(RUN_LED_BLINK_INTERVAL));
	}
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;prj.conf:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#
# Copyright (c) 2018 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# Logger module
CONFIG_LOG=y

# Button and LED library
CONFIG_DK_LIBRARY=y

# Bluetooth LE
CONFIG_BT=y
# STEP 1 - Include the Peripheral Role support
CONFIG_BT_PERIPHERAL=y
# STEP 2 - Change the Bluetooth LE device name to Nordic_Peripheral
CONFIG_BT_DEVICE_NAME=&amp;quot;Nordic_Peripheral&amp;quot;

# Increase stack size for the main thread and System Workqueue
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
CONFIG_MAIN_STACK_SIZE=2048

#when testing 8dBM
#CONFIG_BT_CTLR_TX_PWR_PLUS_8=y

#when testing -40dBM
#CONFIG_BT_CTLR_TX_PWR_MINUS_40=y

# Logger module to lower idle consumption
CONFIG_LOG=n
CONFIG_STDOUT_CONSOLE=n
CONFIG_SERIAL=n
CONFIG_CONSOLE=n&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting Tramsmission-Power but current Consumption Peaks doesn't change</title><link>https://devzone.nordicsemi.com/thread/466283?ContentTypeID=1</link><pubDate>Fri, 26 Jan 2024 15:31:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:374e691b-1288-41d6-90e9-32a31d74520d</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Quirin,&lt;/p&gt;
&lt;p&gt;My best guess for the peak current differences is other resources being run at the same time. A quick glance into the DTM source code shows that it makes use of some high-power consumption peripherals such as the TIMER and GPPI. The CPU That might explain the issue.&lt;/p&gt;
&lt;p&gt;Can you retry with some very basic samples such as a BLE beacon sample and see if the peaks look more reasonable?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting Tramsmission-Power but current Consumption Peaks doesn't change</title><link>https://devzone.nordicsemi.com/thread/466210?ContentTypeID=1</link><pubDate>Fri, 26 Jan 2024 12:34:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:816af71c-99ee-46fb-b51c-02cb5607c538</guid><dc:creator>qrn</dc:creator><description>&lt;p&gt;Hi there Hieu,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;thanks for clarifying whats the TX-Peak, I do see a difference when zooming in.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Then I do have the question what the other peaks&amp;nbsp; is it should be the RX peak but I don&amp;#39;t understand why it&amp;#39;s so heigh?&lt;/p&gt;
&lt;p&gt;left 0dbM, right -40dbM&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/veryzoomed_5F00_0dBm_5F00_hci.png" /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/veryzoomed_5F002D00_40dBm_5F00_hci.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I did the OPP-tool and my current consumption with Power Profiler Kit II is higher then excpected with the OPP. The Idle Consumption is higher which can be due to the Fact that I&amp;#39;m not using the nrf52840 DK but the PAN1780 EVB so I see no problem there. (only a few uA)&lt;/p&gt;
&lt;p&gt;But I really don&amp;#39;t understand why the current peaks are that high even when I&amp;#39;m adding RX and TX for -40dbM the peak shouldn&amp;#39;t be over 7,1mA. I would excpect a Peak behavior more ore less like shown in this github post:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/issues/32212"&gt;Tx power levels are not similar on ADV and CONN modes when set manually (nRF52) &amp;middot; Issue #32212 &amp;middot; zephyrproject-rtos/zephyr &amp;middot; GitHub&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Is there any way to achieve the behavior he is having because at the moment the avg. consumption doesn&amp;#39;t really change noticable.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting Tramsmission-Power but current Consumption Peaks doesn't change</title><link>https://devzone.nordicsemi.com/thread/466006?ContentTypeID=1</link><pubDate>Thu, 25 Jan 2024 13:04:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95a13483-d4fe-4a51-a5a6-ef4f60f87d96</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Quirin,&lt;/p&gt;
&lt;p&gt;You need to zoom in even further, and identify which peak is a TX peak.&lt;/p&gt;
&lt;p&gt;Here is a copy of your screenshot with the TX peaks highlighted.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1706187511171v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;For your power optimizing interest, you might want to know we have a few articles/blogs on the topic:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/optimizing-power-on-nrf52-designs"&gt;https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/optimizing-power-on-nrf52-designs&lt;/a&gt;&lt;br /&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/test_and_optimize/optimizing/power.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/test_and_optimize/optimizing/power.html&lt;/a&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/optimizing-power-on-nrf53-designs"&gt;https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/optimizing-power-on-nrf53-designs&lt;/a&gt;&lt;span&gt;&amp;nbsp;(the guide is for the nRF5340, but&amp;nbsp;many tips are applicable to the nRF52832).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The Online Power Profiler I linked in my previous reply is also a handy tool for the job.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting Tramsmission-Power but current Consumption Peaks doesn't change</title><link>https://devzone.nordicsemi.com/thread/465809?ContentTypeID=1</link><pubDate>Wed, 24 Jan 2024 13:30:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ebdfba99-d805-4af3-8f70-366192a74b6f</guid><dc:creator>qrn</dc:creator><description>&lt;p&gt;Hi Hieu,&lt;/p&gt;
&lt;p&gt;first of all thanks for your fast reply.&lt;/p&gt;
&lt;p&gt;I did the testing again to do some screenshots to get some with a closer look.&lt;/p&gt;
&lt;p&gt;Somehow I noticed that in the DTM that the current peaks, when I am using 8dbM, are slightly higher now, despite everything else being the same, but I still don&amp;#39;t understand why the peaks are that high especially at -40dbM.&lt;/p&gt;
&lt;p&gt;left: 8dBm, right: -40dBm&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/ppk_2B00_8dbm-.png" /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/ppk_2D00_40dbm-.png" /&gt;&lt;/p&gt;
&lt;p&gt;Because in the Specification sheet of the PAN1780 the power consumption of the TX at -40dBm should be around 2.3mA and the one of the RX around 4.3mA.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/TX-current.PNG" /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/RX-current.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;The other test is also very interesting to me because I am trying to set the tx-power based on the function given in the hci example&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void set_tx_power(uint8_t handle_type, uint16_t handle, int8_t tx_pwr_lvl)
{
	struct bt_hci_cp_vs_write_tx_power_level *cp;
	struct bt_hci_rp_vs_write_tx_power_level *rp;
	struct net_buf *buf, *rsp = NULL;
	int err;

	buf = bt_hci_cmd_create(BT_HCI_OP_VS_WRITE_TX_POWER_LEVEL,
				sizeof(*cp));
	if (!buf) {
		printk(&amp;quot;Unable to allocate command buffer\n&amp;quot;);
		return;
	}

	cp = net_buf_add(buf, sizeof(*cp));
	cp-&amp;gt;handle = sys_cpu_to_le16(handle);
	cp-&amp;gt;handle_type = handle_type;
	cp-&amp;gt;tx_power_level = tx_pwr_lvl;

	err = bt_hci_cmd_send_sync(BT_HCI_OP_VS_WRITE_TX_POWER_LEVEL,
				   buf, &amp;amp;rsp);
	if (err) {
		uint8_t reason = rsp ?
			((struct bt_hci_rp_vs_write_tx_power_level *)
			  rsp-&amp;gt;data)-&amp;gt;status : 0;
		printk(&amp;quot;Set Tx power err: %d reason 0x%02x\n&amp;quot;, err, reason);
		return;
	}

	rp = (void *)rsp-&amp;gt;data;
	printk(&amp;quot;Actual Tx Power: %d\n&amp;quot;, rp-&amp;gt;selected_tx_power);

	net_buf_unref(rsp);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;But there is still no difference in the consumption peak or only a slight one within the margin of error.&lt;/p&gt;
&lt;p&gt;left: 0dbM,&amp;nbsp; &amp;nbsp;right: -40dbM&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/ppk_2D00_0dbmhci.png" /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/ppk_2D002D00_40dbmhci.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The thing I am trying to accomplish is the lowest possible power consumption during a BLE Connection between my the PAN and my MobileDevice, which are maximum 3 meters apart from each other with no obsticals in the way,&amp;nbsp;thats why the dbM value doesn&amp;#39;t have to be this high.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Quirin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting Tramsmission-Power but current Consumption Peaks doesn't change</title><link>https://devzone.nordicsemi.com/thread/465774?ContentTypeID=1</link><pubDate>Wed, 24 Jan 2024 11:42:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1be8a526-fc26-4a8e-b552-85ac7c09f0d0</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Quirin,&lt;/p&gt;
&lt;p&gt;In each advertising/connection interval, there will be a&amp;nbsp;window of TX and a window of RX.&amp;nbsp;What you might be seeing is the TX and RX current peak being so close together that they are indistinguishable. In&amp;nbsp;your&amp;nbsp;setup, the current peak during RX is always the same and higher than the one during TX, and therefore you cannot discern any difference.&lt;/p&gt;
&lt;p&gt;Could you try to zoom in more and see if you can observe two separated current peaks, with the TX one decreases as TX Power decrease?&lt;/p&gt;
&lt;p&gt;You might also want to try using &lt;a href="https://devzone.nordicsemi.com/power/w/opp"&gt;the Online Power Profiler&lt;/a&gt; to&amp;nbsp;see what you can expect.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>