Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using the soft_uart example in the dedicated GPIO through ESP32-C3, the serial port reception fails (IDFGH-12782) #13762

Open
3 tasks done
iamugly opened this issue May 8, 2024 · 3 comments
Labels
Status: Opened Issue is new Type: Bug bugs in IDF

Comments

@iamugly
Copy link

iamugly commented May 8, 2024

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

v5.2.1

Espressif SoC revision.

ESP32-C3 chip revision: v0.3

Operating System used.

Windows

How did you build your project?

VS Code IDE

If you are using Windows, please specify command line type.

None

Development Kit.

ESP32-C3-DevKitc-02v1.1

Power Supply used.

USB

What is the expected behavior?

When I use the serial port assistant on my computer to send data, the program should print out the same information as the sent data.

What is the actual behavior?

When I send the following information through the serial port
QQ截图20240508095940

But what is printed out is always 0xff......
QQ截图20240508100152

Steps to reproduce.

  1. Step Connect the hardware
  2. Step Set the TX/RX pins in the soft_uart example
  3. Step After running, data is sent through the serial port assistant. This situation occurs when more than 16 bytes are sent.
    ...

Debug Logs.

ESP-ROM:esp32c3-api1-20210207
2024-05-08 10:06:14 Build:Feb  7 2021
2024-05-08 10:06:14 rst:0x1 (POWERON),boot:0xc (SPI_FAST_FLASH_BOOT)
2024-05-08 10:06:14 SPIWP:0xee
2024-05-08 10:06:14 mode:DIO, clock div:1
2024-05-08 10:06:14 load:0x3fcd5820,len:0x1738
2024-05-08 10:06:14 load:0x403cc710,len:0xb9c
2024-05-08 10:06:14 load:0x403ce710,len:0x2e40
2024-05-08 10:06:14 entry 0x403cc71a
2024-05-08 10:06:14 I (30) boot: ESP-IDF v5.2.1-dirty 2nd stage bootloader
2024-05-08 10:06:14 I (30) boot: compile time May  6 2024 09:30:04
2024-05-08 10:06:14 I (30) boot: chip revision: v0.3
2024-05-08 10:06:14 I (34) boot.esp32c3: SPI Speed      : 80MHz
2024-05-08 10:06:14 I (39) boot.esp32c3: SPI Mode       : DIO
2024-05-08 10:06:14 I (43) boot.esp32c3: SPI Flash Size : 4MB
2024-05-08 10:06:14 I (48) boot: Enabling RNG early entropy source...
2024-05-08 10:06:14 I (53) boot: Partition Table:
2024-05-08 10:06:14 I (57) boot: ## Label            Usage          Type ST Offset   Length
2024-05-08 10:06:14 I (64) boot:  0 nvs              WiFi data        01 02 00009000 00006000
2024-05-08 10:06:14 I (72) boot:  1 phy_init         RF data          01 01 0000f000 00001000
2024-05-08 10:06:14 I (79) boot:  2 factory          factory app      00 00 00010000 00100000
2024-05-08 10:06:14 I (87) boot: End of partition table
2024-05-08 10:06:14 I (91) esp_image: segment 0: paddr=00010020 vaddr=3c020020 size=09a98h ( 39576) map
2024-05-08 10:06:14 I (105) esp_image: segment 1: paddr=00019ac0 vaddr=3fc89c00 size=012f4h (  4852) load
2024-05-08 10:06:14 I (109) esp_image: segment 2: paddr=0001adbc vaddr=40380000 size=0525ch ( 21084) load
2024-05-08 10:06:14 I (120) esp_image: segment 3: paddr=00020020 vaddr=42000020 size=14d74h ( 85364) map
2024-05-08 10:06:14 I (138) esp_image: segment 4: paddr=00034d9c vaddr=4038525c size=047b0h ( 18352) load
2024-05-08 10:06:14 I (145) boot: Loaded app from partition at offset 0x10000
2024-05-08 10:06:14 I (145) boot: Disabling RNG early entropy source...
2024-05-08 10:06:14 I (158) cpu_start: Unicore app
2024-05-08 10:06:14 I (166) cpu_start: Pro cpu start user code
2024-05-08 10:06:14 I (167) cpu_start: cpu freq: 160000000 Hz
2024-05-08 10:06:14 I (167) cpu_start: Application information:
2024-05-08 10:06:14 I (170) cpu_start: Project name:     soft_uart
2024-05-08 10:06:14 I (175) cpu_start: App version:      5a40bb87
2024-05-08 10:06:14 I (180) cpu_start: Compile time:     May  6 2024 09:29:55
2024-05-08 10:06:14 I (186) cpu_start: ELF file SHA256:  173092dd5...
2024-05-08 10:06:14 Warning: checksum mismatch between flashed and built applications. Checksum of built application is de07c6f158030a19e037f0210e8c76986e4850d6db61ce9585f3d0a258402c7a
I (191) cpu_start: ESP-IDF:          v5.2.1-dirty
2024-05-08 10:06:14 I (197) cpu_start: Min chip rev:     v0.3
2024-05-08 10:06:14 I (201) cpu_start: Max chip rev:     v1.99 
2024-05-08 10:06:14 I (206) cpu_start: Chip rev:         v0.3
2024-05-08 10:06:14 I (211) heap_init: Initializing. RAM available for dynamic allocation:
2024-05-08 10:06:14 I (218) heap_init: At 3FC8BE70 len 00034190 (208 KiB): RAM
2024-05-08 10:06:14 I (224) heap_init: At 3FCC0000 len 0001C710 (113 KiB): Retention RAM
2024-05-08 10:06:14 I (231) heap_init: At 3FCDC710 len 00002950 (10 KiB): Retention RAM
2024-05-08 10:06:14 I (238) heap_init: At 50000010 len 00001FD8 (7 KiB): RTCRAM
2024-05-08 10:06:14 I (245) spi_flash: detected chip: generic
2024-05-08 10:06:14 I (249) spi_flash: flash io: dio
2024-05-08 10:06:14 I (253) sleep: Configure to isolate all GPIO pins in sleep state
2024-05-08 10:06:14 I (260) sleep: Enable automatic switching of GPIO sleep configuration
2024-05-08 10:06:14 I (267) main_task: Started on CPU0
2024-05-08 10:06:14 I (267) main_task: Calling app_main()
2024-05-08 10:06:14 UART transfers succeeded, received bytes: { 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff }
2024-05-08 10:06:17 I (3597) main_task: Returned from app_main()

