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

nrf52832 How-to measure SWDIO / SWDCLK interal pull-up/pull-down?

We faced the issue that some of our NRF52832 Raytac modules (MDBT42Q-512KV2) don't respond over the SWD interface. But all of these modules were working previously and we were able to flash them.

Is there a possibility to check the SWDIO / SWDCLK pins? E.g. measure the pull-up / pull-down resistance to check if there is an ESD problem?

Parents
  • Hi,

    If you by accident have enabled pin reset, make sure to connect pin reset to VDD if it may be somehow pulled low by firmware or externally. You can call 'nrfjprog --recover' afterwards.

    It's possible to measure the pull-up/down resistance by connecting an amperemeter between SWDIO pins (one at a time) and GND/VDD when chip is powered. The internal resistance then follow ohms law (Rinternal = VDD / Imeasured).

    Best regards,
    Kenneth

  • Thanks for your answer.

    We could measure a pull-up on SWDIO of ~14 kOhm (240 uA @ 3.3V) and the same as pull-down for SWDCLK on correctly working modules.

    For faulty modules we measure as well a current between SWDIO and VDD in the low mA range. Could this has happened by ESD issues? For example if a J-Link programmer is connected to a powered system and GND is not the first pin which get's connected during plug in and equipotential bonding happens over SWDIO pin...

    Is it possible to get a rough block circuit diagram for SWDIO/SWDCLK? 

Reply
  • Thanks for your answer.

    We could measure a pull-up on SWDIO of ~14 kOhm (240 uA @ 3.3V) and the same as pull-down for SWDCLK on correctly working modules.

    For faulty modules we measure as well a current between SWDIO and VDD in the low mA range. Could this has happened by ESD issues? For example if a J-Link programmer is connected to a powered system and GND is not the first pin which get's connected during plug in and equipotential bonding happens over SWDIO pin...

    Is it possible to get a rough block circuit diagram for SWDIO/SWDCLK? 

