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

nRF52 2832 debug log via UART to PuTTY

Hello,

I'm using nRF52 2832 with SDK 12.3.0 and I want to know if there is a simple way to log via UART to PuTTY for debug.

Thanks for your answers.

Parents
  • Hello,

    Most of the SDK examples include the logger module that lets you print debug messages over UART or RTT. Just make sure that UART is selected in your sdk_config file:

  • UART is enabled in my sdk_config file, my configuration is the following:

    My main is the following:

    I opened a PuTTY serial connexion with 230400 baudrate, no HFWC, no parity, 8 data bits and 1 stop bit.

    But I can't print anything on PuTTY. Am I missing something ?

  • Hi,

    As you can see in the configuration (sdk_config.h) I shared in my precedent post, I haven't activated deffered logging:

    Also in my config I have configured the baudrate to 230400:

    I still can't print log in PuTTY.

  • I overlooked your config settings for some reason. See now that you are using a different pinout so I guess you are not using the nRF52 DK as I thought. What are you using to connect the UART interface to the PC? 

  • Yes you're right I have a little PCB with nRF52 on it.

    I'm using a serial USB cable, I took care to cross RX and TX of the cable with TX and RX pins. I use pin 12 as TX and pin 5 as RX.

  • Your code works on the DK, just tried to be sure. Are you sure RX/TX needs to be crossed for this particular serial USB cable,  pin naming on serial bridges are not always consistent in my experience. Suggest to check if there any data is being transmitted on the TX pin to confirm whether the 52 is transmitting the data or not (if you have a scope/logic analyzer). You could also try a different baudrate, 38400 for instance, which is supported by most converters. 

  • Also make sure you have a common ground wired, and your cable support the right signal levels.

Reply Children
No Data