UARTE

In UART async mode (CONFIG_UART_ASYNC_API=y) the UART transmit data and receive callback works fine. I've been able to set up the callback and enable the rx.

After switching to UARTE (CONFIG_NRFX_UARTE0=y), the UART transmit once, but the event handler is never called.

UARTE is set up like example from: "C:\ncs\v2.0.0\zephyr\samples\boards\nrf\nrfx_prs\src\main.c", the baudrate is set to 9600. nrfx_uarte_init() and nrfx_uarte_tx() show NRFX_SUCCESS. When nrfx_uarte_tx_in_progress() call is added, just after nrfx_uarte_tx(),  nrfx_uarte_tx_in_progress() hangs without any further (log) message.

Is it possible to implement UARTE like this on nRF9160 development board?

Do you need to enable rx on UARTE?

Is there any working sample for nRF9160?

Parents Reply Children
  • Hi Hakon,

    The code shown at 26 Sep 2022 is exactly what I'm doing. There is not much more to show you.

    Perhaps you can take a look at my questions of 26 Oct 2022. If these questions are answer it might not be necessary to use specific nrfx functions?

    I have been told that there is a nRF9160-dk UARTE sample. Is it possible to provide this sample to me?

    Best regards, Elbert

  • Elbert said:
    I have been told that there is a nRF9160-dk UARTE sample. Is it possible to provide this sample to me?

    Where have you been told this? As far as I know there is one internal example that is outdated and deprecated, and there is an official LP-UART sample. I don't think there is a specific UARTE sample, but I could be wrong.

    Elbert said:
    Can I use standard uart functions (like uart_callback_set, uart_rx_enable, etc.) and run in UARTE mode or do I have to use the uarte functions (like nrfx_uarte_init, nrfx_uarte_tx, etc.) to run in UARTE mode?

    Yes it should be possible. I'm pretty sure you can use the same API for both UART and UARTE.

  • Where have you been told this? As far as I know there is one internal example that is outdated and deprecated, and there is an official LP-UART sample. I don't think there is a specific UARTE sample, but I could be wrong

    I have been told by Frans Lutz, FAE at Nordic Netherlands.

    Yes it should be possible. I'm pretty sure you can use the same API for both UART and UARTE.

    If this is real, than I can use the standard uart functions. Can your verify this at Nordic?

    How can I verify the uart is running in UARTE mode? Is there any configuration or pin state I can check?

  • Elbert said:
    How can I verify the uart is running in UARTE mode? Is there any configuration or pin state I can check?

    For nRF9160, UART always runs with EasyDMA. There is no "UART" peripheral, just UARTE as can be seen in the list.

  • Elbert said:
    I have been told by Frans Lutz, FAE at Nordic Netherlands.

    He seems to be out of office at the moment, but he is back in four days, so hopefully I will get him to comment on this.

Related