ESP32C6 still resets with DTR when USB_SERIAL_JTAG_USB_UART_CHIP_RST_DIS is set

clupien
Posts: 2
Joined: Thu Nov 21, 2024 11:44 pm

ESP32C6 still resets with DTR when USB_SERIAL_JTAG_USB_UART_CHIP_RST_DIS is set

Postby clupien » Fri Nov 22, 2024 12:14 am

On windows, when the software disconnects from the serial port, it toggles the DTR line which resets the ESP32C6 (I have a esp32c6 devkit mini, v0.0).
I know there is nothing to do on the device for the USB to UART connection but on the USB Serial/JTAG, the documentations says:
Note that as described earlier, certain RTS/DTR sequences lead to hardware reset of ESP32-C6. Software can disable hardware recognition of these DTR/RTS sequences by setting the USB_SERIAL_JTAG_USB_UART_CHIP_RST_DIS bit, allowing software to interpret these signals freely.
This is in section 32.3.2 CDC-ACM Firmware Interface Functional Description of the ESP32-C6 Technical Reference Manual.

So I have been trying to change that bit but without any functional difference. Toggling the DTR signal still resets the ESP32C6.

The code I use is basically

Code: Select all

#include "soc/usb_serial_jtag_struct.h"
USB_SERIAL_JTAG.chip_rst.usb_uart_chip_rst_dis = 1;
which I used in the arduino devkit but also in the esp-idf. I even modified the 2nd stage bootloader to basically only do that and stop there and I still get the same behavior.

So has anybody been able to make that function work as documented or is this a hardware problem (or documentation error).

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32C6 still resets with DTR when USB_SERIAL_JTAG_USB_UART_CHIP_RST_DIS is set

Postby ESP_Sprite » Fri Nov 22, 2024 2:03 am

You mean this development board? If so, make sure to connect to the 'USB' header; the other one is connected to an USB-serial chip.

clupien
Posts: 2
Joined: Thu Nov 21, 2024 11:44 pm

Re: ESP32C6 still resets with DTR when USB_SERIAL_JTAG_USB_UART_CHIP_RST_DIS is set

Postby clupien » Fri Nov 22, 2024 4:18 am

Yes it is that device and I am using the correct connector.
Using pyserial under linux I can toggle the RTS/DTR lines and I can see the change on the device with the same register that contains the USB_SERIAL_JTAG_USB_UART_CHIP_RST_DIS bit. I also see that bit value change. I do the reading with something like:

Code: Select all

#include "soc/usb_serial_jtag_reg.h"
 printf("Chip RES_REG 0x%08x\n", *(unsigned int *)USB_SERIAL_JTAG_CHIP_RST_REG);

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32C6 still resets with DTR when USB_SERIAL_JTAG_USB_UART_CHIP_RST_DIS is set

Postby ESP_Sprite » Sat Nov 23, 2024 2:42 pm

One thing I can think of is that you need to write USB_SERIAL_JTAG_CONFIG_UPDATE to 1 to update the actual hardware.

Who is online

Users browsing this forum: No registered users and 50 guests