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.
I have a similar question that relates. The nRF52840 has two UARTE’s and a USB. Serial and Serial1. I need two UART’s. It appears I can set up a RX/TX on D0 and D1. I’m not sure but I believe the standard Xiao nRF setup uses Serial for the Arudino USB connection. So that in standard set up, Serial1 is on D6 D7. But Adafruit has a TinyUSB that is my understand uses the nRF USB to send and receive serial data.
If, this is true, does this mean I can set up serial as D0 D1?
If not, there appears to be a software serial class called MySerial I don’t know how it works but my 2nd serial port has low demand for fast serial comms, so it might work.
SO The Nrf52840 Has 2 Serial UARTS on the silicon, Serial & Serial1 and There is also the possibility to use a GPIO pin to “Bit_Bang” the data into the MCU pins (emulating a serial port functionality) Software Serial is that LIBRARY that enables that to work on a set of GPIO pins.
There is a Speed limitation on this method.
Search software serial and you will find all the info you should ever need, also some of the Xiao wiki’s use this tech to connect to certain peripherals.