<?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>nrf21540 Program UICR EFUSE problem</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/114998/nrf21540-program-uicr-efuse-problem</link><description>Hi, 
 I have problem with program nrf21540 UICR EFUSE. The first time, WR-UICR was able to successfully write, and after reset the reading of reg0 displayed correctly. But the second attempt to write WR-UICR failed, and after reset, reading reg0 is the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 09 Oct 2024 01:44:58 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/114998/nrf21540-program-uicr-efuse-problem" /><item><title>RE: nrf21540 Program UICR EFUSE problem</title><link>https://devzone.nordicsemi.com/thread/505442?ContentTypeID=1</link><pubDate>Wed, 09 Oct 2024 01:44:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3046c34-da3c-4c29-9785-4eac64ec78d9</guid><dc:creator>david@2024</dc:creator><description>&lt;p&gt;&lt;span&gt;ok, thank you&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf21540 Program UICR EFUSE problem</title><link>https://devzone.nordicsemi.com/thread/505245?ContentTypeID=1</link><pubDate>Mon, 07 Oct 2024 19:44:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:648de440-b321-4996-b0c4-953febe38dce</guid><dc:creator>bobbyreming</dc:creator><description>&lt;p&gt;Hello, as I know, the UICR is typically used for one-time programming, meaning that once you write to certain registers, you cannot change them back to their original state. I think you might want to enhance your code with additional checks and ensure proper sequencing. Here&amp;rsquo;s an example of how you might structure your code: &lt;span style="color:#f8f8f8;"&gt;&lt;a style="color:#f8f8f8;" href="https://slope3.com"&gt;slope game&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;// 1. Read reg 0
data = Spi_Read(0x00);
NRF_LOG_INFO(&amp;quot;0x%x&amp;quot;, data);

// 2. Write reg 1, enable UICR
Spi_Write(0x04, 0x01);
data = Spi_Read(0x01);
NRF_LOG_INFO(&amp;quot;0x%x&amp;quot;, data);
nrf_delay_ms(100);

// 3. Check if UICR is enabled before writing
if (data &amp;amp; 0x01) {
    // 4. Write reg 3
    Spi_Write(0x04, 0x03);
    nrf_delay_ms(10);
    data = Spi_Read(0x03);
    NRF_LOG_INFO(&amp;quot;reg3--0x%x&amp;quot;, data);

    // 5. Write reg 2
    Spi_Write(0x81, 0x02);
    nrf_delay_ms(10);
    data = Spi_Read(0x02);
    NRF_LOG_INFO(&amp;quot;reg2-0x%x&amp;quot;, data);
    
    // 6. Reset
    PDN_LOW;
    nrf_delay_ms(100);
    PDN_HIGH;
} else {
    NRF_LOG_ERROR(&amp;quot;UICR not enabled. Cannot write.&amp;quot;);
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>