I need to read a "reserve pin" like the
PB2 Boot1 tac swich input - to check if it
is sticky or not working.
What are the "top secret" labels for these
pins?
I need to read a "reserve pin" like the
PB2 Boot1 tac swich input - to check if it
is sticky or not working.
What are the "top secret" labels for these
pins?
We usually use a multimeter to test this sort of thing... I've never tried to use BOOT1 as GPIO and I couldn't get it to read state changes when I just tried. Next step would be to look at the schematic and see how that pin is pulled up/down.
There are now "secret labels"; the low level way to access pins by their port and number (in this case trying C9 which is header pin 38 which is the GPIO for BUT) would be:
void setup() {
pinMode(13,OUTPUT);
gpio_set_mode(GPIOC_BASE, 9, GPIO_MODE_INPUT_FLOATING);
}
void loop() {
digitalWrite(13,gpio_read_bit(GPIOC_BASE,9));
}
You can find more functions in libmaple/gpio.h and libmaple/gpio.c. These functions are not "fool proof" or documented and you can definitely do naughty things with them... but they can be useful for getting fast read/write access by cutting out the digitalRead/digitalWrite pin mapping lookups and function call overhead.
You must log in to post.