<?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 `__device_dts_ord_98&amp;#39;</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/105492/undefined-reference-to-__device_dts_ord_98</link><description>I&amp;#39;m trying to use implement the real time clock rtc0. This is what I did: 
 I enabled CONFIG_RTC=y in the prj.conf. 
 
 in the overlay file 
 
 
 in the main 
 After I added rtc_set_time(timer_dev, &amp;amp;time); it fails to link the C executable zephyr/zephyr_pre0</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 20 Dec 2023 15:31:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/105492/undefined-reference-to-__device_dts_ord_98" /><item><title>RE: undefined reference to `__device_dts_ord_98'</title><link>https://devzone.nordicsemi.com/thread/461318?ContentTypeID=1</link><pubDate>Wed, 20 Dec 2023 15:31:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ad087c3-e026-44a5-ad6c-242a28d98726</guid><dc:creator>helsing</dc:creator><description>&lt;p&gt;Hi Ruth, Niklas, sorry for the delay.&lt;/p&gt;
&lt;p&gt;The nRF52840 development kit does not have any dedicated Real Time Clock IC.&lt;/p&gt;
&lt;p&gt;Here is an unofficial sample(a few years old) showing how to use the Real Time COUNTER in nRF Connect SDK. The sample has not been tested using nRF52840 though it might work: &lt;a href="https://github.com/Rallare/fw-nrfconnect-nrf/blob/nrf9160_samples/samples/nrf9160/nrfx/rtc/src/main.c"&gt;fw-nrfconnect-nrf/samples/nrf9160/nrfx/rtc/src/main.c at nrf9160_samples · Rallare/fw-nrfconnect-nrf · GitHub&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Ruth, in case you still need guidance, please create a new ticket and refer to the relevant parts of this ticket.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined reference to `__device_dts_ord_98'</title><link>https://devzone.nordicsemi.com/thread/458460?ContentTypeID=1</link><pubDate>Fri, 01 Dec 2023 08:48:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f08b946d-f287-46bd-a9e8-fe7767d94200</guid><dc:creator>NicolasK.</dc:creator><description>&lt;p&gt;Hi Ruth,&lt;/p&gt;
&lt;p&gt;I think its like Helsing said. We are confusing real time clock and real time counter. Its not good that they have the same abbreviation rtc&lt;em&gt; (in my opinion it should be more like RTIC (increment counter).&lt;/em&gt; The real time counter is similar to the ticks of the MCU [like k_uptime_get()]. The real time clock needs a battery and a quartz which is kept running in order to track time even if the main device is turned off. Usually they are a seperate hardware module like the DS3231. My assumption was that since the nrf52840dk has a battery, its likely it has a real time clock, but I guess I&amp;#39;m wrong.&lt;/p&gt;
&lt;p&gt;Helsing please correct me if I misunderstood anything.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Nicolas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined reference to `__device_dts_ord_98'</title><link>https://devzone.nordicsemi.com/thread/458389?ContentTypeID=1</link><pubDate>Thu, 30 Nov 2023 17:40:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:695baabc-d725-470b-b5db-c66a8faf2243</guid><dc:creator>RuthA</dc:creator><description>&lt;p&gt;Hi Helsing,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m seeing the same behaviour with an nRF52 dev kit.&lt;/p&gt;
&lt;div style="background-color:#24292e;color:#e1e4e8;font-family:Consolas, &amp;#39;Courier New&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#b392f0;"&gt;DEVICE_DT_GET&lt;/span&gt;&lt;span style="color:#e1e4e8;"&gt;( &lt;/span&gt;&lt;span style="color:#b392f0;"&gt;DT_NODELABEL&lt;/span&gt;&lt;span style="color:#e1e4e8;"&gt;( XX ) )&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;works for other node labels and it looks like it expands to the correct &amp;quot;__device_dts_ord_XX&amp;quot; number for the rtc nodes (rtc0, rtc1 and rtc2 on my system) when checked against the &amp;quot;devicetree_generated.h&amp;quot; file. However, the &amp;quot;rtc_set_time&amp;quot; function can&amp;#39;t use the device and I see the same &amp;quot;undefined reference&amp;quot; error as Nicolas (with a different number).&lt;/p&gt;
&lt;p&gt;This method of setting the device and then using &amp;quot;rtc_set_time&amp;quot; seems to follow the procedure in this zephyr test: &lt;a id="" href="https://github.com/zephyrproject-rtos/zephyr/blob/a51bd53cef2b2b6cacb1dc7a366adb45565659f3/tests/drivers/rtc/rtc_api/src/test_time.c"&gt;https://github.com/zephyrproject-rtos/zephyr/blob/a51bd53cef2b2b6cacb1dc7a366adb45565659f3/tests/drivers/rtc/rtc_api/src/test_time.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Can you explain why it&amp;#39;s not working or let me know which external modules we need for the real time clock?&lt;/p&gt;
&lt;p&gt;Best wishes,&lt;/p&gt;
&lt;p&gt;Ruth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined reference to `__device_dts_ord_98'</title><link>https://devzone.nordicsemi.com/thread/456161?ContentTypeID=1</link><pubDate>Fri, 17 Nov 2023 12:57:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e61d2fa0-6e0f-4608-bfc5-99d7d61e170b</guid><dc:creator>helsing</dc:creator><description>&lt;p&gt;&lt;code&gt;rtc_set_time&lt;/code&gt; is a part of the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/hardware/peripherals/rtc.html#c.rtc_set_time"&gt;Real Time &lt;em&gt;Clock&lt;/em&gt;&lt;/a&gt; drivers in Zephyr while &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/build/dts/api/bindings/rtc/nordic,nrf-rtc.html#nordic-nrf-rtc"&gt;nordic,nrf-rtc&lt;/a&gt; is Real Time &lt;em&gt;Counter. &lt;span style="text-decoration:underline;"&gt;&lt;/span&gt;&lt;/em&gt;These are not the same.&lt;/p&gt;
&lt;p&gt;For real time clock one often needs an external module. For real time clock, there is a Zephyr test here: &lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/main/drivers/rtc"&gt;https://github.com/nrfconnect/sdk-zephyr/tree/main/drivers/rtc&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined reference to `__device_dts_ord_98'</title><link>https://devzone.nordicsemi.com/thread/455809?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 15:19:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c5a3bd0-6f0d-4629-9654-a36131c0cc43</guid><dc:creator>helsing</dc:creator><description>&lt;p&gt;Hi Nicolas, sorry for the delay. I will get back to you tomorrow.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined reference to `__device_dts_ord_98'</title><link>https://devzone.nordicsemi.com/thread/454744?ContentTypeID=1</link><pubDate>Wed, 08 Nov 2023 15:56:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6374cd82-9e90-4b2a-aaf6-6ef4ed47361c</guid><dc:creator>NicolasK.</dc:creator><description>&lt;p&gt;That doesn&amp;#39;t work (I tried it). rtc0 already exist in the nrf53840.dtsi (not the .dts) aswell as rtc1 and rtc2. Im using the &amp;quot; &amp;amp;rtc0 { &amp;quot; to point to that location and overwrite its parameters. The only important piece in the overlay is the status = &amp;quot;okay&amp;quot; to enable rtc0 because by default its status = &amp;quot;disabled&amp;quot;. The timer_dev seems to be set correctly because there is no complie error, but when I add the rtc_set_time function it gives me said error. :(&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined reference to `__device_dts_ord_98'</title><link>https://devzone.nordicsemi.com/thread/454740?ContentTypeID=1</link><pubDate>Wed, 08 Nov 2023 15:34:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d9cf67a-8227-4491-b7e5-0d87267abb18</guid><dc:creator>helsing</dc:creator><description>&lt;p&gt;Hi Nicolas,&lt;/p&gt;
&lt;p&gt;Does it help to if you try &amp;#39;&lt;code&gt;rtc&lt;/code&gt;&amp;#39; instead of &amp;#39;&lt;code&gt;rtc0&lt;/code&gt;&amp;#39; in the overlay file?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>