vedderb / vesc_pkg

Official VESC Packages
GNU General Public License v3.0
33 stars 42 forks source link

ws2812 change from opendrain to push_pull output #44

Open TechAUmNu opened 2 months ago

TechAUmNu commented 2 months ago

with open drain the driver doesn't work on hardware with inline resistance between the stm32 and output pins. Changing to push_pull output means it works reliably with a 1k resistor inline for pin protection.

vedderb commented 2 months ago

The reason for opendrain is that some (most) LEDs require more than 3.3V on the data-pin. On 5V-tolerant pins (most are) you can use a pull-up to 5V and opendrain to make it work. If the pins are in push-pull the simple pull-up trick won't work. Maybe there should be an option to switch between open-drain and push-pull?

TechAUmNu commented 2 months ago

The leds I am using say 0.7xVcc so 3.5v but seems to work fine with 3.3v. But yes for compatibility having the option to use open drain or push pull would be ideal.