Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Problem uart communication with microcontroller nRF 51 DK

Hello,

if I send a byte over uart to an device (e.g. gps -logger), the same byte will printed to the terminal (e.g. Putty or Termite).

If I get a byte from the micro-controller, so it will printed to the terminal and to the micro-controller.

It is possible to send the data from the micro-controller only to the Terminal, without printing back to the micro-cotroller?

I want send data to the micro-controller and see the answer from the device in Termite, but only the answer should be printed to the Terminal.

I used the nRF 51 DK with SDK 12.3 UART example, Without FLOW Control.

  • Hi,

    It sounds like you need two UARTs. One for your MCU and the other for your terminal. You cannot hook both the MCU and the terminal to the same UART and expect the terminal to print only the answers.

    Unfortunately the nRF51 only has one UART, but luckily it is possible to reconfigure it at run-time. So you can:

    1. Connect your MCU to a sepparate set of GPIO pins.
    2. Configure the UART to use these pins when transferring data to the MCU.
    3. Send your commands to your MCU and get the response back.
    4. Reconfigure the UART pins to connect the terminal.
    5. Send your data to the terminal.
    6. Repeat....

    The nRF52 has two UART instances, so if you are willing to move from nRF51 you don't need to change the UART configuration back and forth all the time. 

Related