|
23 | 23 | #define MICROPY_HW_CLK_PLLQ (7) |
24 | 24 |
|
25 | 25 | // UART config |
| 26 | +#if 0 |
| 27 | +// A9 is used for USB VBUS detect, and A10 is used for USB_FS_ID. |
| 28 | +// UART1 is also on PB6/7 but PB6 is tied to the Audio SCL line. |
| 29 | +// Without board modifications, this makes UART1 unusable on this board. |
26 | 30 | #define MICROPY_HW_UART1_PORT (GPIOA) |
27 | 31 | #define MICROPY_HW_UART1_PINS (GPIO_PIN_9 | GPIO_PIN_10) |
| 32 | +#endif |
| 33 | + |
28 | 34 | #define MICROPY_HW_UART2_PORT (GPIOA) |
29 | 35 | #define MICROPY_HW_UART2_PINS (GPIO_PIN_2 | GPIO_PIN_3) |
30 | 36 | #define MICROPY_HW_UART2_RTS (GPIO_PIN_1) |
31 | 37 | #define MICROPY_HW_UART2_CTS (GPIO_PIN_0) |
| 38 | + |
32 | 39 | #define MICROPY_HW_UART3_PORT (GPIOD) |
33 | 40 | #define MICROPY_HW_UART3_PINS (GPIO_PIN_8 | GPIO_PIN_9) |
34 | 41 | #define MICROPY_HW_UART3_RTS (GPIO_PIN_12) |
35 | 42 | #define MICROPY_HW_UART3_CTS (GPIO_PIN_11) |
| 43 | + |
| 44 | +#if MICROPY_HW_HAS_SWITCH == 0 |
| 45 | +// NOTE: A0 also connects to the user switch. To use UART4 you should |
| 46 | +// set MICROPY_HW_HAS_SWITCH to 0, and also remove SB20 (on the back |
| 47 | +// of the board near the USER switch). |
36 | 48 | #define MICROPY_HW_UART4_PORT (GPIOA) |
37 | 49 | #define MICROPY_HW_UART4_PINS (GPIO_PIN_0 | GPIO_PIN_1) |
| 50 | +#endif |
| 51 | + |
| 52 | +// NOTE: PC7 is connected to MCLK on the Audio chip. This is an input signal |
| 53 | +// so I think as long as you're not using the audio chip then it should |
| 54 | +// be fine to use as a UART pin. |
38 | 55 | #define MICROPY_HW_UART6_PORT (GPIOC) |
39 | 56 | #define MICROPY_HW_UART6_PINS (GPIO_PIN_6 | GPIO_PIN_7) |
40 | 57 |
|
|
0 commit comments