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

nrf51822 + esp8266 uart/debugging

As far as I understand the nrf51822 has only 1 hardware uart. I want to communicate with the esp8266 over uart using standard AT commands, but still retain debugging possibilities. What are my options here? Is it easy to set up a soft-uart for debugging, or do I need to do something like RTT?

Parents
  • Yes, the nRF51 has only one hardware UART. To retain debugging/logging possibilities I would use RTT.

    RTT has some advantages over UART when it comes to speed, where UART can affect the performance of your code because of overhead, RTT almost does not affect the perfomance. RTT also uses the debug interface so that you don't need extra pins (very neat if you are debugging a custom made PCB where UART interface can be removed for size optimization).

    The logger module in SDK 12 makes it easy to change between logging with UART and logging with RTT.

    To display the data you will have to use RTT viewer (terminal program for logging RTT data) or RTT client (sets up a telnet server) + a terminal that connect to the telnet server (for example putty).

Reply
  • Yes, the nRF51 has only one hardware UART. To retain debugging/logging possibilities I would use RTT.

    RTT has some advantages over UART when it comes to speed, where UART can affect the performance of your code because of overhead, RTT almost does not affect the perfomance. RTT also uses the debug interface so that you don't need extra pins (very neat if you are debugging a custom made PCB where UART interface can be removed for size optimization).

    The logger module in SDK 12 makes it easy to change between logging with UART and logging with RTT.

    To display the data you will have to use RTT viewer (terminal program for logging RTT data) or RTT client (sets up a telnet server) + a terminal that connect to the telnet server (for example putty).

Children
No Data
Related