ESP32-C3 UART1 DMA Setup Issue: Undefined Reference Error and Devicetree Configuration
Hi @sylvioalves//!//n//nThanks for your time//! I tried again and it somehow just works sending the data from uart1 pins. Here's what I did.//n//n1. Reconnected the usb-serial converter to pins 2 and 3.//n2. Ran west build -p, and then west flash.//n3. Reset the board and I can receive the echo bot messages.//n//nI didn't change any code, but it works this time. I also used a logic analyzer to check, and it shows correctly.//n//nI tried several times by running west build -p before you replied, but they all failed. I also tried flashing into another esp32c3 board, and the uart1 did not work either. So I think it's not because of the bad pin connection.//n//nI tried running west build -p with my own project (which I mentioned above), and it also works sending messages from uart1 tx pin. I didn't change any code either. And it somehow just works. I'm not sure if it's a good message or bad. 😂//n//nBut I have another problem when using uart_tx(const struct device *dev, const uint8_t *buf, size_t len, int32_t timeout). //nDescription: I can't build the project after setting the dma channel for uart1.//nThis is my uart1 settings in esp32c3_devkitm.overlay//n//n&uart1 {//n status = /'okay/';//n current-speed = <115200>;//n pinctrl-0 = <&uart1_sbus>;//n pinctrl-names = /'default/';//n dmas = <&dma 1>, <&dma 1>;//n dma-names = /'tx/', /'rx/';//n};//n//nAfter running west build -p auto, it shows//n//n//nc:/users/nineday/zephyr-sdk-0.16.0/riscv64-zephyr-elf/bin/../lib/gcc/riscv64-zephyr-elf/12.2.0/../../../../riscv64-zephyr-elf/bin/ld.bfd.exe: zephyr/drivers/serial/libdrivers__serial.a(uart_esp32.c.obj):(.dram1.4+0x10): undefined reference to `__device_dts_ord_46'//ncollect2.exe: error: ld returned 1 exit status//nninja: build stopped: subcommand failed.//nFATAL ERROR: command exited with status 1: 'C:/Program Files/CMake/bin/cmake.EXE' --build 'D:/0Document/HeadTracker/HeadTracker_ESP32/headtracker/build'//n//n//nI read the esp32 c3 technical reference, it says /'The two UART controllers on ESP32-C3 share one TX/RX GDMA (general direct memory access) channel via UHCI./' I'm not sure how to set up the uart1 dma in devicetree since I couldn't find any samples about this.//n//nCould you please help me with setting up the devicetree?//nBest regards.
原文地址: https://www.cveoy.top/t/topic/pYsA 著作权归作者所有。请勿转载和采集!