Skip to content

Commit 2a58aa3

Browse files
committed
Define SPI pins for NUCLEO_F429ZI.
This is required for testing.
1 parent 30ad0e5 commit 2a58aa3

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F429xI/TARGET_NUCLEO_F429ZI/PeripheralNames.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ typedef enum {
6666
SPI_5 = (int)SPI5_BASE,
6767
SPI_6 = (int)SPI6_BASE
6868
} SPIName;
69+
/* Specify master/slave SPI interfaces for testing purposes. */
70+
#define SPI_TEST_MASTER SPI_1
71+
#define SPI_TEST_SLAVE SPI_4
72+
#define SPI_TEST_MASTER_PIN(SPI_PIN) SPI_1##_##SPI_PIN
73+
#define SPI_TEST_SLAVE_PIN(SPI_PIN) SPI_4##_##SPI_PIN
6974

7075
typedef enum {
7176
I2C_1 = (int)I2C1_BASE,

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F429xI/TARGET_NUCLEO_F429ZI/PinNames.h

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,12 +269,17 @@ typedef enum {
269269
USBRX = STDIO_UART_RX, // Virtual Com Port
270270
I2C_SCL = D15,
271271
I2C_SDA = D14,
272-
SPI_MOSI = D11,
273-
SPI_MISO = D12,
274-
SPI_SCK = D13,
275-
SPI_CS = D10,
276272
PWM_OUT = D9,
277273

274+
SPI_1_MOSI = PB_5,
275+
SPI_1_MISO = PA_6,
276+
SPI_1_SCK = PA_5,
277+
SPI_1_CS = PA_4,
278+
SPI_4_MOSI = PE_6,
279+
SPI_4_MISO = PE_5,
280+
SPI_4_SCK = PE_2,
281+
SPI_4_CS = PE_4,
282+
278283
/**** USB pins ****/
279284
USB_OTG_FS_DM = PA_11,
280285
USB_OTG_FS_DP = PA_12,

0 commit comments

Comments
 (0)