No serial print in PuTTY or nRF Terminal

Hi,

I attend the introduction course for the nRF's, and I am at Lession 3. The task is to print 'Hello World' to the device, using Serial Port and COMx. I have made the files I need, and I use the 'printk'-function in the main.c. I have tried to print both in PuTTY and in nRF Terminal without seeing it work out. The PuTTY-window is totally blank after I have build and flashed. The nRF Terminal only gives a line with 'Connected via Serial Port with settings COM7 115200 8n1 rtscts:off'. 

I have checked that COM7 is the right port, and I use 115200 for baud rate. 

Do you know a solution?

Mvh Asbjørn

  • Hi,

    We have been running a couple of courses at your university lately, but I assume you are talking about the online nRF Connect SDK Fundamentals course on DevAcademy as lesson 3, exercise 1 of that course seems to fit your description.

    The nRF5340 DK has two cores; one application core and one network core. Therefore it has two build targets, and two virtual COM ports.

    Typically, you will build an application for the application core. For that you create a build configuration for the board "nrf5340dk_nrf5340_cpuapp". The app core is typically on VCOM1, not on VCOM0, so the VCOM1 COM-port is the one you should connect to. If the board is correctly connected to the PC, you should see both VCOM0 and VCOM1 listed under "connected devices" in the "nRF Connect" side bar tab of VS Code. Use the power plug icon to connect to the board (you will need to select serial parameters such as baud, hwfc, etc.) Alternatively, connect with Putty.

    If you are still unable to connect then let me know and we can look further into the issue.

    Regards,
    Terje

  • Okay, thanks - it makes sense!

    I am still not able to get an output. The terminal print "Disconnected", even though I have connected my device properly. And the VCOMs are sometimes there, and sometimes not (how can I find them when they do not appear?).  

    And: what is Serial Port Connection "8n1" and "rtscts:off"?

  • Hi,

    The terminology "8n1" denotes the most common UART configuration of 8 data bits, no parity, and 1 stop bit.

    "rtscts:off" refers to no hardware flow control. Hardware flow control uses two wires for signalling RTS (ready to send) and CTS (clear to send).

    Those settings should be correct for the default setup in nRF Connect SDK samples.

    Regarding the issue, do you have multiple VS Code windows open at the same time, or program using other tools (such as nrfjprog from nRF Command Line Tools) or otherwise connect to the interface MCU on the DK?

    Sometimes Windows might interfere with the DK, because Windows mistakes it for a USB mass storage device (MSD). This can be disabled through use of J-Link Commander, which is part of J-Link Software and Documentation Pack from Segger. Connect to the board in J-Link Commander and use the command MSDDisable, for disabling MSD so that Windows will not interfere.

    Regards,
    Terje

  • I am getting the same error as Asbjorn. Here's what I have:

    • I am using a Mac + nrf5340. 
    • Testing with Blinky app and have selected nrf5340dk_nrf5340_cpuapp in the build config file
    • Connected to VCOM1 port with 115200 8n1 rtscts:off config
    • LED on the board is flashing which means the flashing process is working
    • I don't see the logs however..

    Please let me know if I am missing something. I can try putty next to see if that helps. 

  • Hi,

    Did you figure it out?

    If not, here is a list of things to try:

    • Check the other VCOM port.
    • Check with Putty, Termite, or any other terminal. For figuring out the COM to use, you can use the nrfjprog command line utility (part of nRF Command Line Tools) with the --com option.
    • Do the MSDDisable, as explained in a previous post in this thread.
    • Install the latest J-Link Software and Documentation Pack from SEGGER, as well as update the interface MCU firmware on the DK with the newest SEGGER firmware (for instance using J-Link Configurator, which is part of the J-Link Software and Documentation Pack.)
    • If all else fails, what is the DK version?

    Regards,
    Terje

Related