<?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>Using freeRTOS to control BLE and FPU caculation and how to do low power</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/81629/using-freertos-to-control-ble-and-fpu-caculation-and-how-to-do-low-power</link><description>Hi, 
 I got the example http://github.com/NordicPlayground/nrf52-ble-multi-link-multi-role and the demo is OK. 
 We are doing a game project using nRF52840 base on nRF52 SDK v15.2. We have a lot of caculation with FPU，so I add freeRTOS to my code(base</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 19 Nov 2021 08:08:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/81629/using-freertos-to-control-ble-and-fpu-caculation-and-how-to-do-low-power" /><item><title>RE: Using freeRTOS to control BLE and FPU caculation and how to do low power</title><link>https://devzone.nordicsemi.com/thread/339750?ContentTypeID=1</link><pubDate>Fri, 19 Nov 2021 08:08:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0116f85-301a-4b0c-869d-161944789b99</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;seems like you did enable it&lt;/p&gt;
&lt;p&gt;#define configUSE_TICKLESS_IDLE 1&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using freeRTOS to control BLE and FPU caculation and how to do low power</title><link>https://devzone.nordicsemi.com/thread/338916?ContentTypeID=1</link><pubDate>Mon, 15 Nov 2021 07:41:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2199e5b5-6f59-4b88-9793-59c21910a942</guid><dc:creator>Bruse</dc:creator><description>&lt;p&gt;Hi Susheel,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure. It seems I have not&amp;nbsp;&lt;span&gt;enable tickless idle in FreeRTOSConfig.h file.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Which is the macro definition&amp;nbsp;in FreeRTOSConfig.h file? Attachment is my file.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/4667.FreeRTOSConfig.h"&gt;devzone.nordicsemi.com/.../4667.FreeRTOSConfig.h&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using freeRTOS to control BLE and FPU caculation and how to do low power</title><link>https://devzone.nordicsemi.com/thread/338735?ContentTypeID=1</link><pubDate>Fri, 12 Nov 2021 09:59:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77b9027e-1a2b-4e06-a8e0-e6e4924278a6</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Seems like your code looks good now.&lt;/p&gt;
[quote user="Bruse"]By the way,&amp;nbsp;power_manage function has not been called, do I need to call it somewhere to&amp;nbsp;&lt;span&gt;enter low power states?&lt;/span&gt;[/quote]
&lt;p&gt;If you have enable tickless idle in FreeRTOSConfig.h file, then you do not explicitly do anything as tickless idle will handle sleep for you, but if you are not using tickless idle, then you need to call the power_manage function to make the chip go to sleep in idle states.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using freeRTOS to control BLE and FPU caculation and how to do low power</title><link>https://devzone.nordicsemi.com/thread/338672?ContentTypeID=1</link><pubDate>Fri, 12 Nov 2021 02:36:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5f75e5a-c019-460c-8f82-d0b0f4ec3aff</guid><dc:creator>Bruse</dc:creator><description>&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;I have add taskYield to the&amp;nbsp;&lt;span&gt;AppTask_demo task as follow. In the&amp;nbsp;process_ble_commands, it also would calll API function to send data to APP or&amp;nbsp; forward data to APP from peripheral, or send data to&amp;nbsp;peripheral, or&amp;nbsp;forward data to peripheral from&amp;nbsp;APP.&amp;nbsp; Would it be a problem&amp;nbsp;although it works well now.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void AppTask_demo(void * pvParameter)
{	
		if (pdPASS != xTimerStart(m_test_timer, OSTIMER_WAIT_FOR_QUEUE))
		{
				APP_ERROR_HANDLER(NRF_ERROR_NO_MEM);
		}					
		while(1)
		{
			  process_ble_commands();  	
				taskYIELD();
		}
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;By the way,&amp;nbsp;power_manage function has not been called, do I need to call it somewhere to&amp;nbsp;&lt;span&gt;enter low power states?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using freeRTOS to control BLE and FPU caculation and how to do low power</title><link>https://devzone.nordicsemi.com/thread/338569?ContentTypeID=1</link><pubDate>Thu, 11 Nov 2021 12:44:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a41ad3a-c11f-4406-92a1-160272389659</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi Zhong,&lt;/p&gt;
&lt;p&gt;The basic design is simple and correct. Few points to remember though&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;using uart_printf should only be a debug option and should not be included in release versions since uart logging is power intense as it uses HFCLK&lt;/li&gt;
&lt;li&gt;AppTask_demo does not seem to be yielding. Look at&amp;nbsp; &lt;a href="https://www.freertos.org/a00020.html#taskYIELD"&gt;taskYield&lt;/a&gt;. Everytask that you create must yield at some point to make the idle thread run at some point so that your device can enter low power states.&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>