10 years, 5 months ago.

how to change the configuration (pullup to pulldown) on device freedom kdm25???

I have connect to NPN devices, the digital logic output required status low on pin of freedom k25, how to change the configuration port?

report the source mbed code: limitation not working pulldown!!!!

/* PullDown not available for KL25 */ mode PullUp, PullDown, PullNone, OpenDrain typedef enum { PullNone = 0, PullUp = 2, PullDefault = PullNone } PinMode;

1 Answer

10 years, 5 months ago.

Hi,

As you are using an external component, ie NPN transistor as a switch, you may want to consider connecting a pulldown resistor (base to ground) to solve any startup glitches, something in the range 10k ohm to 22k ohm.

Dave

Accepted Answer

pulldown resistor (base to ground) is 47 K how to manage the logic state port? when cmd > 1 logic state = 1 3,3 v or cmd > 0 logic state pin =0 V ???

posted by Sacchetti Giampaolo 18 Jun 2014

Hi,

If your intrest is still around the pullup and pulldown reg, read the user manual find the register and bits that you are intrested in and manipulate them. There are 2 methods, use a mask or shift left n bits, care is needed in both cases, keep in mind that if you need to change bit 31 then you will need to make the bit unsigned ie 1UL otherwise it will try to change the reg to a signed value and cause an error.

Dave.

posted by David Fletcher 19 Jun 2014