<?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>led softblink example with freertos rtc</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/40509/led-softblink-example-with-freertos-rtc</link><description>Hi Nordic, 
 Hardware: custom nrf52840 
 sw: nRF5_SDK_15.2.0_9412b96 
 Target example code: blinky_rtc_freertos + led_softblink 
 Problem faced: I want to integrate this 2 code together and require rtc for freertos tickless idle feature but the softblink</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 28 Nov 2018 08:33:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/40509/led-softblink-example-with-freertos-rtc" /><item><title>RE: led softblink example with freertos rtc</title><link>https://devzone.nordicsemi.com/thread/159361?ContentTypeID=1</link><pubDate>Wed, 28 Nov 2018 08:33:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e1a6b9e-9dc7-4f4e-aa60-7f0d4d799781</guid><dc:creator>inghowe83</dc:creator><description>&lt;p&gt;thank you &lt;a href="https://devzone.nordicsemi.com/members/aryan"&gt;Susheel Nuguru&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: led softblink example with freertos rtc</title><link>https://devzone.nordicsemi.com/thread/159173?ContentTypeID=1</link><pubDate>Tue, 27 Nov 2018 08:50:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5b6dc2a-2891-452d-85c8-bb9d03f9fa67</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;you need to understand in detail about what each member in the below config means&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; nrf_drv_pwm_config_t const config0 =&lt;/p&gt;
&lt;p&gt;The below four will decide the tone of your softblink&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;        .count_mode   = NRF_PWM_MODE_UP,
        .top_value    = m_demo1_top,
        .load_mode    = NRF_PWM_LOAD_INDIVIDUAL,
        .step_mode    = NRF_PWM_STEP_AUTO&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: led softblink example with freertos rtc</title><link>https://devzone.nordicsemi.com/thread/159122?ContentTypeID=1</link><pubDate>Mon, 26 Nov 2018 23:30:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33919e09-731e-4cf6-a488-b6577bd34d65</guid><dc:creator>inghowe83</dc:creator><description>&lt;p&gt;Thank you &lt;a href="https://devzone.nordicsemi.com/members/aryan"&gt;Susheel Nuguru&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;May I know which is the parameters to affect the blink interval and pwm freq in this sample code?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: led softblink example with freertos rtc</title><link>https://devzone.nordicsemi.com/thread/158815?ContentTypeID=1</link><pubDate>Fri, 23 Nov 2018 11:54:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:83108e0f-3441-4365-97b3-44085f1efa5e</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;There is no problem using freeRTOS + softdevice. I think the problem for you is to use simulated PWM using app_timer.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You need to use real PWM instead of a simulated one to solve . I have edited your example to use PWM instead of app_timer and i can see the softblink now. If you want to understand how PWM works, I would recommend you to read its spec from the product specification.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-765334d353ba41a6b83a4189fea6c57c/blinky_5F00_PWM_5F00_freertos.rar"&gt;devzone.nordicsemi.com/.../blinky_5F00_PWM_5F00_freertos.rar&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: led softblink example with freertos rtc</title><link>https://devzone.nordicsemi.com/thread/158758?ContentTypeID=1</link><pubDate>Fri, 23 Nov 2018 07:52:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6c0ebdb-6397-4e5f-be71-a467c4516d7b</guid><dc:creator>inghowe83</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/aryan"&gt;Susheel Nuguru&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Thanks for your input. I still very new to softdevice and FreeRTOS, the pain part is our customer needs FreeRTOS while supporting softdevices api. Do nordic have any other solutions to make softblink workable under freertos rtc environment?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: led softblink example with freertos rtc</title><link>https://devzone.nordicsemi.com/thread/158672?ContentTypeID=1</link><pubDate>Thu, 22 Nov 2018 14:16:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0045a11e-e23b-4c25-b09a-8d0df5ee2cc0</guid><dc:creator>Susheel Nuguru</dc:creator><description>[quote user="inghowe83"]What are the main difference between non freertos vs freertos app timer?[/quote]
