<?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>undefined reference to timer functions</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/18045/undefined-reference-to-timer-functions</link><description>Hello all,
my compiler can&amp;#39;t find the definition to timer functions : nrf_drv_timer_init(), nrf_drv_timer_extended_compare() and nrf_drv_timer_enable(). bellow my code : 
 /* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved.
 *
 * The</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 05 Jul 2019 06:31:58 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/18045/undefined-reference-to-timer-functions" /><item><title>RE: undefined reference to timer functions</title><link>https://devzone.nordicsemi.com/thread/196705?ContentTypeID=1</link><pubDate>Fri, 05 Jul 2019 06:31:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b81312b9-ccee-419d-be0c-a61b05e21d8a</guid><dc:creator>sara</dc:creator><description>&lt;p&gt;k this is the new thread for it :&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/49406/undefined-reference-to-timer-and-saadc-functions"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/49406/undefined-reference-to-timer-and-saadc-functions&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined reference to timer functions</title><link>https://devzone.nordicsemi.com/thread/196704?ContentTypeID=1</link><pubDate>Fri, 05 Jul 2019 06:31:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6cd8801c-dde0-44fe-aca8-71f3b46faca8</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;My recommendation still stands: &amp;quot;&lt;span&gt;post a new thread where you describe your issue in detail, and also upload your project for review/debugging.&amp;quot;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined reference to timer functions</title><link>https://devzone.nordicsemi.com/thread/196692?ContentTypeID=1</link><pubDate>Fri, 05 Jul 2019 04:32:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c939fa0b-45d7-4f55-8c2a-1596ab029d77</guid><dc:creator>sara</dc:creator><description>&lt;p&gt;For me its still not working.&amp;nbsp;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/8228.image1.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined reference to timer functions</title><link>https://devzone.nordicsemi.com/thread/196666?ContentTypeID=1</link><pubDate>Thu, 04 Jul 2019 18:12:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca726ab4-47a2-4d16-95de-21ddbd98ebf0</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;For long timing, I recommend using app_timer, as this runs on RTC. RTC has lower resolution than TIMER, but much lower power consumption. See &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/12731/clocks-timers-rtc-why/48338#48338"&gt;this post&lt;/a&gt; for more details.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined reference to timer functions</title><link>https://devzone.nordicsemi.com/thread/196664?ContentTypeID=1</link><pubDate>Thu, 04 Jul 2019 17:53:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d1732bf-d7d1-40e4-8c64-c4618e8710ba</guid><dc:creator>tushar19</dc:creator><description>&lt;p&gt;Thanks. It&amp;#39;s working now. Need to test on hardware now!&lt;/p&gt;
&lt;p&gt;Also I would like to get suggestion from you on what is better to use for timer - repeated timer when it comes to select between app_timer and hardware timer? Who can give the max time as I see the hardware can give upto 4 minutes!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined reference to timer functions</title><link>https://devzone.nordicsemi.com/thread/196633?ContentTypeID=1</link><pubDate>Thu, 04 Jul 2019 14:56:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e502c14c-4602-4ee0-8ef0-79f8bc30a855</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;If you are using the HW timer you need nrf_drv_timer.c/h, yes. If you only use app_timer, this is not needed as app_timer runs on the RTC.&lt;/p&gt;
&lt;p&gt;nrf_drv_timer.h is found in&amp;nbsp;integration\nrfx\legacy in SDK 15.x.0. You will also need nrfx_timer.c from&amp;nbsp;modules\nrfx\drivers\src.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined reference to timer functions</title><link>https://devzone.nordicsemi.com/thread/196630?ContentTypeID=1</link><pubDate>Thu, 04 Jul 2019 14:46:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fedbd255-c2c1-41e7-bfd9-ace4e5c2abcd</guid><dc:creator>tushar19</dc:creator><description>&lt;p&gt;&lt;img alt="error" src="https://devzone.nordicsemi.com/resized-image/__size/1040x240/__key/communityserver-discussions-components-files/4/3583.nrf_5F00_error.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined reference to timer functions</title><link>https://devzone.nordicsemi.com/thread/196627?ContentTypeID=1</link><pubDate>Thu, 04 Jul 2019 14:37:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3686a01f-1d20-4877-ae54-a7d5476f6d06</guid><dc:creator>tushar19</dc:creator><description>&lt;p&gt;But I will need nrf_drv_timer.c/h right? As you have also mentioned in above answers.&lt;/p&gt;
&lt;p&gt;app_timer is there already!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined reference to timer functions</title><link>https://devzone.nordicsemi.com/thread/196626?ContentTypeID=1</link><pubDate>Thu, 04 Jul 2019 14:35:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f93dc5be-dbc2-41d0-8084-7363cea43642</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;app_timer.c/h is located in&amp;nbsp;components\libraries\timer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined reference to timer functions</title><link>https://devzone.nordicsemi.com/thread/196621?ContentTypeID=1</link><pubDate>Thu, 04 Jul 2019 14:29:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c2c57c8-fdfc-4ba0-9153-9f5988424d88</guid><dc:creator>tushar19</dc:creator><description>&lt;p&gt;I am also facing the same issue while merging timer example in ble_beacon. I am using SDK 15.0. I tried all the ways mentioned here and also noticed that there is no timer folder in components folder!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined reference to timer functions</title><link>https://devzone.nordicsemi.com/thread/196595?ContentTypeID=1</link><pubDate>Thu, 04 Jul 2019 13:56:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:152cc0e5-aa95-4533-8b14-03ae3dbc40f3</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;These are the only things that should be required to remove these errors. I would recommend that you post a new thread where you describe your issue in detail, and also upload your project for review/debugging.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined reference to timer functions</title><link>https://devzone.nordicsemi.com/thread/196546?ContentTypeID=1</link><pubDate>Thu, 04 Jul 2019 12:38:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf06355f-c997-40c2-b292-4906bc259f1d</guid><dc:creator>sara</dc:creator><description>&lt;p&gt;Yes, I have included all the above c files and also have enabled the macros. But still I am not getting what I am missing out.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined reference to timer functions</title><link>https://devzone.nordicsemi.com/thread/196542?ContentTypeID=1</link><pubDate>Thu, 04 Jul 2019 12:31:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ff9d61f-db44-4d5b-a336-83bf9a56d715</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Make sure that you have included the following source files in your project: app_timer.c, nrfx_timer.c, and nrfx_saadc.c,&amp;nbsp; and make sure that the following defines are set in your sdk_config.h file: APP_TIMER_ENABLED, TIMER_ENABLED, SAADC_ENABLED.&lt;/p&gt;
&lt;p&gt;Unless you have modified the examples/function calls, I believe all these examples use the legacy driver APIs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined reference to timer functions</title><link>https://devzone.nordicsemi.com/thread/196430?ContentTypeID=1</link><pubDate>Thu, 04 Jul 2019 08:42:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:35219e45-bd34-4ab7-981f-be17c01eb9fd</guid><dc:creator>sara</dc:creator><description>&lt;p&gt;&lt;span&gt;Actually, I have merged freeRTOS and SAADC example with ble_app_uart example as per my requirements. so in that m getting the following errors. Please suggest any solution for it.:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Output/ble_app_uart_pca10040_s132 Release/Obj/bsp.o: In function `bsp_button_event_handler&amp;#39;:&lt;br /&gt;undefined reference to `app_timer_start&amp;#39;&lt;br /&gt;undefined reference to `app_timer_stop&amp;#39;&lt;br /&gt;Output/ble_app_uart_pca10040_s132 Release/Obj/bsp.o: In function `bsp_led_indication&amp;#39;:&lt;br /&gt;undefined reference to `app_timer_stop&amp;#39;&lt;br /&gt;undefined reference to `app_timer_stop&amp;#39;&lt;br /&gt;undefined reference to `app_timer_start&amp;#39;&lt;br /&gt;undefined reference to `app_timer_start&amp;#39;&lt;br /&gt;Output/ble_app_uart_pca10040_s132 Release/Obj/bsp.o: In function `bsp_init&amp;#39;:&lt;br /&gt;undefined reference to `app_timer_create&amp;#39;&lt;br /&gt;undefined reference to `app_timer_create&amp;#39;&lt;br /&gt;undefined reference to `app_timer_create&amp;#39;&lt;br /&gt;Output/ble_app_uart_pca10040_s132 Release/Obj/main.o: In function `saadc_sampling_event_init&amp;#39;:&lt;br /&gt;undefined reference to `nrfx_timer_init&amp;#39;&lt;br /&gt;undefined reference to `nrfx_timer_extended_compare&amp;#39;&lt;br /&gt;undefined reference to `nrfx_timer_enable&amp;#39;&lt;br /&gt;undefined reference to `nrf_drv_saadc_task_address_get&amp;#39;&lt;br /&gt;Output/ble_app_uart_pca10040_s132 Release/Obj/main.o: In function `timers_init&amp;#39;:&lt;br /&gt;undefined reference to `app_timer_init&amp;#39;&lt;br /&gt;Output/ble_app_uart_pca10040_s132 Release/Obj/ble_conn_params.o: In function `conn_params_negotiation&amp;#39;:&lt;br /&gt;undefined reference to `app_timer_start&amp;#39;&lt;br /&gt;Output/ble_app_uart_pca10040_s132 Release/Obj/ble_conn_params.o: In function `on_write&amp;#39;:&lt;br /&gt;undefined reference to `app_timer_stop&amp;#39;&lt;br /&gt;Output/ble_app_uart_pca10040_s132 Release/Obj/ble_conn_params.o: In function `on_disconnect&amp;#39;:&lt;br /&gt;undefined reference to `app_timer_stop&amp;#39;&lt;br /&gt;Output/ble_app_uart_pca10040_s132 Release/Obj/ble_conn_params.o: In function `ble_conn_params_init&amp;#39;:&lt;br /&gt;undefined reference to `app_timer_create&amp;#39;&lt;br /&gt;Build failed&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined reference to timer functions</title><link>https://devzone.nordicsemi.com/thread/196398?ContentTypeID=1</link><pubDate>Thu, 04 Jul 2019 07:27:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3e30399-7b5b-4866-b647-dbf7f7a5ea35</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;App_timer and nrfx_timer are not related at all. app_timer runs on the LFCLK and RTC, while nrfx_timer is the driver for the HW TIMER peripheral. If you do not intend to use the timer, remove any source/header files related to it from the project, and disable it in sdk_config.h by setting NRFX_TIMER_ENABLED and TIMER_ENABLED to 0.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined reference to timer functions</title><link>https://devzone.nordicsemi.com/thread/196372?ContentTypeID=1</link><pubDate>Thu, 04 Jul 2019 04:44:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5d14a57-1fa2-4010-bd5c-7fd7838ea416</guid><dc:creator>sara</dc:creator><description>&lt;p&gt;If I disable APP_TIMER_ENABLE then I get other errors of undefined reference to app_timer_start. so if I want to use app timer so what changed do I need to do for solving nrfx_timer undefined errors?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined reference to timer functions</title><link>https://devzone.nordicsemi.com/thread/69561?ContentTypeID=1</link><pubDate>Tue, 29 Nov 2016 14:33:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:404e9ce8-d147-41f2-99b5-3a0aabb08228</guid><dc:creator>acha</dc:creator><description>&lt;p&gt;Thank you Jørgen, that&amp;#39;s works :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined reference to timer functions</title><link>https://devzone.nordicsemi.com/thread/69560?ContentTypeID=1</link><pubDate>Tue, 29 Nov 2016 14:22:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47eb12ab-c4ba-4604-9572-d4b52a6b12f5</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Copy line 1104-1200 from &lt;em&gt;sdk_config.h&lt;/em&gt; file found in &lt;code&gt;[SDK_ROOT]\examples\peripheral\template_project\pca10040\blank\config&lt;/code&gt; and paste it into line 217 of &lt;em&gt;sdk_config.h&lt;/em&gt; found in &lt;code&gt;[EXAMPLE_DIRECTORY]\pca10040\blank\config&lt;/code&gt; (under &lt;code&gt;PWM_ENABLED&lt;/code&gt; if you have changed the file).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined reference to timer functions</title><link>https://devzone.nordicsemi.com/thread/69559?ContentTypeID=1</link><pubDate>Tue, 29 Nov 2016 14:17:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ce8bb0e-3309-47db-96b9-6f13925e323d</guid><dc:creator>acha</dc:creator><description>&lt;p&gt;I also try to add this code line in sdk_config.h fil :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define TIMER_ENABLED 0
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined reference to timer functions</title><link>https://devzone.nordicsemi.com/thread/69556?ContentTypeID=1</link><pubDate>Tue, 29 Nov 2016 14:15:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e1a808c-f5c8-4b24-abe7-8a71942db5e7</guid><dc:creator>acha</dc:creator><description>&lt;p&gt;thank you Jørgen for your answer. The problem still not solved, i add this code lines in my project :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#include &amp;quot;sdk_config.h&amp;quot;

#ifndef APP_TIMER_ENABLED
#define APP_TIMER_ENABLED 0
#endif
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined reference to timer functions</title><link>https://devzone.nordicsemi.com/thread/69557?ContentTypeID=1</link><pubDate>Tue, 29 Nov 2016 13:50:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6abeec0-e5c2-49f5-bd55-823cc11b3be9</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;See my updated answer above. Have you done this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined reference to timer functions</title><link>https://devzone.nordicsemi.com/thread/69558?ContentTypeID=1</link><pubDate>Tue, 29 Nov 2016 13:40:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8bfce3b-51e3-4728-8263-50e626c3e469</guid><dc:creator>acha</dc:creator><description>&lt;p&gt;I don&amp;#39;t think that there is the problem. Here is my makefile :&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/3323.Makefile"&gt;Makefile&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined reference to timer functions</title><link>https://devzone.nordicsemi.com/thread/69555?ContentTypeID=1</link><pubDate>Tue, 29 Nov 2016 13:35:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69539de0-a124-4770-9b90-5cf5438b8228</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It looks like you have not included &lt;em&gt;nrf_drv_timer.c&lt;/em&gt; source file in your project/Makefile. The file is located in &lt;code&gt;[SDK_ROOT]\components\drivers_nrf\timer&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;[EDIT:] If you use SDK 12, you also have to enable the timer driver in the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.0.0/sdk_config.html?cp=4_0_0_1_6"&gt;SDK header configuration file&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;#define TIMER_ENABLED 1&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;See the &lt;em&gt;sdk_config.h&lt;/em&gt; file of the template application for more details.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>