<?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>Reading a write only register value</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/24128/reading-a-write-only-register-value</link><description>What&amp;#39;s the expected behavior when reading a register that is write only? For example, I&amp;#39;m using an some code that is reading the value of the TASK_START register of the RNG (nRF52832). 
 I&amp;#39;m expecting this to be unpredictable so I&amp;#39;m surprised to see</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 08 Aug 2017 11:39:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/24128/reading-a-write-only-register-value" /><item><title>RE: Reading a write only register value</title><link>https://devzone.nordicsemi.com/thread/95006?ContentTypeID=1</link><pubDate>Tue, 08 Aug 2017 11:39:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b653d70d-9e10-4acd-84fe-7d56c0f0b018</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;This code looks strange to me and seems that it depends on the undefined behavior. Atleast when using KEIL which reads the registers open in the new constantly, even though writing &amp;#39;1&amp;#39; to any TASKS never shows the register to be &amp;#39;1&amp;#39;. Which implicitly means that this register should always read 0. I do not have the hardware in hand to verify this, but it should be easy to verify this.
Pseudocode&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;volatile uint32_t verify = 0;
NRF_RNG-&amp;gt;TASKS_START = 1;
verify = NRF_RNG-&amp;gt;TASKS_START;
print verify
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading a write only register value</title><link>https://devzone.nordicsemi.com/thread/95005?ContentTypeID=1</link><pubDate>Tue, 08 Aug 2017 07:22:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e50b11de-6585-4e4f-b65f-72905dd3b1c5</guid><dc:creator>Jonathan</dc:creator><description>&lt;p&gt;In the mynewt RTOS, there&amp;#39;s a code that checks if the RNG started in the following manner:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;if (NRF_RNG-&amp;gt;TASKS_START == 0) {
        NRF_RNG-&amp;gt;EVENTS_VALRDY = 0;
        if (g_ble_rng_isr_cb) {
            NRF_RNG-&amp;gt;INTENSET = 1;
        }
        NRF_RNG-&amp;gt;TASKS_START = 1;
    }
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading a write only register value</title><link>https://devzone.nordicsemi.com/thread/95004?ContentTypeID=1</link><pubDate>Mon, 07 Aug 2017 21:32:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:718f6187-78d6-41e5-97be-045bc6714ecf</guid><dc:creator>Roger Clark</dc:creator><description>&lt;p&gt;What code are you talking about ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>