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
  • Perhaps show what you actually did ?

    it will show data bus error

    You mean you get a Hard Fault?

    other pin as the RX, it can be inited and work well

    Did you try any other pins on P1 - or just P0 ... ?

  • 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.

Reply
  • 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.

Children
Related