<?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>nrfjprog.dll  - nrfjprogdll_go not starting SoC</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/30511/nrfjprog-dll---nrfjprogdll_go-not-starting-soc</link><description>Hi 
 I used nrfjprog.dll in our internal software. implementation is in C#. 
 Everything works just fine - except for the last call to NRFJPROGDLL_go - it seems like it starts the proc for a couple mseccs, then it returns to halted state. 
 If I call</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 19 Feb 2018 14:00:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/30511/nrfjprog-dll---nrfjprogdll_go-not-starting-soc" /><item><title>RE: nrfjprog.dll  - nrfjprogdll_go not starting SoC</title><link>https://devzone.nordicsemi.com/thread/121268?ContentTypeID=1</link><pubDate>Mon, 19 Feb 2018 14:00:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f09ffaa-d651-461e-a914-e101970e55a3</guid><dc:creator>Simen August Tinderholt</dc:creator><description>&lt;p&gt;Oh, I didn&amp;#39;t notice you&amp;#39;re using nRF51, then debug reset does nothing, as those do not have the requisite CTRL-AP.&lt;br /&gt;&lt;br /&gt;Then the sys_resets by themselves should suffice.&amp;nbsp;&lt;strong&gt;INVALID_DEVICE_FOR_OPERATION &lt;/strong&gt;means the DLL has done nothing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrfjprog.dll  - nrfjprogdll_go not starting SoC</title><link>https://devzone.nordicsemi.com/thread/120994?ContentTypeID=1</link><pubDate>Thu, 15 Feb 2018 14:58:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2df3361-ad87-421d-8026-90992cb6313f</guid><dc:creator>Martin</dc:creator><description>&lt;p&gt;I think I have it solved.&lt;/p&gt;
