Skip to content

Commit 01bf932

Browse files
authored
Merge pull request adafruit#2269 from theacodes/add-winterbloom-sol
Add board configuration for Winterbloom Sol
2 parents 8cd2f87 + 73989db commit 01bf932

File tree

6 files changed

+131
-0
lines changed

6 files changed

+131
-0
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ jobs:
158158
- "trinket_m0_haxpress"
159159
- "uchip"
160160
- "ugame10"
161+
- "winterbloom_sol"
161162

162163
steps:
163164
- name: Set up Python 3.5
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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 "boards/board.h"
28+
#include "mpconfigboard.h"
29+
30+
void board_init(void) {
31+
}
32+
33+
bool board_requests_safe_mode(void) {
34+
return false;
35+
}
36+
37+
void reset_board(void) {
38+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#define MICROPY_HW_BOARD_NAME "Winterbloom Sol"
2+
#define MICROPY_HW_MCU_NAME "samd51j20"
3+
4+
#define CIRCUITPY_MCU_FAMILY samd51
5+
6+
#define MICROPY_HW_LED_STATUS (&pin_PA23)
7+
#define MICROPY_HW_NEOPIXEL (&pin_PB03)
8+
9+
// These are pins not to reset.
10+
// QSPI Data pins
11+
#define MICROPY_PORT_A (PORT_PA08 | PORT_PA09 | PORT_PA10 | PORT_PA11)
12+
// QSPI CS, QSPI SCK and NeoPixel pin
13+
#define MICROPY_PORT_B (PORT_PB03 | PORT_PB10 | PORT_PB11)
14+
#define MICROPY_PORT_C (0)
15+
#define MICROPY_PORT_D (0)
16+
17+
#define AUTORESET_DELAY_MS 500
18+
19+
// If you change this, then make sure to update the linker scripts as well to
20+
// make sure you don't overwrite code
21+
#define CIRCUITPY_INTERNAL_NVM_SIZE 8192
22+
23+
#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE)
24+
25+
#define BOARD_HAS_CRYSTAL 1
26+
27+
#define DEFAULT_SPI_BUS_SCK (&pin_PA17)
28+
#define DEFAULT_SPI_BUS_MOSI (&pin_PB23)
29+
#define DEFAULT_SPI_BUS_MISO (&pin_PB22)
30+
31+
// USB is always used internally so skip the pin objects for it.
32+
#define IGNORE_PIN_PA24 1
33+
#define IGNORE_PIN_PA25 1
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
LD_FILE = boards/samd51x20-bootloader-external-flash.ld
2+
# Adafruit
3+
USB_VID = 0x239A
4+
# Allocated for Winterbloom Sol
5+
# https://github.com/adafruit/circuitpython/issues/2217
6+
USB_PID = 0x8062
7+
USB_PRODUCT = "Sol"
8+
USB_MANUFACTURER = "Winterbloom"
9+
10+
CHIP_VARIANT = SAMD51J20A
11+
CHIP_FAMILY = samd51
12+
13+
QSPI_FLASH_FILESYSTEM = 1
14+
EXTERNAL_FLASH_DEVICE_COUNT = 1
15+
EXTERNAL_FLASH_DEVICES = W25Q32JV_IQ
16+
LONGINT_IMPL = MPZ
17+
18+
# Disable modules that are unusable on this special-purpose board.
19+
CIRCUITPY_AUDIOBUSIO = 0
20+
CIRCUITPY_AUDIOIO = 0
21+
CIRCUITPY_BLEIO = 0
22+
CIRCUITPY_DISPLAYIO = 0
23+
CIRCUITPY_GAMEPAD = 0
24+
CIRCUITPY_I2CSLAVE = 0
25+
CIRCUITPY_NETWORK = 0
26+
CIRCUITPY_TOUCHIO = 0
27+
CIRCUITPY_PS2IO = 0
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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_SCK), MP_ROM_PTR(&pin_PA17) },
5+
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB23) },
6+
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PB22) },
7+
{ MP_ROM_QSTR(MP_QSTR_DAC_CS), MP_ROM_PTR(&pin_PA18) },
8+
{ MP_ROM_QSTR(MP_QSTR_G1), MP_ROM_PTR(&pin_PA20) },
9+
{ MP_ROM_QSTR(MP_QSTR_G2), MP_ROM_PTR(&pin_PA21) },
10+
{ MP_ROM_QSTR(MP_QSTR_G3), MP_ROM_PTR(&pin_PA22) },
11+
{ MP_ROM_QSTR(MP_QSTR_G4), MP_ROM_PTR(&pin_PA23) },
12+
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PB03) },
13+
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
14+
};
15+
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);

supervisor/shared/external_flash/devices.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,23 @@ typedef struct {
300300
.write_status_register_split = false, \
301301
}
302302

303+
// Settings for the Winbond W25Q32JV-IQ 4MiB SPI flash.
304+
// Datasheet: https://www.mouser.com/datasheet/2/949/w25q32jv_revg_03272018_plus-1489806.pdf
305+
#define W25Q32JV_IQ {\
306+
.total_size = (1 << 22), /* 4 MiB */ \
307+
.start_up_time_us = 5000, \
308+
.manufacturer_id = 0xef, \
309+
.memory_type = 0x40, \
310+
.capacity = 0x16, \
311+
.max_clock_speed_mhz = 133, \
312+
.quad_enable_bit_mask = 0x02, \
313+
.has_sector_protection = false, \
314+
.supports_fast_read = true, \
315+
.supports_qspi = true, \
316+
.supports_qspi_writes = true, \
317+
.write_status_register_split = false, \
318+
}
319+
303320
// Settings for the Winbond W25Q64JV-IM 8MiB SPI flash. Note that JV-IQ has a different .memory_type (0x40)
304321
// Datasheet: http://www.winbond.com/resource-files/w25q64jv%20revj%2003272018%20plus.pdf
305322
#define W25Q64JV_IM {\

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy