Merge pull request #2269 from theacodes/add-winterbloom-sol
Add board configuration for Winterbloom Sol
This commit is contained in:
commit
01bf932169
1
.github/workflows/build.yml
vendored
1
.github/workflows/build.yml
vendored
@ -158,6 +158,7 @@ jobs:
|
||||
- "trinket_m0_haxpress"
|
||||
- "uchip"
|
||||
- "ugame10"
|
||||
- "winterbloom_sol"
|
||||
|
||||
steps:
|
||||
- name: Set up Python 3.5
|
||||
|
38
ports/atmel-samd/boards/winterbloom_sol/board.c
Normal file
38
ports/atmel-samd/boards/winterbloom_sol/board.c
Normal file
@ -0,0 +1,38 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
|
||||
void board_init(void) {
|
||||
}
|
||||
|
||||
bool board_requests_safe_mode(void) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void reset_board(void) {
|
||||
}
|
33
ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.h
Normal file
33
ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.h
Normal file
@ -0,0 +1,33 @@
|
||||
#define MICROPY_HW_BOARD_NAME "Winterbloom Sol"
|
||||
#define MICROPY_HW_MCU_NAME "samd51j20"
|
||||
|
||||
#define CIRCUITPY_MCU_FAMILY samd51
|
||||
|
||||
#define MICROPY_HW_LED_STATUS (&pin_PA23)
|
||||
#define MICROPY_HW_NEOPIXEL (&pin_PB03)
|
||||
|
||||
// These are pins not to reset.
|
||||
// QSPI Data pins
|
||||
#define MICROPY_PORT_A (PORT_PA08 | PORT_PA09 | PORT_PA10 | PORT_PA11)
|
||||
// QSPI CS, QSPI SCK and NeoPixel pin
|
||||
#define MICROPY_PORT_B (PORT_PB03 | PORT_PB10 | PORT_PB11)
|
||||
#define MICROPY_PORT_C (0)
|
||||
#define MICROPY_PORT_D (0)
|
||||
|
||||
#define AUTORESET_DELAY_MS 500
|
||||
|
||||
// If you change this, then make sure to update the linker scripts as well to
|
||||
// make sure you don't overwrite code
|
||||
#define CIRCUITPY_INTERNAL_NVM_SIZE 8192
|
||||
|
||||
#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE)
|
||||
|
||||
#define BOARD_HAS_CRYSTAL 1
|
||||
|
||||
#define DEFAULT_SPI_BUS_SCK (&pin_PA17)
|
||||
#define DEFAULT_SPI_BUS_MOSI (&pin_PB23)
|
||||
#define DEFAULT_SPI_BUS_MISO (&pin_PB22)
|
||||
|
||||
// USB is always used internally so skip the pin objects for it.
|
||||
#define IGNORE_PIN_PA24 1
|
||||
#define IGNORE_PIN_PA25 1
|
27
ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.mk
Normal file
27
ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.mk
Normal file
@ -0,0 +1,27 @@
|
||||
LD_FILE = boards/samd51x20-bootloader-external-flash.ld
|
||||
# Adafruit
|
||||
USB_VID = 0x239A
|
||||
# Allocated for Winterbloom Sol
|
||||
# https://github.com/adafruit/circuitpython/issues/2217
|
||||
USB_PID = 0x8062
|
||||
USB_PRODUCT = "Sol"
|
||||
USB_MANUFACTURER = "Winterbloom"
|
||||
|
||||
CHIP_VARIANT = SAMD51J20A
|
||||
CHIP_FAMILY = samd51
|
||||
|
||||
QSPI_FLASH_FILESYSTEM = 1
|
||||
EXTERNAL_FLASH_DEVICE_COUNT = 1
|
||||
EXTERNAL_FLASH_DEVICES = W25Q32JV_IQ
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
# Disable modules that are unusable on this special-purpose board.
|
||||
CIRCUITPY_AUDIOBUSIO = 0
|
||||
CIRCUITPY_AUDIOIO = 0
|
||||
CIRCUITPY_BLEIO = 0
|
||||
CIRCUITPY_DISPLAYIO = 0
|
||||
CIRCUITPY_GAMEPAD = 0
|
||||
CIRCUITPY_I2CSLAVE = 0
|
||||
CIRCUITPY_NETWORK = 0
|
||||
CIRCUITPY_TOUCHIO = 0
|
||||
CIRCUITPY_PS2IO = 0
|
15
ports/atmel-samd/boards/winterbloom_sol/pins.c
Normal file
15
ports/atmel-samd/boards/winterbloom_sol/pins.c
Normal file
@ -0,0 +1,15 @@
|
||||
#include "shared-bindings/board/__init__.h"
|
||||
|
||||
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA17) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB23) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PB22) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_DAC_CS), MP_ROM_PTR(&pin_PA18) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_G1), MP_ROM_PTR(&pin_PA20) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_G2), MP_ROM_PTR(&pin_PA21) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_G3), MP_ROM_PTR(&pin_PA22) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_G4), MP_ROM_PTR(&pin_PA23) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PB03) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
|
||||
};
|
||||
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
|
@ -300,6 +300,23 @@ typedef struct {
|
||||
.write_status_register_split = false, \
|
||||
}
|
||||
|
||||
// Settings for the Winbond W25Q32JV-IQ 4MiB SPI flash.
|
||||
// Datasheet: https://www.mouser.com/datasheet/2/949/w25q32jv_revg_03272018_plus-1489806.pdf
|
||||
#define W25Q32JV_IQ {\
|
||||
.total_size = (1 << 22), /* 4 MiB */ \
|
||||
.start_up_time_us = 5000, \
|
||||
.manufacturer_id = 0xef, \
|
||||
.memory_type = 0x40, \
|
||||
.capacity = 0x16, \
|
||||
.max_clock_speed_mhz = 133, \
|
||||
.quad_enable_bit_mask = 0x02, \
|
||||
.has_sector_protection = false, \
|
||||
.supports_fast_read = true, \
|
||||
.supports_qspi = true, \
|
||||
.supports_qspi_writes = true, \
|
||||
.write_status_register_split = false, \
|
||||
}
|
||||
|
||||
// Settings for the Winbond W25Q64JV-IM 8MiB SPI flash. Note that JV-IQ has a different .memory_type (0x40)
|
||||
// Datasheet: http://www.winbond.com/resource-files/w25q64jv%20revj%2003272018%20plus.pdf
|
||||
#define W25Q64JV_IM {\
|
||||
|
Loading…
Reference in New Issue
Block a user