Skip to main content
Associate
May 11, 2024
Question

Making the DTR/RTS option support CH340

  • May 11, 2024
  • 3 replies
  • 4800 views

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

 

3 replies

Tesla DeLorean
Guru
May 11, 2024

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 VenmoUp vote any posts that you find helpful, it shows what's working..
wc7086Author
Associate
May 11, 2024

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

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 VenmoUp vote any posts that you find helpful, it shows what's working..
wc7086Author
Associate
May 11, 2024
Pavel A.
Super User
May 11, 2024

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