|
10 | 10 | // Clock rates are off: Salae reads 12MHz which is the limit even though we set it to the safer 8MHz. |
11 | 11 | #define SPI_FLASH_BAUDRATE (8000000) |
12 | 12 |
|
13 | | -// |
14 | | -// SPI Flash definitions. The flash SPI MOSI, MISO and SCK need to be on the |
15 | | -// same SERCOM - check the SAMD21 spec to determien which SERCOM to use |
16 | | -// (post PINs have 2 SERCOMS to work with) |
17 | | -// |
18 | 13 | #define SPI_FLASH_MOSI_PIN &pin_PB22 |
19 | 14 | #define SPI_FLASH_MISO_PIN &pin_PB03 |
20 | 15 | #define SPI_FLASH_SCK_PIN &pin_PB23 |
21 | 16 | #define SPI_FLASH_CS_PIN &pin_PA13 |
22 | 17 |
|
23 | | - |
24 | | -// #define SPI_FLASH_MOSI_PIN_FUNCTION PINMUX_PB22D_SERCOM5_PAD2 |
25 | | -// #define SPI_FLASH_MISO_PIN_FUNCTION PINMUX_PB03D_SERCOM5_PAD1 |
26 | | -// #define SPI_FLASH_SCK_PIN_FUNCTION PINMUX_PB23D_SERCOM5_PAD3 |
27 | | -// #define SPI_FLASH_SERCOM SERCOM5 |
28 | | -// #define SPI_FLASH_SERCOM_INDEX 5 |
29 | | -// #define SPI_FLASH_MOSI_PAD 2 |
30 | | -// #define SPI_FLASH_MISO_PAD 1 |
31 | | -// #define SPI_FLASH_SCK_PAD 3 |
32 | | - |
33 | | - |
34 | | -// // <o> Transmit Data Pinout |
35 | | - |
36 | | -// // |
37 | | -// // The logic for DOPO and DIPO is the following |
38 | | -// // In master SPI operation |
39 | | -// // DIPO <pad #> = MISO |
40 | | -// // DOPO - Based on the below table, where |
41 | | -// // <DOPO> = [MOSI PAD, SCK PAD] |
42 | | -// // <0x0> = PAD[0,1] |
43 | | -// // <0x1> = PAD[2,3] |
44 | | -// // <0x2> = PAD[3,1] |
45 | | -// // <0x3> = PAD[0,3] |
46 | | -// // |
47 | | -// /// For the RedBoard Turbo Board DOPO [2,3] => 1 |
48 | | -// #define SPI_FLASH_DOPO 1 |
49 | | -// #define SPI_FLASH_DIPO 1 // same as MISO pad |
50 | | - |
51 | | -// These are pins not to reset. |
52 | | -// This map to the pins as defined above for FLASH. Note the PORT letters - assign A-to-A, B-to-B ..etc |
53 | | -// PA24 and PA25 are for USB |
54 | | - |
55 | 18 | #define MICROPY_PORT_A ( 0 ) |
56 | 19 | #define MICROPY_PORT_B ( 0 ) |
57 | 20 | #define MICROPY_PORT_C ( 0 ) |
|
63 | 26 |
|
64 | 27 | #define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - CIRCUITPY_INTERNAL_NVM_SIZE) |
65 | 28 |
|
66 | | - |
67 | | -// What external flash device is being used on this board? |
68 | | -// The devices are defined in "exteral_flash/devices.h", which |
69 | | -// contains a flash struct def and a list of #defines for each |
70 | | -// supported/defined flash module. |
71 | | -// |
72 | | -// This board - the LUMIDrive - uses a W25Q32FV component. It's |
73 | | -// definition was added to devices.h, based on the winbond spec sheet. |
74 | | -// |
75 | | -// You can list N number of devices - just update the count define and comma |
76 | | -// seperate the EXTERNAL_FLASH_DEVICES list of devices. |
77 | | - |
78 | | -// #define EXTERNAL_FLASH_DEVICE_COUNT 1 |
79 | | -// #define EXTERNAL_FLASH_DEVICES W25Q32FV |
80 | | - |
81 | | - |
82 | 29 | #define BOARD_HAS_CRYSTAL 1 |
83 | 30 |
|
84 | 31 |
|
|
0 commit comments