<?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_t&amp;#39; has no member named &amp;#39;handler&amp;#39; (I got this error after merge the I2c OLED project with ble_template example)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/77382/app_timer_t-has-no-member-named-handler-i-got-this-error-after-merge-the-i2c-oled-project-with-ble_template-example</link><description>Hi. 
 I recently started work on some projects where I have to use I2c OLED and BLE. I used OLED to display time which is running on an internal RTC of nrf52832. 
 Now I merge my Oled code with the ble_template example to advertise. But I got an error</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 15 Jul 2021 13:35:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/77382/app_timer_t-has-no-member-named-handler-i-got-this-error-after-merge-the-i2c-oled-project-with-ble_template-example" /><item><title>RE: app_timer_t' has no member named 'handler' (I got this error after merge the I2c OLED project with ble_template example)</title><link>https://devzone.nordicsemi.com/thread/320283?ContentTypeID=1</link><pubDate>Thu, 15 Jul 2021 13:35:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12cd8ec3-2ee3-4ced-9b95-d6899fea26ee</guid><dc:creator>Karl Ylvisaker</dc:creator><description>[quote user="luqman"]I think the issue is resolved, now the RTC2 is running and the device is not reset.[/quote]
&lt;p&gt;Great, I am glad to hear that! :)&lt;/p&gt;
[quote user="luqman"]Thanks a lot, Karl[/quote]
&lt;p&gt;No problem at all, I am happy to help!&lt;br /&gt;&lt;br /&gt;Please do not hesitate to open another ticket if you should encounter any issues or question in the future.&lt;br /&gt;&lt;br /&gt;Good luck with your development!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: app_timer_t' has no member named 'handler' (I got this error after merge the I2c OLED project with ble_template example)</title><link>https://devzone.nordicsemi.com/thread/320277?ContentTypeID=1</link><pubDate>Thu, 15 Jul 2021 13:27:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe13989a-d7a1-45b6-8f1c-8b5aead84888</guid><dc:creator>luqman</dc:creator><description>&lt;p&gt;Thanks a lot, Karl I think the issue is resolved, now the RTC2 is running and the device is not reset.&lt;/p&gt;
&lt;p&gt;Here is the main now.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;int main(void)
{
    ret_code_t err_code;
    bool erase_bonds;

    // Initialize.
    log_init();
    timers_init();
    power_management_init();
    ble_stack_init();
    gap_params_init();
    gatt_init();
    advertising_init();
    services_init();
    conn_params_init();
    peer_manager_init();

    // Start execution.
    NRF_LOG_INFO(&amp;quot;Template example started.&amp;quot;);
    application_timers_start();
    advertising_start(erase_bonds);

    APP_ERROR_CHECK(err_code);
    gpio_init();  ///init interrupt on button 1
          ////oled init ////
   uint8_t address;
   uint8_t sample_data;
   bool detected_device = false;

ssd1306_init_i2c(SSD1306_CONFIG_SCL_PIN, SSD1306_CONFIG_SDA_PIN);
ssd1306_begin(SSD1306_SWITCHCAPVCC, SSD1306_I2C_ADDRESS, false);


   NRF_LOG_INFO(&amp;quot;TWI scanner started.&amp;quot;);

          ///clcok//

  uint32_t p_is_running = 0;
  sd_clock_hfclk_request();
 while(! p_is_running) 
 {  							//wait for the hfclk to be available
	sd_clock_hfclk_is_running((&amp;amp;p_is_running));
 }
 NRF_LOG_INFO(&amp;quot;clock started.&amp;quot;);

 nrf_cal_init();
 nrf_cal_set_callback(calendar_updated, 4);
//////////////////

ssd1306_clear_display();
ssd1306_set_textsize(2);
ssd1306_set_textcolor(WHITE);
ssd1306_set_cursor(8, 20);


ssd1306_putstring( &amp;quot;Ble_watch&amp;quot;);
ssd1306_display();
nrf_delay_ms(2000);
ssd1306_clear_display();
while (true)
{ 
//do something
}
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: app_timer_t' has no member named 'handler' (I got this error after merge the I2c OLED project with ble_template example)</title><link>https://devzone.nordicsemi.com/thread/320273?ContentTypeID=1</link><pubDate>Thu, 15 Jul 2021 13:12:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2fd72e80-c1b1-4c0d-95be-8325fa3a178f</guid><dc:creator>luqman</dc:creator><description>&lt;p&gt;I&amp;#39;m using S132 Segger embedded studio with nrf52832 dev kit&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The operation you are trying to do should be done through the&amp;nbsp;&lt;/span&gt;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s140.api.v7.2.0%2Fgroup___n_r_f___s_o_c___f_u_n_c_t_i_o_n_s.html&amp;amp;anchor=ga3e5afb495a1b0307c749cc268df94a74"&gt;sd_clock_hfclk_request&lt;/a&gt;&lt;span&gt;&amp;nbsp;call, to request that the hfclk is kept running.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I try to do using&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s140.api.v7.2.0%2Fgroup___n_r_f___s_o_c___f_u_n_c_t_i_o_n_s.html&amp;amp;anchor=ga3e5afb495a1b0307c749cc268df94a74"&gt;sd_clock_hfclk_request&lt;/a&gt;&amp;nbsp;but if you have an example related to a specific task let me know&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;it&amp;#39;s helped me a lot&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: app_timer_t' has no member named 'handler' (I got this error after merge the I2c OLED project with ble_template example)</title><link>https://devzone.nordicsemi.com/thread/320222?ContentTypeID=1</link><pubDate>Thu, 15 Jul 2021 11:20:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1af80ca7-08f4-400c-9f98-ff470958bf6b</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user="luqman"]I try to reply to the below question but I don&amp;#39;t get a reply option on there,[/quote]
&lt;p&gt;I have heard about this issue before, and reported it to the site administrators for examination. In the meantime, it seems that the workaround for this is to click on the timestamp of the comment you would like to reply to, to have the buttons show up again. Sorry for the inconvenience.&lt;/p&gt;
[quote user="luqman"]As I use to monitor time by using Internal RTC. For this purpose, I use NRF_calender_example so I just use that code in order to clockwork&amp;nbsp;properly if I don&amp;#39;t use enable clock the RTc didn&amp;#39;t start count. If I remove those lines from the code the working of the clock stuck. Is there any way I use both nrf_calender_example and ble_template examples in the same code?[/quote]
&lt;p&gt;Thank you for elaborating.&lt;br /&gt;As written in the&amp;nbsp;&lt;em&gt;Restricted&amp;nbsp;&lt;/em&gt;definition, the restricted peripherals are available to the application, but they must be accessed through the SoftDevice API, so that the SoftDevice remains in control of what the peripherals are doing.&lt;br /&gt;&lt;br /&gt;Since I do not know exactly which SoftDevice and version you are working with I can not link you to the exact documentation, so the following links are for the S140 v7.2.0.:&lt;br /&gt;The operation you are trying to do should be done through the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s140.api.v7.2.0%2Fgroup___n_r_f___s_o_c___f_u_n_c_t_i_o_n_s.html&amp;amp;anchor=ga3e5afb495a1b0307c749cc268df94a74"&gt;sd_clock_hfclk_request&lt;/a&gt;&amp;nbsp;call, to request that the hfclk is kept running.&lt;br /&gt;Just remember that this will keep the HFCLK running until you manually &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s140.api.v7.2.0%2Fgroup___n_r_f___s_o_c___f_u_n_c_t_i_o_n_s.html&amp;amp;anchor=ga7dcec5b896ce32fe70e9b54d7b523f55"&gt;release&lt;/a&gt;&amp;nbsp;it.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: app_timer_t' has no member named 'handler' (I got this error after merge the I2c OLED project with ble_template example)</title><link>https://devzone.nordicsemi.com/thread/320189?ContentTypeID=1</link><pubDate>Thu, 15 Jul 2021 09:20:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e8d1ea5-72d6-4613-a0d5-e3cb2e11f94a</guid><dc:creator>luqman</dc:creator><description>&lt;p&gt;It automatically came below&amp;nbsp; X:D&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: app_timer_t' has no member named 'handler' (I got this error after merge the I2c OLED project with ble_template example)</title><link>https://devzone.nordicsemi.com/thread/320188?ContentTypeID=1</link><pubDate>Thu, 15 Jul 2021 09:14:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4465c97b-bfd4-41ba-9043-6a5fc41b655d</guid><dc:creator>luqman</dc:creator><description>&lt;div class="Ar Au Ao" id=":so"&gt;
&lt;div class="Am Al editable LW-avf tS-tW tS-tY" id=":sk"&gt;
&lt;div&gt;
&lt;p&gt;Hi Karl.&lt;/p&gt;
&lt;p&gt;I try to reply to the below question but I don&amp;#39;t get a reply option on there,&lt;/p&gt;
&lt;p&gt;so read the doc &amp;quot;The CLOCK peripheral is classified as&amp;nbsp;&lt;em&gt;restricted&lt;/em&gt;&amp;nbsp;when the SoftDevice is enabled.&amp;quot;&lt;/p&gt;
&lt;p&gt;why I&amp;nbsp;&amp;nbsp;use the&amp;nbsp;&amp;#39;clock start&amp;#39;&lt;/p&gt;
&lt;p&gt;As I use to monitor time by using Internal RTC. For this purpose, I use NRF_calender_example so I just use that code in order to clockwork&amp;nbsp;properly if I don&amp;#39;t use enable clock the RTc didn&amp;#39;t start count. If I remove those lines from the code the working of the clock stuck. Is there any way I use both nrf_calender_example and ble_template examples in the same code?&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: app_timer_t' has no member named 'handler' (I got this error after merge the I2c OLED project with ble_template example)</title><link>https://devzone.nordicsemi.com/thread/320098?ContentTypeID=1</link><pubDate>Wed, 14 Jul 2021 16:21:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32d5205e-e79b-4e53-b1fc-1b01d785fdce</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello again,&lt;/p&gt;
[quote user="luqman"]Thanks for the tips I make it clear next time.[/quote]
&lt;p&gt;No problem at all, I am happy to hear that you found the tips helpful! :)&amp;nbsp;&lt;br /&gt;Thank you for clearing up the code.&lt;/p&gt;
[quote user="luqman"]&lt;p&gt;i try to clear the code now look,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;the code is stuck on that line below&lt;/p&gt;[/quote]
&lt;p&gt;Could I ask why you have included the &amp;#39;clock start&amp;#39; section?&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/sds_s140/SDS/s1xx/sd_resource_reqs/hw_block_interrupt_vector.html"&gt;The SoftDevice &lt;em&gt;restricts access&lt;/em&gt; to the CLOCK peripheral when it is enabled&lt;/a&gt;, which is likely the cause of these fatal errors. As mentioned in the SoftDevice&amp;#39;s hardware peripheral requirements, restricted peripherals should only be accessed by the application through the SoftDevice API when the SoftDevice is enabled.&lt;br /&gt;&lt;br /&gt;The relevant exempt reads:&lt;/p&gt;
&lt;table border="1" cellpadding="4" cellspacing="0" frame="border" rules="all" summary=""&gt;&lt;caption&gt;&lt;span&gt;&lt;span&gt;Table 1.&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;Hardware access type definitions&lt;/span&gt;&lt;/caption&gt;&lt;colgroup span="1"&gt;&lt;col span="1"&gt;&lt;col span="1"&gt;&lt;/col&gt;&lt;/col&gt;&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th colspan="1" rowspan="1"&gt;Access type&lt;/th&gt;
&lt;th colspan="1" rowspan="1"&gt;Definition&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td colspan="1" headers="d14792e54" rowspan="1"&gt;Restricted&lt;/td&gt;
&lt;td colspan="1" headers="d14792e57" rowspan="1"&gt;The hardware peripheral is used by the SoftDevice&lt;span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;and is outside the application sandbox&lt;/span&gt;. When the SoftDevice is enabled, it shall only be accessed through the SoftDevice API. Through this&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a title="A language and message format used by an application program to communicate with an operating system, application, or other service." href="https://infocenter.nordicsemi.com/topic/sds_s140/dita_common/glossary/glossary.html#api"&gt;&lt;dfn&gt;Application Programming Interface (API)&lt;/dfn&gt;&lt;/a&gt;, the application has limited access.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;br /&gt;The CLOCK peripheral is classified as&amp;nbsp;&lt;em&gt;restricted&lt;/em&gt; when the SoftDevice is enabled.&lt;br /&gt;&lt;br /&gt;If you tell me more about the functionality you are looking to implement with these lines, or why you have added them in the first place, I could maybe come up with an alternative approach, that will be OK with the SoftDevice.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: app_timer_t' has no member named 'handler' (I got this error after merge the I2c OLED project with ble_template example)</title><link>https://devzone.nordicsemi.com/thread/320073?ContentTypeID=1</link><pubDate>Wed, 14 Jul 2021 14:17:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:634cc359-6909-4bd9-8136-e7ae96b158dc</guid><dc:creator>luqman</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;int main(void)
{
    ret_code_t err_code;

    bool erase_bonds;
    log_init();
    timers_init();
    power_management_init();
    ble_stack_init();
    gap_params_init();
    gatt_init();
    advertising_init();
    services_init();
    conn_params_init();
    peer_manager_init();

    // Start execution.
   NRF_LOG_INFO(&amp;quot;Template example started.&amp;quot;);
   application_timers_start();
   advertising_start(erase_bonds);

   APP_ERROR_CHECK(err_code);
   gpio_init(); 

                   //oled init //
  uint8_t address;
  uint8_t sample_data;
  bool detected_device = false;


ssd1306_init_i2c(SSD1306_CONFIG_SCL_PIN, SSD1306_CONFIG_SDA_PIN);
ssd1306_begin(SSD1306_SWITCHCAPVCC, SSD1306_I2C_ADDRESS, false);


NRF_LOG_INFO(&amp;quot;TWI scanner started.&amp;quot;);

             ///internal clcok//

  NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED = 0;
  NRF_CLOCK-&amp;gt;TASKS_HFCLKSTART = 1;
  while(NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED == 0);
  
  NRF_LOG_INFO(&amp;quot;clock started.&amp;quot;);

nrf_cal_init();
nrf_cal_set_callback(calendar_updated, 4);

            //// oled output data///////

  ssd1306_clear_display();
  ssd1306_set_textsize(2);
  ssd1306_set_textcolor(WHITE);
  ssd1306_set_cursor(8, 20);


  ssd1306_putstring( &amp;quot;Ble_watch&amp;quot;);
  ssd1306_display();
  nrf_delay_ms(2000);
  ssd1306_clear_display();
while (true)
{ 
//do something
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;i try to clear the code now look,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;the code is stuck on that line below&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED = 0;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;when I going to click on the definition of a function, it&amp;#39;s pushed me to the definition of&amp;nbsp; so I don&amp;#39;t understand how to go exact error&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;when ic click on NRF_CLOCK its move to&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define NRF_CLOCK&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;((NRF_CLOCK_Type*)&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;NRF_CLOCK_BASE)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;when ic click on EVENTS_HFCLKSTARTED its move to&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;__IOM uint32_t&amp;#160; EVENTS_HFCLKSTARTED;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; /*!&amp;lt; (@ 0x00000100) HFCLK oscillator started&amp;#160; &amp;#160; &amp;#160;&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: app_timer_t' has no member named 'handler' (I got this error after merge the I2c OLED project with ble_template example)</title><link>https://devzone.nordicsemi.com/thread/320032?ContentTypeID=1</link><pubDate>Wed, 14 Jul 2021 12:58:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7cc402bf-e677-4a07-9ef3-e99e35f39a09</guid><dc:creator>luqman</dc:creator><description>&lt;p&gt;Thanks for the tips I make it clear next time.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I try breakpoints and find the exact line where the error and come back.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: app_timer_t' has no member named 'handler' (I got this error after merge the I2c OLED project with ble_template example)</title><link>https://devzone.nordicsemi.com/thread/320029?ContentTypeID=1</link><pubDate>Wed, 14 Jul 2021 12:51:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33164694-af97-4c6b-a6ae-2e32eda8fe8a</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Please try to put some breakpoints in your code, to see where the fatal error occurs.&lt;br /&gt;I see now that you are triggering the HFCLKSTART task after having enabled the SoftDevice, this may be causing the error.&lt;br /&gt;&lt;br /&gt;Use the breakpoints to see how far you are getting in your code, to pinpoint exactly which line is causing this. Do you for example ever enter into the nrf_cal_init function?&lt;br /&gt;&lt;br /&gt;For the record, your code includes a lot of commented out code, clutter, and improper formatting (such as the uneven indentations and missing closing curly braces) which makes your code &lt;em&gt;a lot&lt;/em&gt; harder to read, and spot errors in. Please consider cleaning up the code, both for your own future sake (increasing readability and maintainability), and for anyone else who will be reading it. This makes it a lot easier to debug.&lt;br /&gt;&lt;br /&gt;Looking forward to resolving this issue together!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: app_timer_t' has no member named 'handler' (I got this error after merge the I2c OLED project with ble_template example)</title><link>https://devzone.nordicsemi.com/thread/320010?ContentTypeID=1</link><pubDate>Wed, 14 Jul 2021 12:20:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1021d78-5a4c-4493-89fb-7207ddb5cf12</guid><dc:creator>luqman</dc:creator><description>&lt;p&gt;No, it&amp;#39;s still the same as I change the RTC- ----&amp;gt; RTC2&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I use nrf_calender_example and here I change the clock&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define CAL_RTC                 NRF_RTC2
#define CAL_RTC_IRQn            RTC2_IRQn
#define CAL_RTC_IRQHandler      RTC2_IRQHandler
#define CAL_RTC_IRQ_Priority    3
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;here the main();&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt; bool erase_bonds;

    // Initialize.
    log_init();
    timers_init();
    //buttons_leds_init(&amp;amp;erase_bonds);
    power_management_init();
    ble_stack_init();
    gap_params_init();
    gatt_init();
    advertising_init();
    services_init();
    conn_params_init();
    peer_manager_init();

    // Start execution.
    NRF_LOG_INFO(&amp;quot;Template example started.&amp;quot;);
    application_timers_start();

    advertising_start(erase_bonds);

     //Enter main loop.
    //for (;;)
    //{
    //    idle_state_handle();
    //}


ret_code_t err_code;

//log_init();
APP_ERROR_CHECK(err_code);

//clocks_start();

gpio_init();  ///init interrupt on button 1
//NRF_LOG_INFO(&amp;quot;TWI scanner started.&amp;quot;);

///////////oled init ////
uint8_t address;
uint8_t sample_data;
bool detected_device = false;

////APP_ERROR_CHECK(NRF_LOG_INIT(NULL));
////NRF_LOG_DEFAULT_BACKENDS_INIT();

ssd1306_init_i2c(SSD1306_CONFIG_SCL_PIN, SSD1306_CONFIG_SDA_PIN);
ssd1306_begin(SSD1306_SWITCHCAPVCC, SSD1306_I2C_ADDRESS, false);


NRF_LOG_INFO(&amp;quot;TWI scanner started.&amp;quot;);

//////////////////////////

//////clcok//



NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED = 0;
NRF_CLOCK-&amp;gt;TASKS_HFCLKSTART = 1;
while(NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED == 0);
NRF_LOG_INFO(&amp;quot;clock started.&amp;quot;);

nrf_cal_init();
nrf_cal_set_callback(calendar_updated, 4);
//////////////////

ssd1306_clear_display();
ssd1306_set_textsize(2);
ssd1306_set_textcolor(WHITE);
ssd1306_set_cursor(8, 20);


ssd1306_putstring( &amp;quot;Ble_watch&amp;quot;);

ssd1306_display();

nrf_delay_ms(2000);

ssd1306_clear_display();



while (true)

{ 
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;this is output response&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;info&amp;gt; app_timer: RTC: initialized.
&amp;lt;info&amp;gt; app: Template example started.
&amp;lt;info&amp;gt; app: Fast advertising.
&amp;lt;info&amp;gt; app: TWI scanner started.
&amp;lt;error&amp;gt; app: Fatal error
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: app_timer_t' has no member named 'handler' (I got this error after merge the I2c OLED project with ble_template example)</title><link>https://devzone.nordicsemi.com/thread/319988?ContentTypeID=1</link><pubDate>Wed, 14 Jul 2021 11:40:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72c637c1-bcb6-4c6f-9c6a-48a981c771f0</guid><dc:creator>Karl Ylvisaker</dc:creator><description>[quote user="luqman"]thanks for the answer Karl.[/quote]
&lt;p&gt;No problem at all, I am happy to help!&lt;/p&gt;
[quote user="luqman"]when the code redirects to the advertising mode function this makes reset the microcontroller I don&amp;#39;t understand.[/quote]
&lt;p&gt;If the microcontroller resets that usually means that a non-NRF_SUCCESS error code has been passed to an APP_ERROR_CHECK, like mentioned in my previous reply.&lt;br /&gt;Rebooting the device is the default error handling, when no specific error handling has been implemented.&lt;/p&gt;
[quote user="luqman"]I use RTC0 for clock count is there any possibility that the ble advertising conflict with the RTC or maybe some thing else&amp;nbsp;[/quote]
&lt;p&gt;Yes, &lt;a href="https://infocenter.nordicsemi.com/topic/sds_s140/SDS/s1xx/sd_resource_reqs/hw_block_interrupt_vector.html"&gt;RTC0 is blocked by the SoftDevice&lt;/a&gt;. You will have to use another RTC instance.&lt;br /&gt;Try this, and let me know if it resolves your issue.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: app_timer_t' has no member named 'handler' (I got this error after merge the I2c OLED project with ble_template example)</title><link>https://devzone.nordicsemi.com/thread/319980?ContentTypeID=1</link><pubDate>Wed, 14 Jul 2021 11:25:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03ee6974-4fff-4e42-9959-d5c09ed9a124</guid><dc:creator>luqman</dc:creator><description>&lt;p&gt;thanks for the answer Karl.&lt;/p&gt;
&lt;p&gt;I added that the the debug window shows this&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;info&amp;gt; app_timer: RTC: initialized.
&amp;lt;info&amp;gt; app: Template example started.
&amp;lt;info&amp;gt; app: Fast advertising.
&amp;lt;error&amp;gt; app: Fatal error&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;when the code redirects to the advertising mode function this makes reset the microcontroller I don&amp;#39;t understand.&lt;/p&gt;
&lt;p&gt;I use RTC0 for clock count is there any possibility that the ble advertising conflict with the RTC or maybe some thing else&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: app_timer_t' has no member named 'handler' (I got this error after merge the I2c OLED project with ble_template example)</title><link>https://devzone.nordicsemi.com/thread/319856?ContentTypeID=1</link><pubDate>Tue, 13 Jul 2021 14:09:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f544b270-2d7c-4d98-bd23-a6befdeabf8c</guid><dc:creator>Karl Ylvisaker</dc:creator><description>[quote user="luqman"]Thanks for the answer I just added the path and enable App_time and now it&amp;#39;s working[/quote]
&lt;p&gt;I am happy to hear that it resolved the issue, great!&lt;/p&gt;
[quote user="luqman"]When I debug the program nrf52832 kit reset when it reached the clock code.&amp;nbsp;[/quote]
&lt;p&gt;That sounds like a non-NRF_SUCCESS error code being passed to an APP_ERROR_CHECK. Please make sure to have DEBUG defined in your preprocessor defines, like shown in the included image.&lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/78532.enabling_5F00_debug_5F00_SES.PNG" /&gt;&amp;nbsp;&lt;br /&gt;This will make the logger output a detailed error message whenever a non-NRF_SUCCESS error code is passed to an APP_ERROR_CHECK. Check the error code in this error message against the API Reference of the function that returned it, to see why it generated the error.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: app_timer_t' has no member named 'handler' (I got this error after merge the I2c OLED project with ble_template example)</title><link>https://devzone.nordicsemi.com/thread/319846?ContentTypeID=1</link><pubDate>Tue, 13 Jul 2021 13:57:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:626355fa-53c9-4d8b-aeea-2f5ba86f1ec5</guid><dc:creator>luqman</dc:creator><description>&lt;p&gt;Thanks for the answer I just added the path and enable App_time and now it&amp;#39;s working but I have another issue now :(&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Combine ble_app_template example with clock code which is nearly run separately.&amp;nbsp; After combining&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Code is compiled properly .. but the clock is not working,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When I debug the program nrf52832 kit reset when it reached the clock code.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt; bool erase_bonds;

    // Initialize.
    log_init();
    timers_init();
    //buttons_leds_init(&amp;amp;erase_bonds);
    power_management_init();
    ble_stack_init();
    gap_params_init();
    gatt_init();
    advertising_init();
    services_init();
    conn_params_init();
    peer_manager_init();

    // Start execution.
    NRF_LOG_INFO(&amp;quot;Template example started.&amp;quot;);
    application_timers_start();

    advertising_start(erase_bonds);

     //Enter main loop.
    //for (;;)
    //{
    //    idle_state_handle();
    //}


ret_code_t err_code;

//////log_init();
APP_ERROR_CHECK(err_code);
//clocks_start();
gpio_init();  ///init interrupt on button 1


///////////oled init ////
uint8_t address;
uint8_t sample_data;
bool detected_device = false;

////APP_ERROR_CHECK(NRF_LOG_INIT(NULL));
////NRF_LOG_DEFAULT_BACKENDS_INIT();

ssd1306_init_i2c(SSD1306_CONFIG_SCL_PIN, SSD1306_CONFIG_SDA_PIN);
ssd1306_begin(SSD1306_SWITCHCAPVCC, SSD1306_I2C_ADDRESS, false);


NRF_LOG_INFO(&amp;quot;TWI scanner started.&amp;quot;);

//////////////////////////

//////clcok//



NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED = 0;
NRF_CLOCK-&amp;gt;TASKS_HFCLKSTART = 1;
while(NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED == 0);


nrf_cal_init();
nrf_cal_set_callback(calendar_updated, 4);
//////////////////

ssd1306_clear_display();
ssd1306_set_textsize(2);
ssd1306_set_textcolor(WHITE);
ssd1306_set_cursor(8, 20);


ssd1306_putstring( &amp;quot;Ble_watch&amp;quot;);

ssd1306_display();

nrf_delay_ms(2000);

ssd1306_clear_display();
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: app_timer_t' has no member named 'handler' (I got this error after merge the I2c OLED project with ble_template example)</title><link>https://devzone.nordicsemi.com/thread/319760?ContentTypeID=1</link><pubDate>Tue, 13 Jul 2021 10:58:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:298e9c46-3620-49ed-b847-719fd27a7870</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;Could you confirm for me that you have also added the drv_rtc.c file to your project as well, and that you have defined APP_TIMER_V2 in your project preprocessor defines, like &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v16.0.0%2Fmigration.html&amp;amp;anchor=migr_dfu_libs_app_timer"&gt;detailed in the Migration note&lt;/a&gt;?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>