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

Some questions about UART

Hi,

I have some questions about UART: 

Currently I am developing software on our PCB with nRF51822 chip. When I was implementing and testing software on the Development board, I used UART to print debug messages on the terminal. But when I test on our PCB, I can't print anything on terminal anymore. My colleague said that it is because we are lack of something on our PCB that makes printing on the PCB impossible. So I would like to know if it is the reason that we cannot print for debugging. 

Also, when we are testing our PCB, we connect it to a battery to supply power, but the power is drained very quickly in 3 hours, and we want to make it longer. Right now we assume that the draining speed of the battery is related to the running current on different modules. We found out TWI is running with 380 micro Amps and UART is running with 220 micro Amps. So we may want to disable UART, but 1) I am not sure if there is really no UART on our device. If there is not, how can I successfully initialize UART in my code (meaning, when I called APP_UART_FIFO_INIT, the err_code returns NRF_SUCCESS); 2) if there is no UART in our device, what are other factors that causes the power drained so quickly; 3) if there is UART in our device, how can I disable it to make the battery drained slower? 

Thank you!

Parents
  • Hi

    The reason you're not able to see the UART output from the virtual COM port is that the UART pins on the onboard nRF51 are connected to the debugger internally (see the nRF51DK user guide for more info). There is a UART peripheral on your chip, but you'll have to connect the UART pins to the DK as well in order to use the virtual COM port. In any case, you should be able to see the RTT logging information from the debugger directly using the J-Link RTT Viewer to see the debug information more easily.

    In order to increase the battery life on your device, please check out our current consumption guide, which features just about any way to reduce your current consumption.

    Best regards,

    Simon

Reply
  • Hi

    The reason you're not able to see the UART output from the virtual COM port is that the UART pins on the onboard nRF51 are connected to the debugger internally (see the nRF51DK user guide for more info). There is a UART peripheral on your chip, but you'll have to connect the UART pins to the DK as well in order to use the virtual COM port. In any case, you should be able to see the RTT logging information from the debugger directly using the J-Link RTT Viewer to see the debug information more easily.

    In order to increase the battery life on your device, please check out our current consumption guide, which features just about any way to reduce your current consumption.

    Best regards,

    Simon

Children
No Data
Related