This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Cannot program custom board

[2020-Dec-03 16:46:48] [ info] --------------------------------------------------------------------------------
[2020-Dec-03 16:46:48] [ info] nrfjprog --recover -f NRF52 --log 
[2020-Dec-03 16:46:48] [ info] nrfjprog version 10.10.0 
[2020-Dec-03 16:46:48] [ info] --------------------------------------------------------------------------------
[2020-Dec-03 16:46:48] [debug] [ nRF0x0] - open_dll
[2020-Dec-03 16:46:48] [debug] [ nRF0x0] - Load library at C:\Program Files (x86)\Nordic Semiconductor\nrf-command-line-tools\bin\JLINKARM_NRF52_NRFJPROG.dll.
[2020-Dec-03 16:46:48] [debug] [ nRF0x0] - Library loaded, loading member functions.
[2020-Dec-03 16:46:48] [debug] [ nRF0x0] - Member functions succesfully loaded.
[2020-Dec-03 16:46:48] [debug] [Backend] - Logger callback at 0x481d80 registered in Segger backend logger.
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] Logger callback at 0x481d80 registered in JLink logger.
[2020-Dec-03 16:46:48] [debug] [nRF520x0] - open
[2020-Dec-03 16:46:48] [debug] [Backend] - open_dll
[2020-Dec-03 16:46:48] [debug] [Backend] - No J-Link DLL path was provided. Attempting to auto detect.
[2020-Dec-03 16:46:48] [debug] [Backend] - Load library at C:\Program Files (x86)\SEGGER\JLink\JLinkARM.dll.
[2020-Dec-03 16:46:48] [debug] [Backend] - Library loaded, loading member functions.
[2020-Dec-03 16:46:48] [debug] [Backend] - Member functions succesfully loaded.
[2020-Dec-03 16:46:48] [debug] [Backend] - dll_version
[2020-Dec-03 16:46:48] [debug] [Backend] - Segger dll version 6.88.b loaded.
[2020-Dec-03 16:46:48] [debug] [ nRF0x0] - enum_emu_snr
[2020-Dec-03 16:46:48] [debug] [nRF520x0] - enum_emu_snr
[2020-Dec-03 16:46:48] [debug] [Backend] - is_connected_to_emu
[2020-Dec-03 16:46:48] [debug] [Backend] - enum_emu_snr
[2020-Dec-03 16:46:48] [debug] [Backend] - ---just_enum_emu_snr
[2020-Dec-03 16:46:48] [debug] [Backend] - ---just_get_num_emus
[2020-Dec-03 16:46:48] [debug] [Backend] - is_connected_to_emu
[2020-Dec-03 16:46:48] [debug] [ nRF0x0] - connect_to_emu_with_snr
[2020-Dec-03 16:46:48] [debug] [nRF520x0] - connect_to_emu_with_snr
[2020-Dec-03 16:46:48] [debug] [Backend] - is_connected_to_emu
[2020-Dec-03 16:46:48] [debug] [Backend] - connect_to_emu_with_snr
[2020-Dec-03 16:46:48] [debug] [Backend] - is_connected_to_emu
[2020-Dec-03 16:46:48] [debug] [Backend] - ---just_enum_emu_snr
[2020-Dec-03 16:46:48] [debug] [Backend] - ---just_get_num_emus
[2020-Dec-03 16:46:48] [debug] [Backend] - ---just_connect_to_emu_with_snr
[2020-Dec-03 16:46:48] [debug] [Backend] - ---just_connect_to_emu_without_snr
[2020-Dec-03 16:46:48] [debug] [Backend] - Segger logging enabled.
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 17 2020 14:43:00
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] Hardware: V1.00
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] S/N: 683697343
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] OEM: SEGGER
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] TELNET listener socket opened on port 19021
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] WEBSRV Starting webserver
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] WEBSRV Webserver running on local port 19080
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] - 6.602ms returns "O.K."  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_Lock()  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_GetHWStatus(...)  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.318ms returns 0  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_ExecCommand("SetRestartOnClose = 0", ...).   
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.006ms returns 0x01  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_ExecCommand("DisableFlashDL", ...).   
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.005ms returns 0x00  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...).   
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.005ms returns 0x00  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_SetHookUnsecureDialog  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_SetHookUnsecureDialog(...)
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.019ms returns 0  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_TIF_Select(JLINKARM_TIF_SWD)  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] - 1.057ms returns 0x00  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_SetSpeed(2000)  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.189ms  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_GetSN()  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.008ms returns 683697343  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2020-Dec-03 16:46:48] [debug] [Backend] - ---just_load_core_data
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_ExecCommand("CORESIGHT_SetIndexAHBAPToUse = 0", ...).   
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.004ms returns 0x00  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_ExecCommand("device = nRF52", ...).   
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] XML file found at: C:\Program Files (x86)\SEGGER\JLink\JLinkDevices.xml 
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] C:\Program Files (x86)\SEGGER\JLink\JLinkDevices.xml evaluated successfully. 
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] Device "NRF52" selected.
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] - 33.482ms returns 0x00  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2020-Dec-03 16:46:48] [debug] [Backend] - read_debug_port_idr
[2020-Dec-03 16:46:48] [debug] [Backend] - read_debug_port_register
[2020-Dec-03 16:46:48] [debug] [Backend] - ---just_read_debug_port_register
[2020-Dec-03 16:46:48] [debug] [Backend] - coresight_configure
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_CORESIGHT_Configure()  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] - 101.445ms returns 0  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_CORESIGHT_ReadAPDPReg(DP reg 0x00)  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] failed
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.999ms returns -1  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2020-Dec-03 16:46:48] [debug] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2020-Dec-03 16:46:48] [debug] [Backend] - ---just_abort_debug_action
[2020-Dec-03 16:46:48] [debug] [Backend] - Attempting to clear any configuration errors in debug port before closing connection. 
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.954ms returns -1  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2020-Dec-03 16:46:48] [debug] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.030ms  
[2020-Dec-03 16:46:48] [debug] [ nRF0x0] - close_dll
[2020-Dec-03 16:46:48] [debug] [nRF520x0] - close
[2020-Dec-03 16:46:48] [debug] [Backend] - is_connected_to_emu
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_IsOpen()  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.012ms returns 0x01  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_Lock()  
[2020-Dec-03 16:46:48] [debug] [Backend] - close
[2020-Dec-03 16:46:48] [debug] [Backend] - disconnect_from_emu
[2020-Dec-03 16:46:48] [debug] [Backend] - ---just_disconnect_from_emu
[2020-Dec-03 16:46:48] [debug] [Backend] - is_connected_to_device
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_IsConnected()  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.013ms returns FALSE  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2020-Dec-03 16:46:48] [debug] [Backend] - ---just_is_debug_region_powered
[2020-Dec-03 16:46:48] [debug] [Backend] - ---just_read_debug_port_register
[2020-Dec-03 16:46:48] [debug] [Backend] - ---just_write_debug_port_register
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.934ms returns -1  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2020-Dec-03 16:46:48] [debug] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2020-Dec-03 16:46:48] [debug] [Backend] - ---just_abort_debug_action
[2020-Dec-03 16:46:48] [debug] [Backend] - Attempting to clear any configuration errors in debug port before closing connection. 
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.942ms returns -1  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2020-Dec-03 16:46:48] [debug] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.021ms  
[2020-Dec-03 16:46:48] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_Close()  
[2020-Dec-03 16:46:48] [debug] [Backend] - Segger Backend closed.
[2020-Dec-03 16:46:48] [debug] [nRF520x0] - nRF family DLL closed

