Invalid pin D6-D8
Posted: Sat May 28, 2016 12:19 pm
machine.Pin(any of 6 to 8) gives me an "invalid Pin" exception on a few week old build of version 1.8 . That's a lot of missing GPIO !
Is this a known problem or likely to be an issue with the build I picked up ?
Now I look into it modpybpin.c has this
I'm obviously going to tweak it for my board (mini D1) but perhaps there's a better way of doing this.
Jon
Is this a known problem or likely to be an issue with the build I picked up ?
Now I look into it modpybpin.c has this
Code: Select all
const pyb_pin_obj_t pyb_pin_obj[16 + 1] = {
{{&pyb_pin_type}, 0, FUNC_GPIO0, PERIPHS_IO_MUX_GPIO0_U},
{{&pyb_pin_type}, 1, FUNC_GPIO1, PERIPHS_IO_MUX_U0TXD_U},
{{&pyb_pin_type}, 2, FUNC_GPIO2, PERIPHS_IO_MUX_GPIO2_U},
{{&pyb_pin_type}, 3, FUNC_GPIO3, PERIPHS_IO_MUX_U0RXD_U},
{{&pyb_pin_type}, 4, FUNC_GPIO4, PERIPHS_IO_MUX_GPIO4_U},
{{&pyb_pin_type}, 5, FUNC_GPIO5, PERIPHS_IO_MUX_GPIO5_U},
{{NULL}, 0, 0, 0},
{{NULL}, 0, 0, 0},
{{NULL}, 0, 0, 0},
{{&pyb_pin_type}, 9, FUNC_GPIO9, PERIPHS_IO_MUX_SD_DATA2_U},
{{&pyb_pin_type}, 10, FUNC_GPIO10, PERIPHS_IO_MUX_SD_DATA3_U},
{{NULL}, 0, 0, 0},
{{&pyb_pin_type}, 12, FUNC_GPIO12, PERIPHS_IO_MUX_MTDI_U},
{{&pyb_pin_type}, 13, FUNC_GPIO13, PERIPHS_IO_MUX_MTCK_U},
{{&pyb_pin_type}, 14, FUNC_GPIO14, PERIPHS_IO_MUX_MTMS_U},
{{&pyb_pin_type}, 15, FUNC_GPIO15, PERIPHS_IO_MUX_MTDO_U},
// GPIO16 is special, belongs to different register set, and
// otherwise handled specially.
{{&pyb_pin_type}, 16, -1, -1},
};
Jon