Re: BeagleBone Black and GPIO issues
Mouse <[email protected]>
| Newsgroups | gmane.os.netbsd.ports.arm |
|---|---|
| Message-ID | <[email protected]> |
>>> When I enable a pulldown the the voltage on the pin reads 1.6 V >>> which doesn't make me super happy, but it doesn't seem to be >>> floating. >> Did you try strapping it to Vcc and GND with some 3-10 K of >> resistance to see if that affects the voltage? > OK, with a 6.7 kohm resistor connecting the GPIO pin to 3.3 V, I got > a 0.54 V drop across the resistor and a 2.91 V drop from the pin to > ground. This is what I expect after inferring a 30 kohm pulldown > from the datasheet. What kind of meter are you using? In particular, what is its input impedance - how much does it load the circuit under test? If you are using an electromechanical meter (typically a moving needle driven by parasitic current), it is likely to be drawing something in the 100uA-1mA range at full scale. If you're using a digital meter, unless it's _really_ cheap, to a first approximation we can treat it as having infinite input impedance. For ideal resistors of 30k to ground and 6.7k to an ideal 3.3V supply, the junction point should be at 2.69755V. I note 0.54+2.91=3.45; this is within 5% of 3.3, but not by much - what do you measure the nominal 3.3V power rail at? If I redo the calculation with a 3.45V supply, I get 2.82016V at the junction point, still lower than your measurement. Perhaps your 6.7k resistor is lower resistance than nominal and/or the 30k pullup is higher than nominal; the latter strikes me as particularly likely, but see below. > Also, I set my multimeter to ammeter mode and put it inline between > the GPIO pin and 3.3 V and it read the nominal leakage current of > 0.11 à ³A. That's not enough parasitic power to do much to most electromech meter mechanisms, so I'm going to guess you do have a digital meter as sketched above. >> Depending on various factors, 1.6V could very well be what you get >> for a floating input pin. > The floating voltage appeared to be about 3.1 V, so I don't think > it's actually floating, but something is going on that I don't > understand. Indeed! When you say "[t]he floating voltage", you mean...what? The measured voltage with both pullup and pulldown disabled? You could be measuring the thermally-generated voltage across the protection diodes or something equally meaningless. If you disable both pullup and pulldown and use 6.7k to ground, what do you get? 6.7k to 3.3V? If I've understood right, you have - Pulldown enabled, nothing but the meter connected: 1.6V - Pulldown enabled, 6.7K to (nominal) 3.3V: 2.91V This is consistent with many possibilities, most of them not plausible here (because they involve voltage sources outside the 0-3.3V range), but certainly enough of them plausible. Could you switch that 6.7K to pin-to-ground instead and see what you get? In particular, assuming an ideal 30k pulldown and an ideal 3.3V supply, I can explain the 1.6V measurement by postulating 31.875k to 3.3V. If I set the "3.3V" rail to 3.45V instead, I get 34.6875k instead. These are close enough to the nominal pulldown resistance to make me wonder if you think you have the pullup disabled but actually have it enabled somehow. If I assume a 3.45V supply, 30k to ground, 31.875k to 3.45V, and also 6.7k to 3.45V, then, assuming ideal everything, I get 2.91252V at the junction point. This is provocatively close to your stated measurement of 2.91, leading me to urge even more strongly that you look into the possibility that the pullup is somehow enabled. /~\ The ASCII Mouse \ / Ribbon Campaign X Against HTML [email protected] / \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B