I am trying to set up the ASYNC UART and I am getting the following error:
-ENOSYS: If configuration is not supported by the device or driver does not support setting configuration at runtime
To my understanding Noridc supports the Asyn UART which should include the Seeed Xiao sense nrf52480. Correct me if I am wrong?
Furthermore, nordic has a tutorial on how to use this UART configuartion so I am not sure why I am getting this error when I try to implement it.
What is the issue?
What else can I check to find the cause of this issue?
Any insights are much appreciated.
The following is the code that is relevant before the error:
Function called:
int configUART(const struct device *uart){
Hi there,
So just taking a wild guess I would look to the Board config(device tree), or the Overlay and be sure the Uart is set up and enabled.
HTH
GL PJ
the api->configure value is null.
Upon finding this out I thought the async uart method would not be compatible but when looking at the devicetree set up for the uart the underlying nordic, nrf-uart-common.yaml file states that the Nordic nRF family UART is working with EasyDMA which is a prerequisite for using the async functionality.
I think my problem is quite related to the original one. I am doing the exercise from the nrf Academy with only XIAO nrf52480 (attached to an expansion board), no nordic DK:
The solution code is here:
I am getting the -ENOSYS error on this line:
ret = uart_callback_set(uart, uart_cb, NULL);
and I don’t understand why. Is the UART-USB not supported on XIAO? Or XIAO’s configuration is somehow different from what nrf DK has for UART?
The xiao ble sense board is using USB CDC for console, logging, etc, and the USB stack is not compatible with the Asynchronous API, only the Interrupt-driven API. But it is possible to enable the ASYNC api for the uart0 node by setting CONFIG_UART_0_INTERRUPT_DRIVEN=n and CONFIG_UART_0_ASYNC=y in your prj.conf file.
I wasn’t able to work out the provided example in the comments and make UART work via USB of nrf25840. However, I’ve added the following lines to my config:
Then, I’ve flashed my ESP32C3 with some Arduino sketch on reading/writing from/to Hardware UART and connected RX & TX ports of both ESP32C3 and nrf52840. Then I was able to use the serial monitor of ESP32C3 to read nrf52840 greeting and send back the values to toggle different LEDs. Basically, I’ve used my ESP32C3 board as a USB-UART converter for this exercise.