Skip to content

Commit f326cf1

Browse files
committed
feat(xiao): enable SPI3 pin mapping
1 parent af81304 commit f326cf1

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎variants/STM32C5xx/C593C(E-G)(T-U)_C5A3CG(T-U)/variant_XIAO_STM32C5.cpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ const PinName digitalPin[] = {
1515
PB_6, // D5 / I2C1_SCL
1616
PA_9, // D6 / USART1_TX
1717
PA_10, // D7 / USART1_RX
18-
PA_15, // D8
19-
PB_0, // D9
20-
PB_15, // D10
18+
PE_2, // D8 / SPI3_SCK
19+
PB_0, // D9 / SPI3_MISO
20+
PB_15, // D10 / SPI3_MOSI
2121
PB_8, // D11 / FDCAN1_RX
2222
PB_9, // D12 / FDCAN1_TX
2323
PB_5, // D13 / FDCAN2_RX

‎variants/STM32C5xx/C593C(E-G)(T-U)_C5A3CG(T-U)/variant_XIAO_STM32C5.h‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#define PB6 5
1414
#define PA9 6
1515
#define PA10 7
16-
#define PA15 8
16+
#define PE2 8
1717
#define PB0 9
1818
#define PB15 10
1919
#define PB8 11
@@ -36,15 +36,15 @@
3636
#define LED_BUILTIN PB12
3737
#endif
3838

39-
/* SPI is intentionally not advertised until the connector SPI route is fixed
40-
* and validated on production hardware. */
39+
/* SPI3: D8/SCK (PE2), D9/MISO (PB0), D10/MOSI (PB15).
40+
* No board-default chip-select is assigned; sketches control device CS. */
4141
#define PIN_SPI_SS NUM_DIGITAL_PINS
4242
#define PIN_SPI_SS1 NUM_DIGITAL_PINS
4343
#define PIN_SPI_SS2 NUM_DIGITAL_PINS
4444
#define PIN_SPI_SS3 NUM_DIGITAL_PINS
45-
#define PIN_SPI_MOSI NUM_DIGITAL_PINS
46-
#define PIN_SPI_MISO NUM_DIGITAL_PINS
47-
#define PIN_SPI_SCK NUM_DIGITAL_PINS
45+
#define PIN_SPI_MOSI PB15
46+
#define PIN_SPI_MISO PB0
47+
#define PIN_SPI_SCK PE2
4848

4949
#define PIN_WIRE_SDA PB7
5050
#define PIN_WIRE_SCL PB6

0 commit comments

Comments
 (0)