Children
  • Can you try to connect P.21 directly to VDD in case you have by accident enabled pin reset?

    Best regards,
    Kenneth

  • We have a 10k pullup on our boards. Measurements with oscilloscope show that pin is tied low for 50ms during command "nrfjprog -p". But returns with following error:

    --------------------------------------------------------------------------------
    nrfjprog -p --log
    nrfjprog version 9.7.3
    --------------------------------------------------------------------------------
    nRF_open_dll
    . nRFXX_open_dll
    . . nRFXX_dll_version
    nRF_enum_emu_snr
    . nRFXX_enum_emu_snr
    nRF_enum_emu_snr
    . nRFXX_enum_emu_snr
    nRF_connect_to_emu_with_snr
    . nRFXX_connect_to_emu_with_snr
    . . nRFXX_is_connected_to_emu
    . . nRFXX_connect_to_emu_without_snr
    . . . nRFXX_is_connected_to_emu
    . . . nRFXX_enum_emu_snr
    . . nRFXX_connect_to_emu_without_snr:	JLink:	 Firmware: J-Link EDU Mini V1 compiled Mar 15 2019 12:47:02
    . . nRFXX_connect_to_emu_without_snr:	JLink:	 Hardware: V1.00
    . . nRFXX_connect_to_emu_without_snr:	JLink:	 S/N: 801003932
    . . nRFXX_connect_to_emu_without_snr:	JLink:	 Feature(s): GDB, FlashBP
    . . nRFXX_connect_to_emu_without_snr:	JLink:	 TELNET listener socket opened on port 19021
    . . nRFXX_connect_to_emu_without_snr:	JLink:	WEBSRV  Starting webserver
    . . nRFXX_connect_to_emu_without_snr:	JLink:	 (0021ms, 0890ms total)  
    . . nRFXX_connect_to_emu_without_snr:	JLink:	T25B61740 000:869 
    . . nRFXX_connect_to_emu_without_snr:	JLink:	WEBSRV Webserver running on local port 19080
    . . nRFXX_connect_to_emu_without_snr:	JLink:	 (0021ms, 0890ms total)  
    . . nRFXX_connect_to_emu_without_snr:	JLink:	T25B61740 000:869 
    . . nRFXX_connect_to_emu_without_snr:	JLink:	  returns O.K.
    . . nRFXX_connect_to_emu_without_snr:	JLink:	 (0021ms, 0890ms total)  
    . . nRFXX_connect_to_emu_without_snr:	JLink:	T25B61740 000:890 
    . . nRFXX_connect_to_emu_without_snr:	JLink:	JLINK_GetHWStatus(...)
    . . nRFXX_connect_to_emu_without_snr:	JLink:	  returns 0x00
    . . nRFXX_connect_to_emu_without_snr:	JLink:	 (0000ms, 0890ms total)  
    . . nRFXX_connect_to_emu_without_snr:	JLink:	T25B61740 000:890 
    . . nRFXX_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("Device = NRF52832_xxAA", ...). 
    . . nRFXX_connect_to_emu_without_snr:	JLink:	XML file found at: /opt/SEGGER/JLink/JLinkDevices.xml
    . . nRFXX_connect_to_emu_without_snr:	JLink:	 (0000ms, 0890ms total)  
    . . nRFXX_connect_to_emu_without_snr:	JLink:	T25B61740 000:890 
    . . nRFXX_connect_to_emu_without_snr:	JLink:	/opt/SEGGER/JLink/JLinkDevices.xml evaluated successfully.
    . . nRFXX_connect_to_emu_without_snr:	JLink:	Device "NRF52832_XXAA" selected.
    . . nRFXX_connect_to_emu_without_snr:	JLink:	Device "NRF52832_XXAA" selected.
    . . nRFXX_connect_to_emu_without_snr:	JLink:	  returns 0x00
    . . nRFXX_connect_to_emu_without_snr:	JLink:	 (0015ms, 0905ms total)  
    . . nRFXX_connect_to_emu_without_snr:	JLink:	T25B61740 000:905 
    . . nRFXX_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("SetRestartOnClose = 0", ...). 
    . . nRFXX_connect_to_emu_without_snr:	JLink:	  returns 0x01
    . . nRFXX_connect_to_emu_without_snr:	JLink:	 (0000ms, 0905ms total)  
    . . nRFXX_connect_to_emu_without_snr:	JLink:	T25B61740 000:905 
    . . nRFXX_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("DisableFlashDL", ...). 
    . . nRFXX_connect_to_emu_without_snr:	JLink:	  returns 0x00
    . . nRFXX_connect_to_emu_without_snr:	JLink:	 (0000ms, 0905ms total)  
    . . nRFXX_connect_to_emu_without_snr:	JLink:	T25B61740 000:905 
    . . nRFXX_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("SetDbgPowerDownOnClose = 1", ...). 
    . . nRFXX_connect_to_emu_without_snr:	JLink:	  returns 0x01
    . . nRFXX_connect_to_emu_without_snr:	JLink:	 (0000ms, 0905ms total)  
    . . nRFXX_connect_to_emu_without_snr:	JLink:	T25B61740 000:905 
    . . nRFXX_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...). 
    . . nRFXX_connect_to_emu_without_snr:	JLink:	  returns 0x00
    . . nRFXX_connect_to_emu_without_snr:	JLink:	 (0000ms, 0905ms total)  
    . . nRFXX_connect_to_emu_without_snr:	JLink:	T25B61740 000:905 
    . . nRFXX_connect_to_emu_without_snr:	JLink:	JLINK_TIF_Select(JLINKARM_TIF_SWD)
    . . nRFXX_connect_to_emu_without_snr:	JLink:	  returns 0x00
    . . nRFXX_connect_to_emu_without_snr:	JLink:	 (0002ms, 0907ms total)  
    . . nRFXX_connect_to_emu_without_snr:	JLink:	T25B61740 000:907 
    . . nRFXX_connect_to_emu_without_snr:	JLink:	JLINK_SetSpeed(2000)
    . . nRFXX_connect_to_emu_without_snr:	JLink:	 (0001ms, 0908ms total)  
    nRF_read_connected_emu_snr
    . nRFXX_read_connected_emu_snr
    . . nRFXX_is_connected_to_emu
    . . nRFXX_is_connected_to_emu:	JLink:	T25B61740 000:908 
    . . nRFXX_is_connected_to_emu:	JLink:	JLINK_IsOpen()
    . . nRFXX_is_connected_to_emu:	JLink:	  returns 0x01
    . . nRFXX_is_connected_to_emu:	JLink:	 (0000ms, 0908ms total)  
    nRF_read_device_family
    . nRFXX_read_device_family
    . . nRFXX_is_connected_to_emu
    . . nRFXX_is_connected_to_emu:	JLink:	T25B61740 000:908 
    . . nRFXX_is_connected_to_emu:	JLink:	JLINK_IsOpen()
    . . nRFXX_is_connected_to_emu:	JLink:	  returns 0x01
    . . nRFXX_is_connected_to_emu:	JLink:	 (0000ms, 0908ms total)  
    . . nRFXX_read_access_port_register
    . . . nRFXX_coresight_configure
    . . . nRFXX_coresight_configure:	JLink:	T25B61740 000:908 
    . . . nRFXX_coresight_configure:	JLink:	JLINK_CORESIGHT_Configure()
    . . . nRFXX_coresight_configure:	JLink:	  returns 0
    . . . nRFXX_coresight_configure:	JLink:	 (0101ms, 1009ms total)  
    . . . nRFXX_power_debug_and_system_regions
    . . . . nRFXX_write_debug_port_register
    . . . . nRFXX_write_debug_port_register:	JLink:	T25B61740 001:009 
    . . . . nRFXX_write_debug_port_register:	JLink:	JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)
    . . . . nRFXX_write_debug_port_register:	JLink:	  returns -1
    . . . . nRFXX_write_debug_port_register:	JLink:	 (0001ms, 1010ms total)  
    . . . . nRFXX_write_debug_port_register:	JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1.
    
    . . . nRFXX_power_debug_and_system_regions:	JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -102.
    
    nRF_close_dll
    . nRFXX_close_dll
    . . nRFXX_is_connected_to_emu
    . . nRFXX_is_connected_to_emu:	JLink:	T25B61740 001:010 
    . . nRFXX_is_connected_to_emu:	JLink:	JLINK_IsOpen()
    . . nRFXX_is_connected_to_emu:	JLink:	  returns 0x01
    . . nRFXX_is_connected_to_emu:	JLink:	 (0000ms, 1010ms total)  
    . . nRFXX_disconnect_from_emu
    . . nRFXX_disconnect_from_emu:	JLink:	T25B61740 001:013 
    . . nRFXX_disconnect_from_emu:	JLink:	JLINK_Close()
    

  • I am not aware of any specific that can cause this to fail, but things to try:

    1- Try a different SEGGER programmer, and make sure that VDD is within the the range of the programmer

    2. Uninstall the nRF Command lines tools you may have installed, and download the latest. Update the SEGGER firmware if asked

    3. Strap nRF52 reset pin to VDD in case it's been by accident enabled

    4. Try from a different PC

    5. Run the 'nrfjprog --recover' or 'nrfjprog --eraseall'

    6. Check the schematic is correct, and that all components are properly mounted.

    There is a possibility the nRF52 have been damaged somehow by EOS/ESD, but that is very rare I would say.

Related