&lt;p&gt;&amp;nbsp;This is a good question.The app_timer_freertos and app_timer does not exactly behave similar.&lt;/p&gt;
&lt;p&gt;The timers scheduling mechanism is completely different and the way they are queued and their linked list nature is completely different. But I am very surprised by the difference in behavior here. I did not expect them to show this big different. But there seems to be a huge difference.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In FreeRTOS it is not possible to restart an already running timer (without stopping and restarting) but in app_timer we can do that easily. This difference could be explain a bit of this weird behavior.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: led softblink example with freertos rtc</title><link>https://devzone.nordicsemi.com/thread/158516?ContentTypeID=1</link><pubDate>Thu, 22 Nov 2018 00:38:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bffb7c35-1735-4b63-95f9-974de858082d</guid><dc:creator>inghowe83</dc:creator><description>&lt;p&gt;Thanks Susheel Nuguru, I tested the solutions on my DK board. The led blink too fast(don&amp;#39;t looks like a softblink) and it will stop blinking intermittently before it start blink again. Was it related to the FreeRTOS timer conflict with the softblink? Do you know whereI could look into? What are the main difference between non freertos vs freertos app timer? Is the nordic softbolink mechanism based on different rtc timer from freertos?&lt;/p&gt;
&lt;p&gt;I tried use debug-break during the part when the led stop blinking and it stopped at the below code (port_cmsis_systick.c), tickless idle seem to&amp;nbsp;interfere with the softblink feature.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1542847288625v2.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/VID_5F00_20181122_5F00_074427.mp4"&gt;devzone.nordicsemi.com/.../VID_5F00_20181122_5F00_074427.mp4&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: led softblink example with freertos rtc</title><link>https://devzone.nordicsemi.com/thread/158404?ContentTypeID=1</link><pubDate>Wed, 21 Nov 2018 12:41:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05daa551-0bb2-4bec-8449-d42e5355019a</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;You main function is not complete. You are depending to use freeRTOS timers without actually starting the kernel. Change your main() function to below&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;int main(void)
{
    ret_code_t err_code;
    lfclk_init();

    // Start APP_TIMER to generate timeouts.
    err_code = app_timer_init();
    APP_ERROR_CHECK(err_code);

    const led_sb_init_params_t led_sb_init_param = LED_SB_INIT_DEFAULT_PARAMS(LEDS_MASK);

    err_code = led_softblink_init(&amp;amp;led_sb_init_param);
    APP_ERROR_CHECK(err_code);

    err_code = led_softblink_start(LEDS_MASK);
    APP_ERROR_CHECK(err_code);

    
    /* Activate deep sleep mode */
    SCB-&amp;gt;SCR |= SCB_SCR_SLEEPDEEP_Msk;

    /* Start FreeRTOS scheduler. */
    vTaskStartScheduler();
    
    while (true)
    {
        __WFE();
    }
}
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: led softblink example with freertos rtc</title><link>https://devzone.nordicsemi.com/thread/157853?ContentTypeID=1</link><pubDate>Mon, 19 Nov 2018 01:41:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:301c5405-7a1f-4def-9b38-e6f6cb7280a6</guid><dc:creator>inghowe83</dc:creator><description>&lt;p&gt;Hi There,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have attached my example, what I did is tried to use the softblink main.c directly on the Blink RTC FreeRTOS example, mind help me review is what I have broken? Thanks.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/blinky_5F00_rtc_5F00_freertos.zip"&gt;devzone.nordicsemi.com/.../blinky_5F00_rtc_5F00_freertos.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: led softblink example with freertos rtc</title><link>https://devzone.nordicsemi.com/thread/157652?ContentTypeID=1</link><pubDate>Fri, 16 Nov 2018 08:29:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4450bd7c-6162-482b-9126-8b774a749810</guid><dc:creator>inghowe83</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/aryan"&gt;Susheel Nuguru&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks for the quick reply. I did try migrate the soft_blink example into the blinky rtc freertos example. Tried and found out the softblink doesn&amp;#39;t work, all the led is turn on but it never have softblink effect. I not sure does it related to using app_timer_freertos.c? My custom board works perfectly using the default softblink example which is based on non freertos app_timer.c.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: led softblink example with freertos rtc</title><link>https://devzone.nordicsemi.com/thread/157482?ContentTypeID=1</link><pubDate>Thu, 15 Nov 2018 12:05:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d08c3ee-1e66-4938-9b0d-f6a7e9223471</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Ideally, you need to delete app_timer.c file from your project.&lt;/p&gt;
&lt;p&gt;You only should be using app_timer_freertos.c only. Both of them are API compatible, so you should not have problems removing app_timer.c from your project and soft_blink example will then use app_timer_freertos API correctly&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>