8000 boards/bdmicro_vina_d51: Replace old rev with new rev and rename. · adafruit/circuitpython@8544249 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8544249

Browse files
committed
boards/bdmicro_vina_d51: Replace old rev with new rev and rename.
This update to the PR retains the earlier board rev (with a rename) so that backward binary compatibility is not lost for the earlier board revision. The primary name 'vina-d51' is retained for the latest revision to make it easy for customers to select the proper UF2 download - because the name matches the commercial name. Details: Replace bdmicro_vina_d51 with bdmicro_vina_d51_pcb7 (revision 7 of PCB) with boardfiles unmodified. Add _pcb7 to the workflow build. Replace bdmicro_vina_d51 boardfile content with latest PCB updates (revision 10 ov PCB). Add minimal comments in the board files to make it clear which PCB revision is implemented. Update the USB PID to reflect an updated board revision.
1 parent 3e558a8 commit 8544249

File tree

8 files changed

+187
-1
lines changed

8 files changed

+187
-1
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ jobs:
190190
- "bastble"
191191
- "bdmicro_vina_d21"
192192
- "bdmicro_vina_d51"
193+
- "bdmicro_vina_d51_pcb7"
193194
- "bless_dev_board_multi_sensor"
194195
- "blm_badge"
195196
- "capablerobot_usbhub"

ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// More than one revision of this board is available.
2+
// This board specifies PCB Revision 10
3+
14
#define MICROPY_HW_BOARD_NAME "BDMICRO VINA-D51"
25
#define MICROPY_HW_MCU_NAME "samd51n20"
36

ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.mk

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
# More than one revision of this board is available.
2+
# This board specifies PCB Revision 10
3+
14
USB_VID = 0x31e2
2-
USB_PID = 0x2011
5+
USB_PID = 0x2021
36
USB_PRODUCT = "VINA-D51"
47
USB_MANUFACTURER = "BDMICRO LLC"
58

ports/atmel-samd/boards/bdmicro_vina_d51/pins.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// More than one revision of this board is available.
2+
// This board specifies PCB Revision 10
3+
14
#include "shared-bindings/board/__init__.h"
25

