hello,
I'm using PWM to drive a circuit off of PTD16 and am observing a low voltage of 440mV, instead of 0V (GND) as I might expect. The high voltage is 5V. This happens for 0% through 100% duty cycle.
I am using pin PTD16 (connected to the GREEN_LED feature on the S32K144 development board). It doesn't seem to matter if I put a pull down resistor (internal or external) in place. There is no documentation on what the GPIO low voltage out should be.
Is this known behavior? If so is there a way to reference to GND instead of 440mV? Does it depend on which pin or drive strength is being used? My application needs PWM that can go from 0V to 5V.
best,
Fred
Solved! Go to Solution.
Hi,
This is due to the LED.
Reroute the PWM channel to another pin.
Regards,
Daniel
Yes, that worked. Forgot that when pulling low, LED is still connected and causing current to flow. The circuit is Vdd->LED->current-limiting resistor (Rc)->pin->R->GND so a voltage divider is formed between Rc and R.
With LED forward voltage of ~3V, Rc of 220ohms and Vdd = 5V, if I see 440mV at my measurement point, R ~ 64ohms. This is close to what I actually measure. Will use this as the value in my circuit.
Thanks!
Hi,
This is due to the LED.
Reroute the PWM channel to another pin.
Regards,
Daniel