Hello,
I'm trying to control a motor via a mosfet. Setting the mosfet on/off with pin assignment works great, however pwm at any value other than 0 or max burn out the mosfet.
After looking into it, my current theory is that this is because the pwm does not behave like a proper square wave. And at intermediate voltages the mosfets are not properly on/off and get burnt out due to high resistance.
At pwm=max I see VDD as expected
(Apologies for the image quality)
When the pwm is 1/4 max, however, the voltage does not go to VDD or to GND
I have tried setting PWM to high drive via:
NRF_P0->PIN_CNF[< pin number on port 0 >] |= (GPIO_PIN_CNF_DRIVE_H0H1 << GPIO_PIN_CNF_DRIVE_Pos)
But that did not seem to change the behavior. I have observed this behavior both on my custom pcb and an nrf52 dev kit. I haven't been able to rule out this being due to my scope.
Any suggestions would be welcome!