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

52840 port pin P1.00 can not use as the uart pin.

Hi, my sdk version is 17.0.2, softdevice is s140, when i use the port pin P1.00 as the RX pin of the uart, it will show data bus error, i have tried use other pin as the RX, it can be inited and work well. Do i need to do some settings to let this pin work?

Parents Reply Children
  • PIN define:

    #define BC32_RX_PIN_NUMBER (NRF_GPIO_PIN_MAP(1,0))
    #define BC32_TX_PIN_NUMBER 24
    #define BC32_CTS_PIN_NUMBER 7
    #define BC32_RTS_PIN_NUMBER 5

    UART init:

    static void BC32_uart_init(void)
    {
    uint32_t err_code;


    const app_uart_comm_params_t comm_params =
    {
    BC32_RX_PIN_NUMBER,
    BC32_TX_PIN_NUMBER,
    BC32_RTS_PIN_NUMBER,
    BC32_CTS_PIN_NUMBER,
    APP_UART_FLOW_CONTROL_DISABLED,
    false,
    NRF_UART_BAUDRATE_9600
    };
    APP_UART_FIFO_INIT(&comm_params,
    UART_RX_BUF_SIZE,
    UART_TX_BUF_SIZE,
    uart_error_handle,
    APP_IRQ_PRIORITY_HIGH,
    err_code);

    APP_ERROR_CHECK(err_code);
    }

    it will enter interupt handle with APP_UART_COMMUNICATION_ERROR event.

    I use other pin on p1, it can work.

  • What board are you using? Are you sure there's nothing else on that pin?

    it will enter interupt handle with APP_UART_COMMUNICATION_ERROR event

    You mean the Hard Fault handler?

    When & where, exactly, does that error occur?

    It could be just that you receive an initial "junk" byte, which causes a Framing Error - that really shouldn't be handled as a Fatal Error:

    devzone.nordicsemi.com/.../160765

    devzone.nordicsemi.com/.../161677

Related