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

nrf52 baudrate 9600

Hi, all

(nrf52832  pca10040 s132..)

I'm trying to send / receive data with custom data using gpio ..

My custom device's baudrate is 9600 so I initialize uart like this..

static void uart_init(void)
{
    uint32_t                     err_code;
    app_uart_comm_params_t const comm_params =
    {
        .rx_pin_no    = RX_PIN_NUMBER,
        .tx_pin_no    = TX_PIN_NUMBER,
        .rts_pin_no   = RTS_PIN_NUMBER,
        .cts_pin_no   = CTS_PIN_NUMBER,
        .flow_control = APP_UART_FLOW_CONTROL_DISABLED,
        .use_parity   = false,
        .baud_rate    = NRF_UART_BAUDRATE_9600
    };
//    nrf_gpio_cfg_input(RX_PIN_NUMBER, NRF_GPIO_PIN_NOPULL);
//    nrf_gpio_cfg_output(TX_PIN_NUMBER);

    APP_UART_FIFO_INIT(&comm_params,
                       UART_RX_BUF_SIZE,
                       UART_TX_BUF_SIZE,
                       uart_evt_callback,
                       APP_IRQ_PRIORITY_LOWEST,
                       err_code);
    APP_ERROR_CHECK(err_code);
}

and I also change 

#ifndef NRFX_UART_DEFAULT_CONFIG_BAUDRATE
#define NRFX_UART_DEFAULT_CONFIG_BAUDRATE 2576384

#ifndef UART_DEFAULT_CONFIG_BAUDRATE
#define UART_DEFAULT_CONFIG_BAUDRATE 2576384

Did I miss anything? And how can I check if the connection is good?

+ and.. is it possible to connect like this?

nrf52 ---(uart)--- custom device(cm1106) ---(uart)--- PC

Parents Reply Children
No Data
Related