boards/bdmicro_vina_d51: A few updates for flexibility and expansion.
ESP-01 header renamed to AUX, and expanded to 12 pins from 8 pins. Pins 1-8 still accommodate the ESP-01, with expansion to full SERCOM 4-pad support to allow for SPI and I2C on that expansion port with additional GPIO control. Update pins.c with additional signals provided AUX_1-8, along with UART, SPI, I2C name usage as aliases to appropriate AUX_1-8 signals. Additionally, add several alternate names specific to several expansion modules - the ESP-01, and the ATW-01 using the WINC_1500 (SPI) w/interrupt and control needed for the WINC - with assignments to module pin positions. Re-work SERCOM assignments to accommodate the above from other parts of the board, which required moving a SERCOM or two around in order to accommodate the 4-pad sercom pin mapping on the AUX port. Built and tested using latest from 'main': Adafruit CircuitPython 6.2.0-rc.0-70-ga1562430f-dirty on 2021-04-05; BDMICRO VINA-D51 with samd51n20
This commit is contained in:
parent
01be02dd00
commit
f66fc25d95
@ -26,17 +26,9 @@
|
||||
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
|
||||
void board_init(void) {
|
||||
// struct port_config pin_conf;
|
||||
// port_get_config_defaults(&pin_conf);
|
||||
//
|
||||
// pin_conf.direction = PORT_PIN_DIR_OUTPUT;
|
||||
// port_pin_set_config(MICROPY_HW_LED_TX, &pin_conf);
|
||||
// port_pin_set_output_level(MICROPY_HW_LED_TX, true);
|
||||
//
|
||||
// port_pin_set_config(MICROPY_HW_LED_RX, &pin_conf);
|
||||
// port_pin_set_output_level(MICROPY_HW_LED_RX, true);
|
||||
}
|
||||
|
||||
bool board_requests_safe_mode(void) {
|
||||
|
@ -12,13 +12,13 @@
|
||||
|
||||
#define BOARD_HAS_CRYSTAL 1
|
||||
|
||||
#define DEFAULT_I2C_BUS_SCL (&pin_PA16)
|
||||
#define DEFAULT_I2C_BUS_SDA (&pin_PA17)
|
||||
#define DEFAULT_UART_BUS_RX (&pin_PB20)
|
||||
#define DEFAULT_I2C_BUS_SCL (&pin_PA12)
|
||||
#define DEFAULT_I2C_BUS_SDA (&pin_PA13)
|
||||
#define DEFAULT_UART_BUS_TX (&pin_PB21)
|
||||
#define DEFAULT_UART_BUS_RX (&pin_PB20)
|
||||
#define DEFAULT_SPI_BUS_SCK (&pin_PC28)
|
||||
#define DEFAULT_SPI_BUS_MISO (&pin_PB23)
|
||||
#define DEFAULT_SPI_BUS_MOSI (&pin_PC27)
|
||||
#define DEFAULT_SPI_BUS_SCK (&pin_PC28)
|
||||
#define MICROPY_HW_LED_STATUS (&pin_PA23)
|
||||
#define MICROPY_HW_LED_RX (&pin_PC05)
|
||||
#define MICROPY_HW_LED_TX (&pin_PC06)
|
||||
|
@ -13,6 +13,42 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_PB04) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_PB05) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_PB06) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUX_1), MP_ROM_PTR(&pin_PA17) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUX_UART_TX), MP_ROM_PTR(&pin_PA17) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUX_SPI_MOSI), MP_ROM_PTR(&pin_PA17) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUX_I2C_SDA), MP_ROM_PTR(&pin_PA17) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_ATW01_MOSI), MP_ROM_PTR(&pin_PA17) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_ESP01_TX), MP_ROM_PTR(&pin_PA17) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUX_10), MP_ROM_PTR(&pin_PC01) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_ATW01_IRQ), MP_ROM_PTR(&pin_PC01) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUX_11), MP_ROM_PTR(&pin_PC10) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_ATW01_GPIO_3), MP_ROM_PTR(&pin_PC10) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUX_12), MP_ROM_PTR(&pin_PC11) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_ATW01_GPIO_1), MP_ROM_PTR(&pin_PC11) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUX_3), MP_ROM_PTR(&pin_PA18) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUX_UART_RTS), MP_ROM_PTR(&pin_PA18) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUX_SPI_SS), MP_ROM_PTR(&pin_PA18) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_ATW01_SS), MP_ROM_PTR(&pin_PA18) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_ESP01_GPIO0), MP_ROM_PTR(&pin_PA18) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUX_4), MP_ROM_PTR(&pin_PC14) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_ATW01_RESET), MP_ROM_PTR(&pin_PC14) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_ESP01_RESET), MP_ROM_PTR(&pin_PC14) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUX_5), MP_ROM_PTR(&pin_PA19) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUX_UART_CTS), MP_ROM_PTR(&pin_PA19) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUX_SPI_MISO), MP_ROM_PTR(&pin_PA19) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_ATW01_MISO), MP_ROM_PTR(&pin_PA19) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_ESP01_GPIO2), MP_ROM_PTR(&pin_PA19) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUX_6), MP_ROM_PTR(&pin_PC15) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_ATW01_EN), MP_ROM_PTR(&pin_PC15) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_ESP01_CH_PD), MP_ROM_PTR(&pin_PC15) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUX_8), MP_ROM_PTR(&pin_PA16) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUX_UART_RX), MP_ROM_PTR(&pin_PA16) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUX_SPI_SCK), MP_ROM_PTR(&pin_PA16) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUX_I2C_SCL), MP_ROM_PTR(&pin_PA16) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_ATW01_SCK), MP_ROM_PTR(&pin_PA16) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_ESP01_RX), MP_ROM_PTR(&pin_PA16) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AUX_9), MP_ROM_PTR(&pin_PA27) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_ATW01_WAKE), MP_ROM_PTR(&pin_PA27) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PB31) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PC16) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PC13) },
|
||||
@ -30,26 +66,10 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PC12) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_DAC0), MP_ROM_PTR(&pin_PA02) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_DAC1), MP_ROM_PTR(&pin_PA05) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_ESP01_EN), MP_ROM_PTR(&pin_PC15) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_E5), MP_ROM_PTR(&pin_PC15) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_ESP01_GPIO0), MP_ROM_PTR(&pin_PA18) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_E3), MP_ROM_PTR(&pin_PA18) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_ESP01_GPIO2), MP_ROM_PTR(&pin_PA19) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_E4), MP_ROM_PTR(&pin_PA19) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_ESP01_RESET), MP_ROM_PTR(&pin_PC14) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_E6), MP_ROM_PTR(&pin_PC14) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_ESP01_RX), MP_ROM_PTR(&pin_PA12) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_UART3_RX), MP_ROM_PTR(&pin_PA12) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_I2C3_SCL), MP_ROM_PTR(&pin_PA12) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_E2), MP_ROM_PTR(&pin_PA12) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_ESP01_TX), MP_ROM_PTR(&pin_PA13) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_UART3_TX), MP_ROM_PTR(&pin_PA13) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_I2C3_SDA), MP_ROM_PTR(&pin_PA13) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_E1), MP_ROM_PTR(&pin_PA13) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_I2C1_SCL), MP_ROM_PTR(&pin_PA16) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA16) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_I2C1_SDA), MP_ROM_PTR(&pin_PA17) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA17) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_I2C1_SCL), MP_ROM_PTR(&pin_PA12) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA12) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_I2C1_SDA), MP_ROM_PTR(&pin_PA13) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA13) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_I2S_FS_0), MP_ROM_PTR(&pin_PA20) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_I2S_MCK_0), MP_ROM_PTR(&pin_PB17) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_I2S_SCK_0), MP_ROM_PTR(&pin_PB16) },
|
||||
@ -65,13 +85,13 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_RS485_RX), MP_ROM_PTR(&pin_PB03) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_RS485_TE), MP_ROM_PTR(&pin_PB00) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_RS485_TX), MP_ROM_PTR(&pin_PB02) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SPI_MISO), MP_ROM_PTR(&pin_PB23) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SPI1_MISO), MP_ROM_PTR(&pin_PB23) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PB23) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SPI_MOSI), MP_ROM_PTR(&pin_PC27) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SPI1_MOSI), MP_ROM_PTR(&pin_PC27) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PC27) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SPI_SCK), MP_ROM_PTR(&pin_PC28) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SPI1_SCK), MP_ROM_PTR(&pin_PC28) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PC28) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SPI_SS), MP_ROM_PTR(&pin_PB22) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SPI1_SS), MP_ROM_PTR(&pin_PB22) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SS), MP_ROM_PTR(&pin_PB22) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_UART1_CTS), MP_ROM_PTR(&pin_PC25) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_UART1_RTS), MP_ROM_PTR(&pin_PC24) },
|
||||
|
Loading…
Reference in New Issue
Block a user