I have designed a custom board with the nRF52840 following the examples from the dev kit, dongle, and datasheet (circuit config 5).  The board is similar to the dongle but also has an option to run from a coin cell. However, I am unable to program the board in any configuration.  This is my first time diving into Nordic chips, so I am not entirely sure where to investigate next.

I am using the nRF52840-DK to program the new board. When the device is plugged into 5V, VDD_nRF is measured at 3V.  (this is expected - I have an LDO which dros down to 3.3V, then a schottky diode).

When I try to program in Segger Embedded Studio (Release 5.10b), I get the error "Failed to connect to target. No idcode detected. Please check connection and Target Interface Type."

When I try this command: nrfjprog --recover -f NRF52 --log

I get the following error (log.log file attached):
ERROR: JLinkARM DLL reported an error. Try again. If error condition
ERROR: persists, run the same command again with argument --log, contact Nordic
ERROR: Semiconductor and provide the generated log.log file to them.

When connecting to USB, the device does mount as a USB serial port.  If I use the nRF Connect programmer, it is able to identify the device serial number and the chip type:

However, when I try to program a hex file, it asks me to select  the SoftDevice required by the application firmware.  If I select any option, it reports a DFU targer error "The array of supported SoftDevices for the update does not contain the FWID of the current SoftDevice".  (this is despite the fact that I am trying to write a blinky firmware image.

The above error may be due to the source of my nRF52840 IC.  Due to a shortage of parts at many distributors in the US (won't be able to get any new chips until January), my source of the nRF52840 IC is removing one from an nRF52840 dongle, cleaning off all the solder, applying new paste, and hot air solder to my new board.  I have re-worked the IC several times to verify that it is fully connected - I believe since it is able to mount over USB that it is properly soldered.

I have attached the key portions of my schematic, and I'm not really sure what to try next!  Am I missing something silly?

Thanks,

Daniel

Parents
  • The circuit looks fine; I compared it with one of mine and the only difference I see is that I backdrive VDDH from VDD with a schottky but only because I have an option to power via higher voltage on VDDH; if that is not required direct connect is fine.

    If using P19 on the DK to program, note pin 1 is not a 3.3 v supply to your board, if I recall correctly, it is a voltage sense. A separate 3.3 volt supply is required from the DK, typically jumper DK VDD to DK J19 pin 1 or solder a bridge on SB47 near J19. P20 can also be used but P19 with separate VDD link is probably preferred.

    For your next board spin I would recommend replacing the two series schottky diodes with MAX40200 to avoid squandering significant battery capacity over the product lifetime - see MAX40200

  • Thanks for your reply.

    I'm not using DK to supply power to the board - it is either powered by USB or coin cell when attempting to program.

    And also thanks for the part recommendation on the MAX40200!

  • Ah, so much for a quick fix. Maybe Nordic will spot something; I'm assuming you can program another nRF52 device from your DK, by the way ..

    As an aside, I leave USB pin 4 - Id - disconnected. Does it matter? Maybe not ..

Reply Children
No Data
Related