nRF5340DK VCOM only works with putty

Hey guys,

an issue I was postponing but need to solve for an upcoming management demonstration: I can only connect to the nRF5340DK VCOM with putty.

Using Hterm or the Matlab serial port functionality, which is what I need for the demo, will shut down the Jlink cpu. LED5 will turn off, and the Jlink CDC UART port disappears from the device manager.

I tried DTR/RTS pins on and off, to no avail. This solved the problem here nRF52 DK - USB CDC ACM Example not working with HTerm/Qt - Nordic Q&A - Nordic DevZone - Nordic DevZone (nordicsemi.com) e.g., which is similar I guess.

The Jlink cpu seems to reset upon Hterm or Matlab serial connecting. The nRF5340 is still up and going, as indicated by LEDs signaling new received packets.

Any idea?

Thank you,

Uli

  • ubat said:
    Fortunately hub4com in combination with com0com is also working now, and I can forward the data to a virtual port. The virtual port and Matalb are working :)

    Happy to hear you found a work-around.

    ubat said:
    The IF CPU will go into a mode where it also cannot be flashed

    Can you please please elaborate? Does the device show when you issue nrfjprog --ids ?

  • Thank you - I will gladly go forward and try to solve this!

    Usually flashing will be like this:

    west flash -d d:\xyz\build --skip-rebuild -r nrfjprog --dev-id 1050083097
    
    -- west flash: using runner nrfjprog
    
    -- runners.nrfjprog: Flashing file: d:\xyz\build\zephyr\zephyr.hex
    
    Parsing image file.
    
    Verifying programming.
    
    Verified OK.
    
    Applying pin reset.
    
    -- runners.nrfjprog: Board with serial number 1050083097 flashed successfully.

    In the failure mode, the board is still listed in Visual Studio and I can klick on Program, then the following happens:

    	Flashing build to undefined
    	west flash -d d:\xyz\build --skip-rebuild -r nrfjprog --dev-id 1050083097
    	
    	-- west flash: using runner nrfjprog
    	-- runners.nrfjprog: Flashing file: d:\xyz\build\zephyr\zephyr.hex
    	ERROR: Unable to connect to a debugger.
    	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.
    	NOTE: For additional output, try running again with logging enabled (--log).
    	NOTE: Any generated log error messages will be displayed.
    	FATAL ERROR: command exited with status 33: nrfjprog --program 'd:\xyz\build\zephyr\zephyr.hex' --sectorerase --verify -f NRF53 --snr 1050083097 --coprocessor CP_NETWORK
    	
    	 *  The terminal process terminated with exit code: 33. 
     *  Terminal will be reused by tasks, press any key to close it. 

    And while I would love to run with --log and provide the log.log, I'm sorry but I was unable to modify this command, or to call it manually from the command line - 'west' is not in the path, and the 'west.exe' I could find is not suitable.

  • ubat said:
    And while I would love to run with --log and provide the log.log, I'm sorry but I was unable to modify this command, or to call it manually from the command line - 'west' is not in the path, and the 'west.exe' I could find is not suitable.

    How do you build this project?

    ubat said:
    FATAL ERROR: command exited with status 33: nrfjprog --program 'd:\xyz\build\zephyr\zephyr.hex' --sectorerase --verify -f NRF53 --snr 1050083097 --coprocessor CP_NETWORK

    This error is a generic Segger error, that can mean many different things depending on context. We will need to see the logs. 

    You should be able to call nrfjprog -r -f NRF53 --log from the command prompt of your windows computer.

    Kind regards,
    Øyvind

  • Good morning!

    Sorry to reply like this, but there is no reply button on your last answer. It's missing on like 50% of messages.

    How do you build this project?

    I'm using Visual Studio Code and am always using the basic PRX example configuration. So ... clicking on "Build" and "Flash".

    You should be able to call nrfjprog -r -f NRF53 --log from the command prompt of your windows computer.

    Yep, that worked.

    Following a log.log of first an erroneous call, and then a succesful one.

     4130.log.log

    Thank you!

    ...edit: and now the "Reply" button appeared.

  • Thank you for providing the log output. I will need some more time to look into issue.

    What version of Windows are you working on? Can you please try updating nrfjprog to v10.16.0? 

Related