Skip to main content
Associate
May 11, 2024 12:34 PM UTC
Question

Making the DTR/RTS option support CH340

Almost all development boards produced by Chinese vendors use CH340 as the uart converter chip, I would like stm32cubeprogrammer to be able to control the RTS and DTR of this chip.

If the feature works fine for the FT232RL, I don't know why it won't work for the CH340.

https://community.st.com/t5/stm32cubeprogrammer-mcus/boot0-nrst-control-with-dtr-rts/td-p/255331

 

This topic has been closed for replies.

9 replies

Tesla DeLorean
Guru
May 11, 2024 12:42 PM UTC

You'd need to look at what the CH340 is doing differently at a chip, USB and driver level.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
wc7086Author
Associate
May 11, 2024 12:58 PM UTC

Here is a log of another program's work where I selected RTS high and DTR low.

 

RTS level high (+3-+12V), reset.
DTR low (-3 to 12V), select BootLoader.
... Delay 100ms
RTS level goes low (-3--12V) to release reset.
DTR maintains low

Tesla DeLorean
Guru
May 11, 2024 2:41 PM UTC

I understand the goals

Definitely not at those voltages

The Win32 COMM API allows for the pins to be driven high/low, ST uses this interface to modulate the pin levels.

You need to be looking at why the CH340 isn't facilitating this at it's pins, this isn't ST's fault / bug

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
wc7086Author
Associate
May 11, 2024 12:50 PM UTC
Pavel A.
May 11, 2024 1:57 PM UTC

Do you mean, using RTS or DTR to drive BOOT0 ? Then yes, this can be useful.