Can you please provide any information how to implement printf debug output for nrf51 DK (PCA10028) using SDK 8.0.1 and Keil?
Can you please provide any information how to implement printf debug output for nrf51 DK (PCA10028) using SDK 8.0.1 and Keil?
In nrf51 DK user guide section 4.2 Virtual COM port, there is a note: The terminal used must send a DTR signal in order to configure the UART Interface MCU pins. This might be my problem, but I don't have a clue what it means to send a DTR signal.
I get it. I added app_uart module from Keil packages to my project, then used
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,
256,
256,
uart_error_handle,
APP_IRQ_PRIORITY_LOW,
err_code);
In my terminal I checked DTR checkbox to assert DTR signal and I can now use printf.
For debugging you can use the RTT Viewer. This works perfectly Here is the link for setting RTT Viewer on your project. devzone.nordicsemi.com/.../