edgetx icon indicating copy to clipboard operation
edgetx copied to clipboard

Init no pull in VBUS sense

Open StreakingJerry opened this issue 6 months ago • 1 comments

Is there an existing issue for this problem?

  • [x] I have searched the existing issues

What part of EdgeTX is the focus of this bug?

Transmitter firmware

Current Behavior

For the TX16S, only capacitor on the PA9, VBUS_sense pin, no pull down resistor.

Image

So some times it could be possible PA9 couple with some other line and got something like 2.2v, which make the USB function selection pop up on the screen.

So it would be better to change the line 136 in edgetx\radio\src\targets\common\arm\stm32\usb_driver.cpp gpio_init(USB_GPIO_VBUS, GPIO_IN, GPIO_PIN_SPEED_LOW); to gpio_init(USB_GPIO_VBUS, GPIO_IN_PD, GPIO_PIN_SPEED_LOW);

Expected Behavior

no unexpected pop up of USB fuction selection

Steps To Reproduce

occasionally

Version

2.11.1

Transmitter

RadioMaster TX16S / TX16SMK2

Operating System (OS)

No response

OS Version

No response

Anything else?

No response

StreakingJerry avatar Jun 11 '25 04:06 StreakingJerry

Based on the RadioMaster TX16S DFU button modification it seems removing the resistor connecting the BOOT0 pin to VBUS causes VBUS to float high and that requires an extra pull-down resistor. I think that means that the BOOT0 pin is acting as the pull-down for VBUS.

pagrey avatar Jun 12 '25 15:06 pagrey

This part cannot be changed without caution. Will affect all radios.

richardclli avatar Jun 20 '25 01:06 richardclli

Indeed, since that isn't the full reverse engineered schematic for that pin... there are two resistors that are also connected to BOOT0 and GND. i.e. when there is a voltage present on USB_VBUS, the two resistors act as a voltage divider to BOOT0, and if there is no voltage present they should be pulling PA9 down to GND.

Image

pfeerick avatar Jun 21 '25 05:06 pfeerick

Based on the RadioMaster TX16S DFU button modification it seems removing the resistor connecting the BOOT0 pin to VBUS causes VBUS to float high and that requires an extra pull-down resistor. I think that means that the BOOT0 pin is acting as the pull-down for VBUS.

If this is not function properly because of a hardware DIY, then I think the best way to address the problem is to revise the mod. piggy packing a resistor with C342 can be an option.

richardclli avatar Jul 08 '25 04:07 richardclli

Yes sure we can always add an external pull up resistor, but just think init the pin with input pull up is a more resonable fix.

StreakingJerry avatar Jul 13 '25 06:07 StreakingJerry