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

Question) Serial Output (UART)

Hello, I would like to develop a simple program that sends and receives UART communication through 2 boards.


The example used "examples\peripheral\serial\pca10056\blank\sses\serial_pca10056.emProject."

First, we set up the "Hello" and "World" sequence on each of the two boards, and then we ran it on "Tera term," and we found that the characters we set were printed on ourselves.

For example, Assuming the string "Hello" to be sent from board A, the string "World" to be sent from board B,

-------------------------------------------------------------------------------------
"A log" : Hello, World , Hello, World,.... ,
"B log" : World, Hello, World, ... 

-------------------------------------------------------------------------------------

such as Both the text to be sent and the incoming character are output.

I analyzed it, and it seems to be output to log by sending another board using 'nrf_serial_write'.

So I would appreciate it if you could give me an answer to my question.

1. Can you tell me why it's printed at the same time?

2. Is there a way to print only the Received value on the Tera term-Log?


3. Is there a way to write and send cammand in 'Tera term' or 'putty' instead of in debugging mode like cli-agent in zigbee?

Parents
  • Hi,

    I'm not very familiar with Tera term, but you can try turning off the "local echo" feature if that is enabled.

    Is there a way to write and send cammand in 'Tera term' or 'putty' instead of in debugging mode like cli-agent in zigbee?

    Not sure what you mean by this. Do you want a CLI?

    Best regards,
    Jørgen 

  • LeeJooSang said:
    Currently, using NRF_LOG_INFO() and printf() at pca10056(nrf 52840) does not output from 'Tera term' or 'putty', so it is not possible to verify that the log is taken properly except for Debug mode.

    Sounds like only the RTT backend is enabled for the logger module, and not the UART backend. Have a look at the sdk_config.h options for how to enable UART backend. 

    LeeJooSang said:

    I want log only to be printed from pca10056 but it is also delivered to the connected board, and the connected board contains the wrong command, and errors continue to occur.

    Currently, pca10056(nrf 52840) is connected by PC and USB, and other boards are connected by 6pin(TX) and 8pin(RX). Are UART and 6,8pin UART of PCtoUSB the same?

    By default, the UART logger backend uses GPIO P0.06 for the UART TX pin. This is connected through the Interface MCU on the DK, which handles the virtual USB COM port. I would recommend that you connect the external board through other pins. You should also make sure that you use UARTE1 instance for the nrf_serial library if you want to continue using UART(E)0 for the logger.

    Finally, note that the nrf_serial library is removed in nRF5 SDK v17.0.0 and above, instead we recommend using the libUARTE library. If you plan to migrate to later SDKs eventually, you should reconsider using nrf_serial.

Reply
  • LeeJooSang said:
    Currently, using NRF_LOG_INFO() and printf() at pca10056(nrf 52840) does not output from 'Tera term' or 'putty', so it is not possible to verify that the log is taken properly except for Debug mode.

    Sounds like only the RTT backend is enabled for the logger module, and not the UART backend. Have a look at the sdk_config.h options for how to enable UART backend. 

    LeeJooSang said:

    I want log only to be printed from pca10056 but it is also delivered to the connected board, and the connected board contains the wrong command, and errors continue to occur.

    Currently, pca10056(nrf 52840) is connected by PC and USB, and other boards are connected by 6pin(TX) and 8pin(RX). Are UART and 6,8pin UART of PCtoUSB the same?

    By default, the UART logger backend uses GPIO P0.06 for the UART TX pin. This is connected through the Interface MCU on the DK, which handles the virtual USB COM port. I would recommend that you connect the external board through other pins. You should also make sure that you use UARTE1 instance for the nrf_serial library if you want to continue using UART(E)0 for the logger.

    Finally, note that the nrf_serial library is removed in nRF5 SDK v17.0.0 and above, instead we recommend using the libUARTE library. If you plan to migrate to later SDKs eventually, you should reconsider using nrf_serial.

Children
No Data
Related