&lt;p&gt;Just finished a test run with 30 devices - and all started.&lt;/p&gt;
&lt;p&gt;The trick was to&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;halt the SoC&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;debug_reset - ignoring&amp;nbsp;INVALID_DEVICE_FOR_OPERATION&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;sys_reset&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;do all flashing&lt;/li&gt;
&lt;li&gt;debug_reset - ignoring&amp;nbsp;INVALID_DEVICE_FOR_OPERATION&lt;/li&gt;
&lt;li&gt;sys_reset&lt;/li&gt;
&lt;li&gt;disconnect_device&lt;/li&gt;
&lt;li&gt;go&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;at least this order solved it for me. The main solutions seems to be to double reset the SoC.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrfjprog.dll  - nrfjprogdll_go not starting SoC</title><link>https://devzone.nordicsemi.com/thread/120965?ContentTypeID=1</link><pubDate>Thu, 15 Feb 2018 11:57:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2f7ff9e-3556-4507-8153-9114eb2fc729</guid><dc:creator>Martin</dc:creator><description>&lt;p&gt;okay, I will make the changes and report back.&lt;/p&gt;
&lt;p&gt;BTW: any chance you can make a flow diagram available how you are handling the commandline&amp;nbsp;args in nrfjprog?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrfjprog.dll  - nrfjprogdll_go not starting SoC</title><link>https://devzone.nordicsemi.com/thread/120964?ContentTypeID=1</link><pubDate>Thu, 15 Feb 2018 11:54:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abb3af19-f700-4414-b37a-83e805ab8849</guid><dc:creator>Simen August Tinderholt</dc:creator><description>&lt;p&gt;If you&amp;#39;re not protected you should be able to do a sysreset, but a debug reset is mostly equivalent, and should always work.&lt;br /&gt;&lt;br /&gt;After programming you should at least reset the device to make sure your program counter and stack pointers are read correctly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrfjprog.dll  - nrfjprogdll_go not starting SoC</title><link>https://devzone.nordicsemi.com/thread/120963?ContentTypeID=1</link><pubDate>Thu, 15 Feb 2018 11:52:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f1ad3251-5c1b-43de-b633-7ed041ebd03c</guid><dc:creator>Martin</dc:creator><description>&lt;p&gt;currently I&amp;#39;m not setting protection, this was also one of my first thoughts.&lt;/p&gt;
&lt;p&gt;should I do a debug_reset instead of sys_reset anyways?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrfjprog.dll  - nrfjprogdll_go not starting SoC</title><link>https://devzone.nordicsemi.com/thread/120962?ContentTypeID=1</link><pubDate>Thu, 15 Feb 2018 11:48:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b684b02f-b517-4b2b-8f75-1e60efc16e2c</guid><dc:creator>Simen August Tinderholt</dc:creator><description>&lt;p&gt;Ah, you&amp;#39;re protecting, then doing go?&lt;/p&gt;
&lt;p&gt;You should perform a debug reset instead, this will reset your device and start the program. Since you&amp;#39;ve enabled readback protection, the go probably fails, as you no longer have access to the core.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrfjprog.dll  - nrfjprogdll_go not starting SoC</title><link>https://devzone.nordicsemi.com/thread/120958?ContentTypeID=1</link><pubDate>Thu, 15 Feb 2018 11:30:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:994b7611-ff44-43a6-9efc-1cbb4955fbf3</guid><dc:creator>Martin</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;pseudo code&amp;nbsp;below:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="csharp"&gt;void flashingDevice(){
    
    NRFJProg.NRFJPROG_open_dll ();
    
    NRFJProg.NRFJPROG_is_dll_open( ref open );
    
    if(open){
        NRFJProg.NRFJPROG_is_connected_to_emu( ref connected );
        
        if(!connected){
            NRFJProg.NRFJPROG_connect_to_emu_without_snr( 8000 );
            
            NRFJProg.NRFJPROG_read_connected_emu_snr( ref serial );
            
            NRFJProg.NRFJPROG_connect_to_device();
            
            // GET SOME DEVICE INFOS
            NRFJProg.NRFJPROG_is_connected_to_device( ref deviceConnected );
            if ( deviceConnected ) {
                NRFJProg.NRFJPROG_halt();
                Thread.Sleep( 200 );
                
                NRFJProg.NRFJPROG_is_halted( ref halted );
                
                NRFJProg.NRFJPROG_erase_all();
                
                foreach(cell in sdHex){
                    NRFJProg.NRFJPROG_write(cell, ...);
                }
                
                foreach(cell in fwHex){
                    NRFJProg.NRFJPROG_write(cell, ...);
                }
                
                // SET DATA TO UICR
                NRFJProg.NRFJPROG_write_u32();

                if(protect)
                NRFJProg.NRFJPROG_readback_protect(NRFJProg.readback_protection_status_t.ALL);
                
                // Write some more data to RAM
                NRFJProg.NRFJPROG_write_u32();
                Thread.Sleep( 200 );
                
                // JUST A TRY
                //NRFJProg.NRFJPROG_sys_reset();
                //Thread.Sleep( 400 );
                
                NRFJProg.NRFJPROG_go();
                Thread.Sleep( 400 );
                
                NRFJProg.NRFJPROG_disconnect_from_device();
                
                // becoming desperate
                NRFJProg.NRFJPROG_go();
            }
        }
        
        NRFJProg.NRFJPROG_disconnect_from_emu();
    }
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrfjprog.dll  - nrfjprogdll_go not starting SoC</title><link>https://devzone.nordicsemi.com/thread/120949?ContentTypeID=1</link><pubDate>Thu, 15 Feb 2018 10:15:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f547ca8c-896f-42c8-a056-fdfe3bad959d</guid><dc:creator>Simen August Tinderholt</dc:creator><description>&lt;p&gt;Do you perform any actions after _go() ? Some functions in the nRFJProg DLL halt the processor to ensure data integrity.&lt;/p&gt;
&lt;p&gt;If possible, could you post the nRFJProg log, or a pseudocode of your script?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>