Making the DTR/RTS option support CH340
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-11 5:34 AM
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
- Labels:
-
Bug-report
-
STM32CubeProgrammer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-11 5:42 AM
You'd need to look at what the CH340 is doing differently at a chip, USB and driver level.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-11 5:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-11 5:58 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-11 6:57 AM
Do you mean, using RTS or DTR to drive BOOT0 ? Then yes, this can be useful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-11 7:41 AM
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
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-11 8:29 AM - edited ‎2024-05-11 8:30 AM
But at least there could be an option to set DTR/RTS before connection / unset after? The user can connect these pins as they want ? Their Qt serial library should support it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-11 10:32 PM
I seem to have found the problem, the STM32CubeProgrammer can control the pin voltages correctly, but it does not invert the RTS pin before it starts reading the BootLoader information, and the MCU is still waiting for the RTS pin to go back high.
I tried pulse mode, but the duration was short enough that it didn't trigger a reset.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-20 8:18 AM
Hello @wc7086
The request to control the pulse window length for DTR/RTS is already opened and being worked on by our development team (Internal ticket number : 166876).
This should be available in a future release.
Aziz
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
