<?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>Two nRF devkits connected to one computer (PCA10028 &amp;amp; PCA10040). How can I select which one is programmed with Make?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/53128/two-nrf-devkits-connected-to-one-computer-pca10028-pca10040-how-can-i-select-which-one-is-programmed-with-make</link><description>When make calls 
 
 with the intention of flashing the 10040 device, I get the following: 
 ERROR: The --family option given with the command does not match the device connected 
 It looks like nrfjprog tries to program the 10028 device (/dev/ttyACM1</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 14 Oct 2019 07:28:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/53128/two-nrf-devkits-connected-to-one-computer-pca10028-pca10040-how-can-i-select-which-one-is-programmed-with-make" /><item><title>RE: Two nRF devkits connected to one computer (PCA10028 &amp; PCA10040). How can I select which one is programmed with Make?</title><link>https://devzone.nordicsemi.com/thread/214737?ContentTypeID=1</link><pubDate>Mon, 14 Oct 2019 07:28:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac5b1678-a899-4cee-a025-6be32ff40cbb</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;Sorry, I made a bad mistake in my previous reply.&lt;/p&gt;
&lt;p&gt;The correct method for this is the following:&lt;/p&gt;
&lt;p&gt;If you run nrfjprog --help you get all the options:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;λ nrfjprog.exe --help                                                                   
                                                                                        
Usage:                                                                                  
-------------------------------------------------------------------------------         
                                                                                        
 -q  --quiet                 Reduces the stdout info. Must be combined with             
                             another command.                                           
                                                                                        
 -h  --help                  Displays this help.                                        
                                                                                        
 -v  --version               Displays the nrfjprog and dll versions.                    
                                                                                        
     --jdll &amp;lt;file&amp;gt;           Uses the Segger&amp;#39;s JLinkARM dll specified in the            
                             given file path instead of searching for the               
                             latest version of Segger&amp;#39;s JLinkARM dll. Must be           
                             combined with another command.                             
                                                                                        
     --ini &amp;lt;file&amp;gt;            Uses the nrfjprog settings file specified in the           
                             given file path instead of searching for the               
                             default nrfjprog.ini file in the installation              
                             folder. Must be combined with another command.             
                                                                                        
     --qspiini &amp;lt;file&amp;gt;        Uses the QSPI settings file specified in the given         
                             file path instead of searching for the default             
                             QspiDefault.ini file in the installation folder.           
                             Must be combined with either --erasepage, --memrd,         
                             --memwr, --program, --verify, --readqspi or                
                             --qspieraseall commands.                                   
                             Limitations:                                               
                             For nRF51 devices, the operation is not available.         
                             For nRF52 devices, the operation is not available          
                             for devices without a QSPI peripheral.                     
                             For nRF91 devices, the operation is not available          
                                                                                        
     --qspicustominit        Deprecated, this operation does nothing.                   
                                                                                        
 -i  --ids                   Displays the serial numbers of all the debuggers           
                             connected to the PC.                                       
                                                                                        
     --com                   Displays a list of the serial port associated              
                             with all connected debuggers. If combined with             
                                                                                        
                             --snr, it will display all comports associated             
                             with this debugger                                         
                                                                                        
 -f  --family &amp;lt;family&amp;gt;       Selects the device family for the operation. Valid         
                             argument options are NRF51, NRF52, NRF53, NRF91,           
                             and UNKNOWN.                                               
                             If UNKNOWN family is given, an automatic family            
                             detection of the device is performed. Note that            
                             providing the actual family is faster than                 
                             performing the automatic family detection. If              
                             --family option is not given, the default is taken         
                             from nrfjprog.ini. Must be combined with another           
                             command.                                                   
                                                                                        
 -s  --snr &amp;lt;serial_number&amp;gt;   Selects the debugger with the given serial number          
                             among all those connected to the PC for the                
                             operation. Must be combined with another command.          
                                                                                        
 -c  --clockspeed &amp;lt;speed&amp;gt;    Sets the debugger SWD clock speed in kHz                   
                             resolution for the operation. The valid clockspeed         
                             arguments go from 125 kHz to 50000 kHz. If given           
                             clockspeed is above the maxiumum clockspeed                
                             supported by the emulator, its maximum will be             
                             used instead. If --clockspeed option is not given,         
                             the default is taken from nrfjprog.ini. Must be            
                             combined with another command.                             
                                                                                        
     --recover               Erases all user available non-volatile memory and          
                             disables the read back protection mechanism if             
                             enabled.                                                   
                                                                                        
     --rbp &amp;lt;level&amp;gt;           Enables the readback protection mechanism. Valid           
                             argument options are CR0 and ALL.                          
                             Limitations:                                               
                             For nRF52 devices, the CR0 argument option is              
                             invalid.                                                   
                             Side effects:                                              
                             After an --rbp operation is performed, the                 
                             available operations are reduced.                          
                             For nRF51 devices, and if argument option ALL is           
                             used, --pinreset will not work on certain older            
                             devices.                                                   
                             For nRF52 devices, only --pinreset, --debugreset           
                             or --recover operations are available after --rbp.         
                                                                                        
     --pinresetenable        Enables the pin reset by the use of UICR PSELRESET         
                             registers.                                                 
                             Limitations:                                               
                             For nRF51 devices, the command is not available.           
                             For nRF53 devices, the command is not available.           
                             For nRF91 devices, the command is not available.           
                                                                                        
 -p  --pinreset              Performs a pin reset. Core will run after the              
                             operation.                                                 
                                                                                        
 -r  --reset                 Performs a soft reset by setting the SysResetReq           
                             bit of the AIRCR register of the core. The core            
                             will run after the operation. Can be combined with         
                             the --program operation. If combined with the              
                             --program operation, the reset will occur after            
                             the flashing has occurred to start execution.              
                                                                                        
 -d  --debugreset            Performs a soft reset by the use of the CTRL-AP.           
                             The core will run after the operation. Can be              
                             combined with the --program operation. If combined         
                             with the --program operation, the debug reset will         
                             occur after the flashing has occurred to start             
                             execution.                                                 
                             Limitations:                                               
                             For nRF51 devices, the --debugreset operation is           
                             not available.                                             
                             For nRF52 devices, the --debugreset operation is           
                             not available for nRF52832_xxAA_ENGA devices.              
                                                                                        
 -e  --eraseall              Erases all user available program flash memory and         
                             the UICR page. Can be combined with the                    
                             --qspieraseall operation.                                  
                             Limitations:                                               
                             For nRF51 devices, if the device came from Nordic          
                             with a pre-programmed SoftDevice, only the user            
                             available code flash and UICR will be erased.              
                                                                                        
     --qspieraseall          Erases all the flash of the external memory device         
                             with the help of the QSPI peripheral. Note that            
                             depending on the external memory device&amp;#39;s erase            
                             speed the operation might take minutes. Can be             
                             combined with the --eraseall operation.                    
                             Limitations:                                               
                             For nRF51 devices, the operation is not available.         
                             For nRF52 devices, the operation is not available          
                             for devices without a QSPI peripheral.                     
                             For nRF52 devices, the operation is only available         
                             for devices connected to an external memory                
                             device. To determine if an external memory device          
                             is connected, nrfjprog checks MemSize parameter            
                             from the QspiDefault.ini file or the QSPI                  
                             configuration ini file that is given with the              
                             --qspiini option.                                          
                             For nRF91 devices, the operation is not available          
                                                                                        
     --eraseuicr             Erases the UICR page.                                      
                             Limitations:                                               
                             For nRF51 devices, the operation is available only         
                             if the device came from Nordic with a                      
                             pre-programmed SoftDevice.                                 
                             For nRF91 devices, the operation is not available          
                             to erase uicr, please use --eraseall                       
                                                                                        
     --erasepage &amp;lt;start[-end]&amp;gt;                      Erases the flash pages              
                             starting at the flash page containing the start            
                             address and ending at the page containing the end          
                             address (not included in the erase). If end                
                             address is not given, only one flash page will be          
                             erased. If your device is equipped with a QSPI             
                             peripheral, the pages to erase belong to the XIP           
                             region of the device, and an external memory               
                             device is present, this command erases 4 kB pages          
                             from the external memory device. The first address         
                             of the region is considered as address 0 of the            
                             external memory device. To determine if an                 
                             external memory device is present, nrfjprog checks         
                             the MemSize parameter from the QspiDefault.ini             
                             file or from the QSPI configuration ini file given         
                             with the --qspiini option.                                 
                             Limitations:                                               
                             For nRF51 devices, the page will not be erased if          
                             it belongs to region 0.                                    
                                                                                        
     --program &amp;lt;hex_file&amp;gt; [--sectorerase | --chiperase | --sectoranduicrerase]          
                             [--qspisectorerase | --qspichiperase]                      
                             Programs the specified hex_file into the device.           
                             If the target area to program is not erased, the           
                             --program operation will fail unless an erase              
                             option is given. Valid erase operations for                
                             the internal flash memory are --sectorerase,               
                             --sectoranduicrerase and --chiperase. If                   
                             --chiperase is given, all the available user               
                             non-volatile memory, including UICR, will be               
                             erased before programming. If --sectorerase is             
                             given, only the targeted non-volatile memory pages         
                             excluding UICR will be erased. If                          
                             --sectoranduicrerase is given, only the targeted           
                             non-volatile memory pages including UICR will be           
                             erased. Note that the --sectoranduicrerase and             
                             --sectorerase operations normally take                     
                             significantly longer time compared to --chiperase          
                             operation so use them with caution. If your                
                             device is equipped with a QSPI peripheral and an           
                             external memory device is present, data targeting          
                             the XIP region will be written to the external             
                             memory device. The first address of the XIP region         
                             is considered as address 0 of the external memory          
                             device. To determine if an external memory device          
                             is present, nrfjprog checks the MemSize paramter           
                             from QspiDefault.ini file or from the QSPI                 
                             configuration ini file given with the --qspiini            
                             option. If the target area to program is not               
                             erased, the --program operation will fail unless           
                             an erase option is given. Valid erase operations           
                             for the external memory device are --qspichiperase         
                             and --qspisectorerase. If --qspichiperase is               
                             given, the external memory device will be erased.          
                             If the --qspisectorerase is given, only 4kB pages          
                             pages from the targeted external memory device             
                             will be erased. Note that --qspichiperase                  
                             operation may take several minutes. The --program          
                             command can be combined with the --verify                  
                             operation. It can also be combined with either the         
                             --reset or the --debugreset operations. the reset          
                             will occur after the flash operation in order to           
                             start the execution.                                       
                             Limitations:                                               
                             For nRF51 devices, the --sectoranduicrerase                
                             operation is not available.                                
                             For nRF51 devices, if the hex_file provided                
                             contains sectors belonging to region 0, the                
                             --program operation will fail.                             
                             For nRF51 devices, the --qspisectorerase and               
                             --qspichiperase operations are not available.              
                             For nRF52 devices, the --qspisectorerase and               
                             --qspichiperase operations are not available               
                             unless the device is equipped with a QSPI                  
                             peripheral and an external memory is connected. To         
                             determine if an external memory is present, the            
                             MemSize parameter from QspiDefault.ini file or             
                             from the QSPI configuration ini file given with            
                             the --qspiini option is evaluated.                         
                             For nRF91 devices, the --qspisectorerase and               
                             --qspichiperase operations are not available.              
                                                                                        
     --memwr &amp;lt;addr&amp;gt; --val &amp;lt;val&amp;gt;                     Writes to the provided              
                             address in memory with the help of the NVM                 
                             Controller or, if your device is equipped with a           
                             QSPI peripheral and the address to write belongs           
                             to the XIP region, with the help of the QSPI               
                             peripheral to an external memory device. To                
                             determine if an external memory device is present,         
                             nrfjprog checks the MemSize parameter from                 
                             QspiDefault.ini file or the QSPI configuration ini         
                             file that is given with the --qspiini option.              
                             The first address of the region is considered as           
                             address 0 of the external memory device. If the            
                             target address is flash (either internal or in the         
                             external memory device) and not erased, the                
                             operation will fail. This command can be combined          
                             with the --verify operation.                               
                                                                                        
     --ramwr &amp;lt;addr&amp;gt; --val &amp;lt;val&amp;gt;                     Writes to memory without            
                             the help of the NVM Controller to the provided             
                             address. If the target address is in non-volatile          
                             memory, --ramwr will have no effect unless the             
                             non-volatile memory controller (NVMC) has been             
                             previously configured by the user for a write              
                             operation. Can be combined with the --verify               
                             operation.                                                 
                                                                                        
     --verify [&amp;lt;hex_file&amp;gt;] [--fast]                 The provided hex_file               
                             contents are compared with the contents in the             
                             device code flash, RAM, UICR and XIP regions for           
                             devices equipped with a QSPI peripheral connected          
                             to an external memory device, and fail if there is         
                             a mismatch. To determine if an external memory             
                             device is present, nrfjprog checks MemSize                 
                             parameter from QspiDefault.ini file or from the            
                             QSPI configuration ini file given with the                 
                             --qspiini option. If the optional --fast parameter         
                             is given, nrfjprog will calculate a hash of the            
                             flash target area using a sha256 algorithm and             
                             compare it to the expected hash instead of                 
                             reading back the actual contents of the device&amp;#39;s           
                             flash in order to speed the operation. It can be           
                             combined with the --program, --memwr and --ramwr           
                             operations if provided without the hex_file                
                             parameter.                                                 
                             Limitations:                                               
                             For nRF51 devices, the --fast verifying option             
                             is not available                                           
                             For nRF91 devices, the --fast verifying option             
                             is not available.                                          
                                                                                        
     --memrd &amp;lt;addr&amp;gt; [--w &amp;lt;width&amp;gt;] [--n &amp;lt;n&amp;gt;]         Reads n bytes from the              
                             provided address. If width is not given, 32-bit            
                             words will be read if addr is word aligned,                
                             16-bit words if addr is half word aligned, and             
                             8-bit words otherwise. If n is not given, one              
                             word of size width will be read. The address and           
                             n must be aligned to the width parameter. The              
                             maximum number of bytes that can be read is 1 MB.          
                             The width must be 8, 16 or 32. If your device is           
                             equipped with a QSPI peripheral, and the addresses         
                             to read belong to the XIP region, the QSPI                 
                             peripheral is used to read from the external               
                             memory device if present. To determine if an               
                             external memory device is present, mrfjprog checks         
                             the MemSize parameter from QspiDefault.ini file or         
                             the QSPI configuration ini file that is given with         
                             the --qspiini option. The first address of the             
                             region is considered as address 0 of the external          
                             memory device.                                             
                             Limitations:                                               
                             A single --memrd instruction cannot be used to             
                             read addresses from both the external memory               
                             device and the nRF device.                                 
                                                                                        
     --halt                  Halts the CPU core.                                        
                                                                                        
     --run [--pc &amp;lt;pc_addr&amp;gt; --sp &amp;lt;sp_addr&amp;gt;]          Starts the CPU. If --pc and         
                             --sp options are given, the pc_addr and sp_addr            
                             are used as initial PC and stack pointer. For              
                             pc_addr to be valid its last bit must be one. For          
                             sp_addr to be valid it must be word aligned.               
                                                                                        
     --readuicr &amp;lt;file&amp;gt;       Reads the device UICR and stores it in the given           
                             file name. Can be combined with --readram,                 
                             --readcode and --readqspi. If combined, only one           
                             instruction can provide a file name.                       
                                                                                        
     --readcode &amp;lt;file&amp;gt;       Reads the device flash and stores it in the given          
                             file name. Can be combined with --readuicr,                
                             --readram and --readqspi. If combined, only one            
                             instruction can provide a file name.                       
                                                                                        
     --readram &amp;lt;file&amp;gt;        Reads the device ram and stores it in the given            
                             file name. Can be combined with --readuicr,                
                             --readcode and --readqspi. If combined, only one           
                             instruction can provide a file name.                       
                                                                                        
     --readqspi &amp;lt;file&amp;gt;       Reads the QSPI-connected external memory and               
                             stores it in the given file name. Can be combined          
                             with --readuicr, --readcode and --readram. If              
                             combined, only one instruction can provide a file          
                             name.                                                      
                                                                                        
     --readregs              Reads the cpu registers.                                   
                                                                                        
     --coprocessor &amp;lt;coprocessor&amp;gt;                    Connects the device to the          
                             selected coprocessor. Valid arguments are                  
                             CP_APPLICATION and CP_MODEM. If --coprocessor              
                             option is not used, CP_APPLICATION will be the             
                             target of the other operation. Must be combined            
                             with another command.                                      
                             Limitations:                                               
                             For NRF51 devices, the -- coprocessor operation is         
                             not available.                                             
                             For NRF52 devices, the -- coprocessor operation is         
                             not available.                                             
                                                                                        &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This is the option you want:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/587x77/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-85d18f40c7574c57a4c278bab9241fc4/pastedimage1571037621405v2.png" /&gt;&lt;/p&gt;
&lt;p&gt;The serial number is either found on the chip:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/495x660/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-85d18f40c7574c57a4c278bab9241fc4/serial_5F00_id.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;(682266227 in the case of the picture)&lt;/p&gt;
&lt;p&gt;Or you can find it in console by running this command:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/491x154/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-85d18f40c7574c57a4c278bab9241fc4/pastedimage1571037992288v5.png" /&gt;&lt;/p&gt;
&lt;p&gt;So the correct command should be something like this:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;nrfjprog -f nrf52 --program $(OUTPUT_DIRECTORY)/nrf52832_xxaa.hex --sectorerase -s 682266227&lt;/em&gt; &lt;/p&gt;
&lt;p&gt;In my other reply, which was wrong, I was thinking about nrfutils DFU procedure. I&amp;#39;ve removed that comment so that people will only see this reply.&lt;/p&gt;
&lt;p&gt;Hope this helps you.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Two nRF devkits connected to one computer (PCA10028 &amp; PCA10040). How can I select which one is programmed with Make?</title><link>https://devzone.nordicsemi.com/thread/214650?ContentTypeID=1</link><pubDate>Fri, 11 Oct 2019 18:43:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa86b75b-59bf-4069-958d-c2b7e507b066</guid><dc:creator>mbards</dc:creator><description>&lt;p&gt;Tried /dev/ttyACM0, \dev\ttyACM0, ttyAMC0, &amp;quot;\dev\ttyACM0&amp;quot;. Nothing so far&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Two nRF devkits connected to one computer (PCA10028 &amp; PCA10040). How can I select which one is programmed with Make?</title><link>https://devzone.nordicsemi.com/thread/214505?ContentTypeID=1</link><pubDate>Fri, 11 Oct 2019 07:05:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:306189e6-afb0-4831-9a73-e2059002615d</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Edited because the answer was wrong&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>