Reputation: 25501
I’m programming a micro:bit (in Ada) at the bare-metal level, that is, I’m addressing the nrf51 registers directly.
I have no trouble with button A, GPIO pin 17: it’s configured as
dir => input,
input => connect,
pull => pullup,
drive => s0s1,
sense => disabled
and when the button is pressed the IN register bit 17 is low
, when released it’s high
.
However, with button B, GPIO pin 26, configured exactly the same, IN register bit 26 is always low
.
The factory image recognises both button A and B.
Button B is correctly connected to edge connector pin 11 (checked voltage level at edge connector with DVM).
I’d like to know why I have to specify pullup
, though, given that there’s already a 10k pull-up resistor on the board (and the DVM shows proper logic levels).
The schematic is here, the nRF51 reference manual is here.
I found an earlier schematic where GPIO pin 26 was shared with the magnetometer, could that be related?
Upvotes: 3
Views: 177
Reputation: 25501
Turns out that
Cure: set up the low-frequency clock to run off the 32,768 kHz synthesized output from the high frequency clock.
Upvotes: 5