More Information.

No response

@iamugly iamugly added the Type: Bug bugs in IDF label May 8, 2024
@espressif-bot espressif-bot added the Status: Opened Issue is new label May 8, 2024
@github-actions github-actions bot changed the title Using the soft_uart example in the dedicated GPIO through ESP32-C3, the serial port reception fails Using the soft_uart example in the dedicated GPIO through ESP32-C3, the serial port reception fails (IDFGH-12782) May 8, 2024
@iamugly
Copy link
Author

iamugly commented May 8, 2024

Oh, I know the reason, because GPIO9 is used as RX pin, but why can’t GPIO9 pin be used as analog RX?

@iamugly
Copy link
Author

iamugly commented May 8, 2024

Why when esp sends a string, the string received by the serial port assistant has "\0" in front and behind it. Another question, I use the serial port assistant to send a string and add \r and \n at the end, but the reception does not stop, but does not stop receiving until 16 bytes are received.

@iamugly
Copy link
Author

iamugly commented May 9, 2024

Why when esp sends a string, the string received by the serial port assistant has "\0" in front and behind it. Another question, I use the serial port assistant to send a string and add \r and \n at the end, but the reception does not stop, but does not stop receiving until 16 bytes are received.

Is it possible to automatically exit reception after a delay period without receiving enough 16 bytes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Opened Issue is new Type: Bug bugs in IDF
Projects
None yet
Development

No branches or pull requests

2 participants