<?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>app_timer_stop return 0x04(NO MEM) error</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/75042/app_timer_stop-return-0x04-no-mem-error</link><description>Hi, all.. 
 An error occurs as soon as it connect and disconnect through advertising. Timer interrupt is currently running on the main function.. 
 and then I found error meaing.. below.. 
 
 so &amp;#39;timer operation queue was full&amp;#39; is the reason.. 
 then</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 25 May 2021 01:10:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/75042/app_timer_stop-return-0x04-no-mem-error" /><item><title>RE: app_timer_stop return 0x04(NO MEM) error</title><link>https://devzone.nordicsemi.com/thread/311282?ContentTypeID=1</link><pubDate>Tue, 25 May 2021 01:10:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8fed8e3a-dc9f-4bb7-acd6-c4d7feeab133</guid><dc:creator>lyrics</dc:creator><description>[quote userid="73165" url="~/f/nordic-q-a/75042/app_timer_stop-return-0x04-no-mem-error/310197#310197"]But you wrote that you had fixed the issue by including the init function for the application timer right?[/quote]
&lt;p&gt;Yes!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;That&amp;#39;s all right. Thank you :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: app_timer_stop return 0x04(NO MEM) error</title><link>https://devzone.nordicsemi.com/thread/310197?ContentTypeID=1</link><pubDate>Tue, 18 May 2021 13:53:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0caaf55c-1011-4836-af73-ba3c0b58d71f</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Whoops! I deleted your previous reply on accident. But you wrote that you had fixed the issue by including the init function for the application timer right?&lt;/p&gt;
&lt;p&gt;sorry&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: app_timer_stop return 0x04(NO MEM) error</title><link>https://devzone.nordicsemi.com/thread/309627?ContentTypeID=1</link><pubDate>Thu, 13 May 2021 00:57:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a938ac8-b8ab-4baf-ac66-452cebfd9b0b</guid><dc:creator>lyrics</dc:creator><description>&lt;p&gt;Hi, Jared&lt;/p&gt;
[quote userid="73165" url="~/f/nordic-q-a/75042/app_timer_stop-return-0x04-no-mem-error/309526#309526"] Are you using&amp;nbsp; ble_app_uart_c i.e the central NUS example?[/quote]
&lt;p&gt;My project is based ble_app_uart ! So I added scan module.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I use&amp;nbsp;NRF_DRV_TIMER_INSTANCE.&lt;/p&gt;
&lt;p&gt;This is my timer_init code.. and call every 200ns, 1000ns (1ms) in the main.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void timers_init(void)
{
    ret_code_t err_code ;
    uint32_t time_ticks, time_ticks_us;

    /** added */
    nrf_drv_timer_config_t timer_cfg = NRF_DRV_TIMER_DEFAULT_CONFIG;
    timer_cfg.frequency = 0;
    err_code = nrf_drv_timer_init(&amp;amp;TIMER_MS, &amp;amp;timer_cfg, timer_ms_event_handler);
    APP_ERROR_CHECK(err_code);

    time_ticks = nrf_timer_us_to_ticks(time_ms, 0);
    nrf_drv_timer_extended_compare(
         &amp;amp;TIMER_MS, NRF_TIMER_CC_CHANNEL0, time_ticks, NRF_TIMER_SHORT_COMPARE0_CLEAR_MASK, true);
    nrf_drv_timer_enable(&amp;amp;TIMER_MS);

    //us_timer
    nrf_drv_timer_config_t timer_cfg_2 = NRF_DRV_TIMER_DEFAULT_CONFIG;
    timer_cfg_2.frequency = 0;
    err_code = nrf_drv_timer_init(&amp;amp;TIMER_US, &amp;amp;timer_cfg_2, timer_us_event_handler);
    APP_ERROR_CHECK(err_code);

    time_ticks_us = nrf_timer_us_to_ticks(time_us, 0);
    nrf_drv_timer_extended_compare(&amp;amp;TIMER_US, 
                                    NRF_TIMER_CC_CHANNEL1,
                                    time_ticks_us, 
                                    NRF_TIMER_SHORT_COMPARE1_CLEAR_MASK, 
                                    true);
    nrf_drv_timer_enable(&amp;amp;TIMER_US);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This is my main func..&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;while(1)
{
    sys_us_timer();
    sys_ms_timer();
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: app_timer_stop return 0x04(NO MEM) error</title><link>https://devzone.nordicsemi.com/thread/309526?ContentTypeID=1</link><pubDate>Wed, 12 May 2021 13:40:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af4e7816-b532-47f4-baba-0afb300d34a9</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="lyrics"]My project is based &amp;#39;ble_app_uart.c&amp;#39;.. and I added scan module / two timer interrupt..(ms and ns)[/quote]
&lt;p&gt;&amp;nbsp;What timer instance are you using? Are you using&amp;nbsp; ble_app_uart_c i.e the central NUS example? If you are then it already has the scanner module enabled. Can you share your code?&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: app_timer_stop return 0x04(NO MEM) error</title><link>https://devzone.nordicsemi.com/thread/309403?ContentTypeID=1</link><pubDate>Wed, 12 May 2021 08:25:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6893191f-655a-49a5-b3f5-094c83853b5b</guid><dc:creator>lyrics</dc:creator><description>&lt;p&gt;&lt;span&gt;My project seems to be a different matter. The error is still not fixed..&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: app_timer_stop return 0x04(NO MEM) error</title><link>https://devzone.nordicsemi.com/thread/309394?ContentTypeID=1</link><pubDate>Wed, 12 May 2021 08:00:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd12cc69-4f53-4a0c-a218-9863e806e3b6</guid><dc:creator>Bylos</dc:creator><description>&lt;p&gt;For a specific app I had to increase above 100 because I needed repeated calls to app_timer_start and app_timer_stop, that fixed the issue&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: app_timer_stop return 0x04(NO MEM) error</title><link>https://devzone.nordicsemi.com/thread/309393?ContentTypeID=1</link><pubDate>Wed, 12 May 2021 07:57:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8225716-2b09-492e-9366-db80336745d4</guid><dc:creator>lyrics</dc:creator><description>&lt;p&gt;APP_TIMER_CONFIG_OP_QUEUE_SIZE is set to 10..&lt;/p&gt;
&lt;p&gt;so I increase to 20, but still same error.&amp;nbsp;&lt;span&gt;Do I have to set a higher value?..&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;My project is based &amp;#39;ble_app_uart.c&amp;#39;.. and I added scan module / two timer interrupt..(ms and ns)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Also it works first connection!&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: app_timer_stop return 0x04(NO MEM) error</title><link>https://devzone.nordicsemi.com/thread/309374?ContentTypeID=1</link><pubDate>Wed, 12 May 2021 07:15:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cbf3ca8f-216f-4012-9181-602a1de104c7</guid><dc:creator>Bylos</dc:creator><description>&lt;p&gt;Hi, you can try to increase&amp;nbsp;APP_TIMER_CONFIG_OP_QUEUE_SIZE in sdk_config.h.&lt;/p&gt;
&lt;p&gt;You might also consider checking how often you call app_timer library functions, maybe you have frequent unnecessary calls to the library !&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>