<?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>NRF52840 Timer Registers</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/64608/nrf52840-timer-registers</link><description>Hi all, 
 
 I am working on a project with an Adafruit ItsyBitsy that uses and nRF52840 chip, and I am having a bit of trouble with getting the timers to work accurately. Basically what I want to do is to have a task completed once per second, and I was</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 10 Aug 2020 13:25:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/64608/nrf52840-timer-registers" /><item><title>RE: NRF52840 Timer Registers</title><link>https://devzone.nordicsemi.com/thread/263851?ContentTypeID=1</link><pubDate>Mon, 10 Aug 2020 13:25:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27adfe0b-fbba-4648-bf5e-ef00adedd0ed</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;I would say as @dmitry already have mentioned: please keep in mind that the registers are 32 bit-wide.&lt;br /&gt;In the configuration registers&amp;nbsp;you functions will&amp;nbsp;likely work as intended, since only a couple of bits is used, but when you get to the CC registers it will fail.&lt;br /&gt;&lt;br /&gt;For the record, in your configuration you are setting BITMODE to 0, which configures 16 bit resolution, while your comment states you are attempting to set 32 bit resolution - so this is either an oversight, an error or an outdated comment.&lt;br /&gt;&lt;br /&gt;Please let me know if accounting for the registers being 32 bit resolves your issue with the unexpected values and behavior.&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: NRF52840 Timer Registers</title><link>https://devzone.nordicsemi.com/thread/263700?ContentTypeID=1</link><pubDate>Sat, 08 Aug 2020 10:35:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a89e9697-3cb7-49ce-8313-7aa12e18a54a</guid><dc:creator>Dmitry</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;inline volatile uint8_t *regAddress (Registers reg){
  return reinterpret_cast&amp;lt;volatile 
        uint8_t*&amp;gt;(Timer_2_base + reg);
}
inline uint8_t regRead(Registers reg){
  return *regAddress(reg);
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;here you&amp;#39;re working with registers as with 8-bit ones, but they&amp;#39;re 32-bit wide.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>