<?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>Program UICR  via SPI problem</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/85593/program-uicr-via-spi-problem</link><description>Hi, 
 I have problem with program nrf21540 UICR mode. POUTA/B_UICR seem not set successful during measured here. 
 Below following which I write via SPI(Voltage is 3.5V). Would some one help me to check if have problem about below progress? 
 Step 1:</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 18 Mar 2022 13:54:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/85593/program-uicr-via-spi-problem" /><item><title>RE: Program UICR  via SPI problem</title><link>https://devzone.nordicsemi.com/thread/358890?ContentTypeID=1</link><pubDate>Fri, 18 Mar 2022 13:54:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ff5826f-ca74-48db-90a9-a6c290b52fad</guid><dc:creator>Bendik Heiskel</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Sorry for the delay. I have now been able to reproduce the problem with writing to the UICR on the nRF21540 and believe I found the fix for the problem.&lt;/p&gt;
&lt;p&gt;UICR program mode must be enabled before entering UICR program mode. This means that step 4 must be split into two write operations, the first is for enabling UICR program mode, and the second one is for entering UICR program mode. So its not possible to enter UICR program mode by writing 0xF4 to config 1, but you should instead first write 0x4, then in another write operation write 0xF0 to config 1.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Bendik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Program UICR  via SPI problem</title><link>https://devzone.nordicsemi.com/thread/357520?ContentTypeID=1</link><pubDate>Fri, 11 Mar 2022 01:34:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c022ccb9-3e52-49d1-aaaf-484405e6a406</guid><dc:creator>mikefu</dc:creator><description>&lt;p&gt;Hi Bendik,&lt;br /&gt;I use custom board.&lt;/p&gt;
[quote userid="104202" url="~/f/nordic-q-a/85593/program-uicr-via-spi-problem/357491#357491"]Have you tried to write multiple times? [/quote]
&lt;p&gt;I tried many times but&amp;nbsp; wrote with same datas. The&amp;nbsp;CFG2 and CFG3 are still 0 during following below to read out.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Step 1: Read out&amp;nbsp;HW_REVISION: MOSI: 0x95, 0x00, MISO: 0x00 0x30&amp;nbsp; =&amp;gt; got 0x30.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Step 2: mode = 1, Read out config 0, MOSI: 0x80,0x00; MISO: 0x00, 0x18 =&amp;gt; TX GAIN is 6, which is the POUTB_PROD, not my set UICR value.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Step 3: mode =0;&amp;nbsp;&lt;span&gt;Read out config 0, MOSI: 0x80,0x00; MISO: 0x00, 0x64 =&amp;gt; TX GAIN is 25, which is the&amp;nbsp;&lt;/span&gt;&lt;span&gt;POUTA_PROD, not my set UICR value.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Step 4: Enter UICR mode: Write config 1: MOSI: 0xc1, 0xf4; MISO: 0x00, 0x00,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Step 5: Read config 1:&amp;nbsp; MOSI: 0x81, 0x00; MISO: 0x00, 0xf4=&amp;gt; Config 1 read out correct.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Step 6: Read config 3: MOSI: 0x83, 0x00; MISO: 0x00, 0x00&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Step 7: Reda config 2: MOSI:0x82, 0x00; MISO: 0x00, 0x00,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;Step 8: mode =0;&amp;nbsp;Read out config 0 again, MOSI: 0x80,0x00; MISO: 0x00, 0x64&amp;nbsp;=&amp;gt; TX GAIN is&amp;nbsp;25, which is the&amp;nbsp;POUTA_PROD, It meas that the SPI also works here.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Program UICR  via SPI problem</title><link>https://devzone.nordicsemi.com/thread/357491?ContentTypeID=1</link><pubDate>Thu, 10 Mar 2022 16:12:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6cc6af04-52ea-4cbc-b9e2-884cc45ba38b</guid><dc:creator>Bendik Heiskel</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Your procedure looks to be correct, I will try to reproduce you results.&lt;/p&gt;
&lt;p&gt;What hardware are you using, the nRF21540DK, nRF21540EK or a custom board?&lt;/p&gt;
&lt;p&gt;Have you tried to write multiple times? The UICR on the nRF21540 have a EFUSE and can only be programmed once. If you have tried multiple times it may have been successful but not with the desired TX gain.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Bendik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>