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

Trying to get nrf51822 on Rigado BMD-200 to print to hyperterminal via uart

Hello,

I'm trying to do some simple printfs to hyerperterminal as a way to debug my code. I have used the uart example init code but nothing prints:

void init_uart(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_DISABLED, //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 !!");
}

I have Windows Hyperterminal set to 34800 one stop bit, 8 data bits, no parity. If tried with H/W flow on and off with no luck. I am using COM7 which is the USB port that the JTag is connected to. Any advice on how to get this going?

I have tried PrintF and uart_putstring((const uint8_t *)START_STRING);

with no luck so far.

Parents
  • using S110 softdevice will not block UART forever. Why did you disable flow control?

    APP_UART_FLOW_CONTROL_DISABLED, //APP_UART_FLOW_CONTROL_ENABLED,
    

    Segger COM port emulation needs flow control to be enabled. Disabling flow control is for external device/sensors that are connected directly to nRF51 UART pins and if those devices does not have flow control. Enable flow control and follow intructions mentioned by Hoan Hoang about retarget.c. Printf should function normally then.

Reply
  • using S110 softdevice will not block UART forever. Why did you disable flow control?

    APP_UART_FLOW_CONTROL_DISABLED, //APP_UART_FLOW_CONTROL_ENABLED,
    

    Segger COM port emulation needs flow control to be enabled. Disabling flow control is for external device/sensors that are connected directly to nRF51 UART pins and if those devices does not have flow control. Enable flow control and follow intructions mentioned by Hoan Hoang about retarget.c. Printf should function normally then.

Children
No Data
Related