State of pins on reset

07 Oct 2010

I'm using 5 channels of PWM. The code works fine, except that when the mbed is reset, the PWM outputs seem all to go high for a half-second or so while the device is initializing. The devices I've got connected to these pins really shouldn't be on for more than 1 ms every 20 ms, so I'd like to stop this behavior if possible, even though I haven't blown anything yet. What state are pins supposed to be in on reset?

07 Oct 2010

They will be inputs until they are configured as outputs, and might be floating high. You could put pull-down resistors on each output you are using.

07 Oct 2010

Thanks. That worked.

23 Dec 2010

Hi,


I'm having the same problem. I want pins 21, 29 and 30 to stay at low level while I reset the mbed. What value of resistors did you use? How did you conect them to be pull down resistors? (From the output to the ground?).

Thank you very much!

23 Dec 2010

A serious solution means that all the hardware must be "set/reset" on master reset. So your hardware must set also in the first ms the outputs you have - to appropiate levels and only after reset take place ( for safety a period bigger that mbed needs to reset) to consider the outputs from the mbed. 

06 Jun 2013

I have a similar requirement too. My mbed pins provide the PWM and direction signal to a Motor driver. While the mBed is being rest, the driver powers the motor. I tried a few pull down resistor values and they did not work, What value of Pull Down resistors did you use?

06 Jun 2013

This is a quite old topic, but I guess something like 5k should be strong enough to counteract the pull-ups, while not being much of a load. A bit smaller could also work.