Skip to content

Commit 01dce88

Browse files
committed
Define SPI pins for K66F.
Required for testing.
1 parent 450ebf9 commit 01dce88

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_K66F/TARGET_FRDM/PeripheralNames.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,19 @@ typedef enum {
124124
DAC_0 = 0
125125
} DACName;
126126

127-
128127
#define SPI_COUNT 3
129128
typedef enum {
130129
SPI_0 = 0,
131130
SPI_1 = 1,
132131
SPI_2 = 2,
133132
} SPIName;
134133

134+
/* Specify master/slave interfaces for testing purposes. */
135+
#define SPI_TEST_MASTER SPI_2
136+
#define SPI_TEST_SLAVE SPI_0
137+
#define SPI_TEST_MASTER_PIN(SPI_PIN) SPI_2##_##SPI_PIN
138+
#define SPI_TEST_SLAVE_PIN(SPI_PIN) SPI_0##_##SPI_PIN
139+
135140
#ifdef __cplusplus
136141
}
137142
#endif

targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_K66F/TARGET_FRDM/PinNames.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,26 @@ typedef enum {
232232

233233
I2C_SCL = D15,
234234
I2C_SDA = D14,
235+
236+
/* Note:
237+
This board does not provide SPI MOSI/MISO pins, instead we have SIN/SOUT pins which can be used
238+
as SPI MOSI/MISO lines depending on SPI operation mode(master or slave):
239+
master: SIN ---> MISO
240+
SOUT ---> MOSI
241+
slave: SIN ---> MOSI
242+
SOUT ---> MISO
243+
244+
SPI_0 interface represents SPI pins configuration for slave and SPI_2 respresents spi configuration
245+
for master.
246+
*/
247+
SPI_0_MOSI = PTD3,
248+
SPI_0_MISO = PTD2,
249+
SPI_0_SCK = PTD1,
250+
SPI_0_CS = PTD0,
251+
SPI_2_MOSI = PTD13,
252+
SPI_2_MISO = PTB23,
253+
SPI_2_SCK = PTD12,
254+
SPI_2_CS = PTB20,
235255

236256
A0 = PTB7,
237257
A1 = PTB6,

0 commit comments

Comments
 (0)