communicate WIFI with customboard nRF52833 through uart

Hi, all

My custom board has nRF52833 mcu and wifi module(esp-wroom-02). I'm going to communicate with these two using the uart port.

The problem is, data communication is not possible with each suitable port.

I checked the waveform of each pin using an oscilloscope.

There is no waveform on the TX pin of mcu (i.e., RX pin in the wifi module), and it seems to communicate only with mcu's RX pin. (Only in the TX pin of the wifi module)

I'm not sure, but each of the tx and rx pins seems to be connected well on hardware. and also I set the port correctly and set it correctly.

Is there anything I didn't check yet?

<this is my customboard schematic>

RX2 (G1) is P(0, 26) 

TX2 (H2) is P(0, 27)

pca10100.h

//wifi
#define WIFI_RST NRF_GPIO_PIN_MAP(0, 4)
#define WIFI_EN NRF_GPIO_PIN_MAP(0, 5)
#define WIFI_TX NRF_GPIO_PIN_MAP(0, 26) //G1
#define WIFI_RX NRF_GPIO_PIN_MAP(0, 27) //H2

uart initialize

void wifi_init(void)
{
    uint8_t                      state;
    uint32_t                     err_code;
    app_uart_comm_params_t const comm_params =
    {
        .rx_pin_no    = WIFI_RX,
        .tx_pin_no    = WIFI_TX,
        .rts_pin_no   = RTS_PIN_NUMBER,
        .cts_pin_no   = CTS_PIN_NUMBER,
        .flow_control = APP_UART_FLOW_CONTROL_DISABLED,
        .use_parity   = false,
#if defined (UART_PRESENT)
        .baud_rate    = NRF_UART_BAUDRATE_115200
#else
        .baud_rate    = NRF_UART_BAUDRATE_115200
#endif
    };
    NRF_LOG_INFO("%d", &comm_params.baud_rate);
    APP_UART_FIFO_INIT(&comm_params,
                       WIFI_RX_BUF_SIZE,
                       WIFI_TX_BUF_SIZE,
                       wifi_event_handle,
                       APP_IRQ_PRIORITY_LOWEST,
                       err_code);

    APP_ERROR_CHECK(err_code);
    
    nrf_gpio_cfg_input(WIFI_RX, NRF_GPIO_PIN_PULLUP);
}

BR,

lyrics

+ added)

Because tx and rx can communicate on one port, they cannot receive the correct data due to conflicts. So it doesn't even interrupt with the uart handler.

It just keeps repeating tx and rx communication on one port.

Parents
  • Hello,

    If you try to connect the UART pins to a UART terminal, do you see any data there? What do you expect to see on the nRFs TX pin?

    You are using custom HW, right?

    What log backend do you use? (it should say in your sdk_config.h file).

    Best regards,

    Edvin

  • Hello, 

    If you try to connect the UART pins to a UART terminal, do you see any data there? What do you expect to see on the nRFs TX pin?

    I didn't check UART terminal yet, but I want to communicate with wifi module over at commands. 

    // wfcr[] = 'AT\r\n';
    err_code = app_uart_put(wfcr[wifi_tx_idx]);

    so I send basic command ( 'AT' data ) for test using 'app_uart_put'. (I followed 'ble_app_uart' example.) 

    briefly, I want to send the at command, but it seems to be confirmed on the RX pin, not the TX pin. If it's not a hardware error, I want to know what kind of error it is. 

    You are using custom HW, right?

    What log backend do you use? (it should say in your sdk_config.h file).

    yes,

    I'm not fully understand what log backend is.. but as I checked sdk_config.h file, these definition set bit.

    #ifndef NRF_CLI_LOG_BACKEND
    #define NRF_CLI_LOG_BACKEND 1
    #endif

    #ifndef NRF_LOG_BACKEND_RTT_ENABLED
    #define NRF_LOG_BACKEND_RTT_ENABLED 1
    #endif

    BR,

    lyrics

  • I have more fundamental problem.. I'll post new one.

Reply Children
No Data
Related