This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nRF Connect SDK undefined reference to nrfx_timer_*

I'm trying to build support for uart async api by adding:

CONFIG_SERIAL=y
CONFIG_UART_ASYNC_API=y

 to my prj.conf.  Without CONFIG_UART_ASYNC_API the app compiles, but uart_callback_set fails (as expected).  When I add CONFIG_UART_ASYNC_API to get support for CONFIG_UART_ASYNC_API, then the build fails with messages like this:

/opt/nordic/ncs/v1.7.1/toolchain/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.bfd: /Users/denis/sandbox/itamar/workspace/zephyr/drivers/serial/uart_nrfx_uarte.c:530: undefined reference to `nrfx_timer_increment'

Do I need something else to get the nrfx timer support?

Parents
  • Hi Vidar,

    Just tried this again and am not seeing the compile error either.  Not sure why.  Maybe because I've done a west update?

    My dts has:

    &uart0 {
    compatible = "nordic,nrf-uarte";
    status = "okay";
    current-speed = <115200>;
    tx-pin = <47>;
    rx-pin = <33>;
    };

    and my prj.conf has:

    CONFIG_SERIAL=y
    CONFIG_UART_0_INTERRUPT_DRIVEN=n
    CONFIG_UART_ASYNC_API=y
    CONFIG_UART_0_ASYNC=y
    CONFIG_UART_0_NRF_HW_ASYNC=y
    CONFIG_UART_0_NRF_HW_ASYNC_TIMER=0

    And now uart_callback_set succeeds!

    This is on an nRF5340 design.

    Do the above prj.conf entries look correct?  Are they all needed?  Is there more I should have in there?  Is there documentation and/or examples of using uarte async somewhere?

Reply
  • Hi Vidar,

    Just tried this again and am not seeing the compile error either.  Not sure why.  Maybe because I've done a west update?

    My dts has:

    &uart0 {
    compatible = "nordic,nrf-uarte";
    status = "okay";
    current-speed = <115200>;
    tx-pin = <47>;
    rx-pin = <33>;
    };

    and my prj.conf has:

    CONFIG_SERIAL=y
    CONFIG_UART_0_INTERRUPT_DRIVEN=n
    CONFIG_UART_ASYNC_API=y
    CONFIG_UART_0_ASYNC=y
    CONFIG_UART_0_NRF_HW_ASYNC=y
    CONFIG_UART_0_NRF_HW_ASYNC_TIMER=0

    And now uart_callback_set succeeds!

    This is on an nRF5340 design.

    Do the above prj.conf entries look correct?  Are they all needed?  Is there more I should have in there?  Is there documentation and/or examples of using uarte async somewhere?

Children
  • Hi,

    It might have been related to the west update. Good to hear that it works now at least!

    denis said:
    Do the above prj.conf entries look correct?

    Yes, it looks to be correct. I tried to set up a similiar configuration here, and it worked fine.

    Async UART demo - loopback test:

    5756.async_uart_demo.zip

    We have integrated the async UART driver in our Bluetooth: Peripheral UART sample as well.

    denis said:
    Is there documentation and/or examples of using uarte async somewhere?

    Unfortunately, I could not find any documentation for this driver apart from its API documentation. There is more if you use our Low power UART driver, but this implementation requires routing of 2 extra control lines.

Related