HI ,
I need dma support for the uart protocol but I can't seem to locate any examples of it being used with an uart. Can anyone give support on this?
regards ,
Goudam
HI ,
I need dma support for the uart protocol but I can't seem to locate any examples of it being used with an uart. Can anyone give support on this?
regards ,
Goudam
Hi,
Which SDK are you using? Most of the UART examples we have use EasyDMA, but not all use it in an efficient way for receive operations.
For nRF Connect SDK, I would recommend you to look at the example from lession 5 in Nordic Developer Academy: nRF Connect SDK Fundamentals course, or this sample.
For nRF5 SDK, the libUARTE example is the recommended example for UART with EasyDMA.
Best regards,
Jørgen
Goudam said:I'm using this example: github.com/.../main.c but I'm getting an ENOSYS error.
Where/when do you get this error? Have you made any modifications to the sample/configuration?
Goudam said:I'm using a xiao ble board with a nrf52840 controller.
To enable EasyDMA (UARTE), you should also add the following to your board DTS or overlay file for the uart0/uart1 devices:
compatible = "nordic,nrf-uarte";
Try adding "CONFIG_UART_ASYNC_API=y" to your prj.conf.
Already this one is added in prj.conf file.
I found the issue in the driver code, where the macro UARTE_ANY_ASYNC was not enabled, so that user space API uart_callback_set(uart, uart_cb, NULL) will not able to set the callback. I also checked with the nrf52840dk board, which has the same code and has the macro UARTE_ANY_ASYNC enabled, but the xiao_ble board does not enabled.
The UARTE_ANY_ASYNC symbol depends on the CONFIG_UART_x_ASYNC Kconfigs.
How to enable this macro because if i enable this in prj.conf file i got some errors . In windows how to use west build commands for change kconfig file
error: UART_0_NRF_UARTE (defined at drivers/serial/Kconfig.nrfx:38) is assigned in a configuration file, but is not directly user-configurable (has no prompt). It gets its value indirectly from other symbols. See http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_UART_0_NRF_UARTE and/or look up UART_0_NRF_UARTE in the menuconfig/guiconfig interface. The Application Development Primer, Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful too. CMake Error at C:/ncs/v2.4.0/zephyr/cmake/modules/kconfig.cmake:339 (message): command failed with return code: 1 Call Stack (most recent call first): C:/ncs/v2.4.0/nrf/cmake/modules/kconfig.cmake:29 (include) C:/ncs/v2.4.0/zephyr/cmake/modules/zephyr_default.cmake:115 (include) C:/ncs/v2.4.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include) C:/ncs/v2.4.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:97 (include_boilerplate) CMakeLists.txt:8 (find_package) -- Configuring incomplete, errors occurred! See also "D:/Projects/GE/Bluetooth_nRF2840/workspace/central_uart/build/CMakeFiles/CMakeOutput.log". See also "D:/Projects/GE/Bluetooth_nRF2840/workspace/central_uart/build/CMakeFiles/CMakeError.log". FAILED: build.ninja C:\ncs\toolchains\31f4403e35\opt\bin\cmake.exe --regenerate-during-build -SD:\Projects\GE\Bluetooth_nRF2840\workspace\central_uart -BD:\Projects\GE\Bluetooth_nRF2840\workspace\central_uart\build ninja: error: rebuilding 'build.ninja': subcommand failed FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\31f4403e35\opt\bin\cmake.EXE' --build 'd:\Projects\GE\Bluetooth_nRF2840\workspace\central_uart\build'
Hi,
Try:
CONFIG_UART_ASYNC_API=y CONFIG_UART_0_INTERRUPT_DRIVEN=n CONFIG_UART_0_ASYNC=y
Hi sigurd
I am thanks for your support now its working for me while add the CONFIG_UART_0_INTERRUPT_DRIVEN=n in prj.conf file
Hi sigurd
I am thanks for your support now its working for me while add the CONFIG_UART_0_INTERRUPT_DRIVEN=n in prj.conf file