36
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/*
2+
* This file is part of the MicroPython project, http://micropython.org/
3+
*
4+
* The MIT License (MIT)
5+
*
6+
* Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
7+
*
8+
* Permission is hereby granted, free of charge, to any person obtaining a copy
9+
* of this software and associated documentation files (the "Software"), to deal
10+
* in the Software without restriction, including without limitation the rights
11+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+
* copies of the Software, and to permit persons to whom the Software is
13+
* furnished to do so, subject to the following conditions:
14+
*
15+
* The above copyright notice and this permission notice shall be included in
16+
* all copies or substantial portions of the Software.
17+
*
18+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24+
* THE SOFTWARE.
25+
*/
26+
27+
#include "supervisor/board.h"
28+
#include "mpconfigboard.h"
29+
30+
void board_init(void) {
31+
// struct port_config pin_conf;
32+
// port_get_config_defaults(&pin_conf);
33+
//
34+
// pin_conf.direction = PORT_PIN_DIR_OUTPUT;
35+
// port_pin_set_config(MICROPY_HW_LED_TX, &pin_conf);
36+
// port_pin_set_output_level(MICROPY_HW_LED_TX, true);
37+
//
38+
// port_pin_set_config(MICROPY_HW_LED_RX, &pin_conf);
39+
// port_pin_set_output_level(MICROPY_HW_LED_RX, true);
40+
}
41+
42+
bool board_requests_safe_mode(void) {
43+
return false;
44+
}
45+
46+
void reset_board(void) {
47+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#define MICROPY_HW_BOARD_NAME "BDMICRO VINA-D51"
2+
#define MICROPY_HW_MCU_NAME "samd51n20"
3+
4+
#define CIRCUITPY_MCU_FAMILY samd51
5+
6+
// These are pins not to reset.
7+
// Don't reset QSPI data pins
8+
#define MICROPY_PORT_A (PORT_PA08 | PORT_PA09 | PORT_PA10 | PORT_PA11)
9+
#define MICROPY_PORT_B (PORT_PB10 | PORT_PB11)
10+
#define MICROPY_PORT_C (0)
11+
#define MICROPY_PORT_D (0)
12+
13+
#define BOARD_HAS_CRYSTAL 1
14+
15+
#define DEFAULT_I2C_BUS_SCL (&pin_PA16)
16+
#define DEFAULT_I2C_BUS_SDA (&pin_PA17)
17+
#define DEFAULT_UART_BUS_RX (&pin_PB20)
18+
#define DEFAULT_UART_BUS_TX (&pin_PB21)
19+
#define DEFAULT_SPI_BUS_MISO (&pin_PB23)
20+
#define DEFAULT_SPI_BUS_MOSI (&pin_PC27)
21+
#define DEFAULT_SPI_BUS_SCK (&pin_PC28)
22+
#define MICROPY_HW_LED_STATUS (&pin_PA23)
23+
#define MICROPY_HW_LED_RX (&pin_PC05)
24+
#define MICROPY_HW_LED_TX (&pin_PC06)
25+
26+
// USB is always used internally so skip the pin objects for it.
27+
#define IGNORE_PIN_PA24 1
28+
#define IGNORE_PIN_PA25 1
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
USB_VID = 0x31e2
2+
USB_PID = 0x2011
3+
USB_PRODUCT = "VINA-D51"
4+
USB_MANUFACTURER = "BDMICRO LLC"
5+
6+
CHIP_VARIANT = SAMD51N20A
7+
CHIP_FAMILY = samd51
8+
9+
QSPI_FLASH_FILESYSTEM = 1
10+
EXTERNAL_FLASH_DEVICES = "MX25L51245G","GD25S512MD"
11+
LONGINT_IMPL = MPZ
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
#include "shared-bindings/board/__init__.h"
2+
3+
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
4+
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA04) },
5+
{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA06) },
6+
{ MP_ROM_QSTR(MP_QSTR_A10), MP_ROM_PTR(&pin_PB07) },
7+
{ MP_ROM_QSTR(MP_QSTR_A11), MP_ROM_PTR(&pin_PC00) },
8+
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA07) },
9+
{ MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PB08) },
10+
{ MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PB09) },
11+
{ MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PC02) },
12+
{ MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_PC03) },
13+
{ MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_PB04) },
14+
{ MP_ROM_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_PB05) },
15+
{ MP_ROM_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_PB06) },
16+
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PB31) },
17+
{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PC16) },
18+
{ MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PC13) },
19+
{ MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA14) },
20+
{ MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA15) },
21+
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PB12) },
22+
{ MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PB13) },
23+
{ MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PC17) },
24+
{ MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PC18) },
25+
{ MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PC19) },
26+
{ MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PC20) },
27+
{ MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PC21) },
28+
{ MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PB18) },
29+
{ MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PB19) },
30+
{ MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PC12) },
31+
{ MP_ROM_QSTR(MP_QSTR_DAC0), MP_ROM_PTR(&pin_PA02) },
32+
{ MP_ROM_QSTR(MP_QSTR_DAC1), MP_ROM_PTR(&pin_PA05) },
33+
{ MP_ROM_QSTR(MP_QSTR_ESP01_EN), MP_ROM_PTR(&pin_PC15) },
34+
{ MP_ROM_QSTR(MP_QSTR_E5), MP_ROM_PTR(&pin_PC15) },
35+
{ MP_ROM_QSTR(MP_QSTR_ESP01_GPIO0), MP_ROM_PTR(&pin_PA18) },
36+
{ MP_ROM_QSTR(MP_QSTR_E3), MP_ROM_PTR(&pin_PA18) },
37+
{ MP_ROM_QSTR(MP_QSTR_ESP01_GPIO2), MP_ROM_PTR(&pin_PA19) },
38+
{ MP_ROM_QSTR(MP_QSTR_E4), MP_ROM_PTR(&pin_PA19) },
39+
{ MP_ROM_QSTR(MP_QSTR_ESP01_RESET), MP_ROM_PTR(&pin_PC14) },
40+
{ MP_ROM_QSTR(MP_QSTR_E6), MP_ROM_PTR(&pin_PC14) },
41+
{ MP_ROM_QSTR(MP_QSTR_ESP01_RX), MP_ROM_PTR(&pin_PA12) },
42+
{ MP_ROM_QSTR(MP_QSTR_UART3_RX), MP_ROM_PTR(&pin_PA12) },
43+
{ MP_ROM_QSTR(MP_QSTR_I2C3_SCL), MP_ROM_PTR(&pin_PA12) },
44+
{ MP_ROM_QSTR(MP_QSTR_E2), MP_ROM_PTR(&pin_PA12) },
45+
{ MP_ROM_QSTR(MP_QSTR_ESP01_TX), MP_ROM_PTR(&pin_PA13) },
46+
{ MP_ROM_QSTR(MP_QSTR_UART3_TX), MP_ROM_PTR(&pin_PA13) },
47+
{ MP_ROM_QSTR(MP_QSTR_I2C3_SDA), MP_ROM_PTR(&pin_PA13) },
48+
{ MP_ROM_QSTR(MP_QSTR_E1), MP_ROM_PTR(&pin_PA13) },
49+
{ MP_ROM_QSTR(MP_QSTR_I2C1_SCL), MP_ROM_PTR(&pin_PA16) },
50+
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA16) },
51+
{ MP_ROM_QSTR(MP_QSTR_I2C1_SDA), MP_ROM_PTR(&pin_PA17) },
52+
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA17) },
53+
{ MP_ROM_QSTR(MP_QSTR_I2S_FS_0< 1C6A /span>), MP_ROM_PTR(&pin_PA20) },
54+
{ MP_ROM_QSTR(MP_QSTR_I2S_MCK_0), MP_ROM_PTR(&pin_PB17) },
55+
{ MP_ROM_QSTR(MP_QSTR_I2S_SCK_0), MP_ROM_PTR(&pin_PB16) },
56+
{ MP_ROM_QSTR(MP_QSTR_I2S_SDI), MP_ROM_PTR(&pin_PA22) },
57+
{ MP_ROM_QSTR(MP_QSTR_I2S_SDO), MP_ROM_PTR(&pin_PA21) },
58+
{ MP_ROM_QSTR(MP_QSTR_LED_B), MP_ROM_PTR(&pin_PA23) },
59+
{ MP_ROM_QSTR(MP_QSTR_LED_STATUS), MP_ROM_PTR(&pin_PA23) },
60+
{ MP_ROM_QSTR(MP_QSTR_LED_G), MP_ROM_PTR(&pin_PB15) },
61+
{ MP_ROM_QSTR(MP_QSTR_LED_R), MP_ROM_PTR(&pin_PB14) },
62+
{ MP_ROM_QSTR(MP_QSTR_LED_RX), MP_ROM_PTR(&pin_PC05) },
63+
{ MP_ROM_QSTR(MP_QSTR_LED_TX), MP_ROM_PTR(&pin_PC06) },
64+
{ MP_ROM_QSTR(MP_QSTR_RS485_RE), MP_ROM_PTR(&pin_PB01) },
65+
{ MP_ROM_QSTR(MP_QSTR_RS485_RX), MP_ROM_PTR(&pin_PB03) },
66+
{ MP_ROM_QSTR(MP_QSTR_RS485_TE), MP_ROM_PTR(&pin_PB00) },
67+
{ MP_ROM_QSTR(MP_QSTR_RS485_TX), MP_ROM_PTR(&pin_PB02) },
68+
{ MP_ROM_QSTR(MP_QSTR_SPI_MISO), MP_ROM_PTR(&pin_PB23) },
69+
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PB23) },
70+
{ MP_ROM_QSTR(MP_QSTR_SPI_MOSI), MP_ROM_PTR(&pin_PC27) },
71+
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PC27) },
72+
{ MP_ROM_QSTR(MP_QSTR_SPI_SCK), MP_ROM_PTR(&pin_PC28) },
73+
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PC28) },
74+
{ MP_ROM_QSTR(MP_QSTR_SPI_SS), MP_ROM_PTR(&pin_PB22) },
75+
{ MP_ROM_QSTR(MP_QSTR_SS), MP_ROM_PTR(&pin_PB22) },
76+
{ MP_ROM_QSTR(MP_QSTR_UART1_CTS), MP_ROM_PTR(&pin_PC25) },
77+
{ MP_ROM_QSTR(MP_QSTR_UART1_RTS), MP_ROM_PTR(&pin_PC24) },
78+
{ MP_ROM_QSTR(MP_QSTR_UART1_RX), MP_ROM_PTR(&pin_PB24) },
79+
{ MP_ROM_QSTR(MP_QSTR_UART1_TX), MP_ROM_PTR(&pin_PB25) },
80+
{ MP_ROM_QSTR(MP_QSTR_UART2_RX), MP_ROM_PTR(&pin_PB20) },
81+
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB20) },
82+
{ MP_ROM_QSTR(MP_QSTR_I2C2_SCL), MP_ROM_PTR(&pin_PB20) },
83+
{ MP_ROM_QSTR(MP_QSTR_UART2_TX), MP_ROM_PTR(&pin_PB21) },
84+
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB21) },
85+
{ MP_ROM_QSTR(MP_QSTR_I2C2_SDA), MP_ROM_PTR(&pin_PB21) },
86+
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
87+
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
88+
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
89+
};
90+
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);

0 commit comments

Comments
 (0)
0