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

Debugging nrf52 with printf

Hello,

I am new to working with nrf52 and was looking for a way to make printf work in a blank project that I have created. I followed the uart example for the peripheral and my main function currently looks like:

int main(void) {

	uint32_t err_code;
const app_uart_comm_params_t comm_params =
  {
      RX_PIN_NUMBER,
      TX_PIN_NUMBER,
      RTS_PIN_NUMBER,
      CTS_PIN_NUMBER,
      APP_UART_FLOW_CONTROL_ENABLED,
      false,
      UART_BAUDRATE_BAUDRATE_Baud38400
  };
	
	
		
APP_UART_FIFO_INIT(&comm_params,
                     UART_RX_BUF_SIZE,
                     UART_TX_BUF_SIZE,
                     uart_error_handle,
                     APP_IRQ_PRIORITY_LOW,
                     err_code);

APP_ERROR_CHECK(err_code);
		
	printf("Hello World\n");
	while(1){}
	}		

Now, I imported all the necessary .c and .h files from the uart example and my project does compile. But when I flash it onto the nrf52 board and use Putty to check for "Hello World" I do not get any reading. What am I doing wrong?

Thank you very much

Related