Skip to content

Commit 111cad5

Browse files
committed
Merge pull request #175 from sg-/FRDM-fix
Frdm fix
2 parents 8583716 + be8cccd commit 111cad5

File tree

3 files changed

+43
-23
lines changed

3 files changed

+43
-23
lines changed

libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL05Z/PeripheralPins.c

Lines changed: 33 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,22 @@ const PinMap PinMap_RTC[] = {
2323

2424
/************ADC***************/
2525
const PinMap PinMap_ADC[] = {
26-
/* A0-A5 pins */
2726
{PTA0, ADC0_SE12, 0},
27+
{PTA7, ADC0_SE7, 0},
2828
{PTA8, ADC0_SE3, 0},
2929
{PTA9, ADC0_SE2, 0},
30+
{PTA12, ADC0_SE0, 0},
31+
32+
{PTB0, ADC0_SE6, 0},
33+
{PTB1, ADC0_SE5, 0},
34+
{PTB2, ADC0_SE4, 0},
35+
{PTB5, ADC0_SE1, 0},
3036
{PTB8, ADC0_SE11, 0},
3137
{PTB9, ADC0_SE10, 0},
38+
{PTB10, ADC0_SE9, 0},
39+
{PTB11, ADC0_SE8, 0},
3240
{PTB13, ADC0_SE13, 0},
33-
/* Rest of pins ADC Mux */
34-
{PTB2, ADC0_SE4, 0},
35-
{PTB1, ADC0_SE5, 0},
36-
{PTB5, ADC0_SE1, 0},
37-
{PTA12, ADC0_SE0, 0},
38-
{PTB10, ADC0_SE9, 0},
39-
{PTB11, ADC0_SE8, 0},
40-
{PTB7, ADC0_SE7, 0},
41-
{PTB0, ADC0_SE6, 0},
42-
{NC, NC, 0}
41+
{NC, NC, 0}
4342
};
4443

4544
/************DAC***************/
@@ -50,44 +49,59 @@ const PinMap PinMap_DAC[] = {
5049

5150
/************I2C***************/
5251
const PinMap PinMap_I2C_SDA[] = {
52+
{PTA3, I2C_0, 3},
53+
{PTA4, I2C_0, 2},
5354
{PTB4, I2C_0, 2},
5455
{NC , NC , 0}
5556
};
5657

5758
const PinMap PinMap_I2C_SCL[] = {
59+
{PTA3, I2C_0, 2},
60+
{PTA4, I2C_0, 3},
5861
{PTB3, I2C_0, 2},
5962
{NC , NC , 0}
6063
};
6164
/************UART***************/
6265
const PinMap PinMap_UART_TX[] = {
6366
{PTB1, UART_0, 2},
67+
{PTB2, UART_0, 3},
68+
{PTB3, UART_0, 3},
6469
{NC , NC , 0}
6570
};
6671

6772
const PinMap PinMap_UART_RX[] = {
73+
{PTB1, UART_0, 3},
6874
{PTB2, UART_0, 2},
75+
{PTB4, UART_0, 3},
6976
{NC , NC , 0}
7077
};
7178

7279
/************SPI***************/
7380
const PinMap PinMap_SPI_SCLK[] = {
74-
{PTB0, SPI_0, 3},
75-
{NC , NC , 0}
81+
{PTB0, SPI_0, 3},
82+
{PTB17, SPI_0, 3},
83+
{NC , NC , 0}
7684
};
7785

7886
const PinMap PinMap_SPI_MOSI[] = {
79-
{PTA7, SPI_0, 3},
80-
{NC , NC , 0}
87+
{PTA7 , SPI_0, 3},
88+
{PTB15, SPI_0, 2},
89+
{PTB16, SPI_0, 3},
90+
{NC , NC , 0}
8191
};
8292

8393
const PinMap PinMap_SPI_MISO[] = {
84-
{PTA6, SPI_0, 3},
85-
{NC , NC , 0}
94+
{PTA6 , SPI_0, 3},
95+
{PTA7 , SPI_0, 2},
96+
{PTB15, SPI_0, 3},
97+
{PTB16, SPI_0, 2},
98+
{NC , NC , 0}
8699
};
87100

88101
const PinMap PinMap_SPI_SSEL[] = {
89-
{PTA5, SPI_0, 3},
90-
{NC , NC , 0}
102+
{PTA5 , SPI_0, 3},
103+
{PTA19, SPI_0, 3},
104+
{NC , NC , 0}
91105
};
92106

93107
/************PWM***************/

libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL05Z/PinNames.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ typedef enum {
7878
LED_BLUE = PTB10,
7979

8080
// mbed original LED naming
81-
LED1 = LED_BLUE,
81+
LED1 = LED_RED,
8282
LED2 = LED_GREEN,
83-
LED3 = LED_RED,
84-
LED4 = LED_RED,
83+
LED3 = LED_BLUE,
84+
LED4 = LED_BLUE,
8585

8686
// USB Pins
8787
USBTX = PTB1,
@@ -96,7 +96,7 @@ typedef enum {
9696
D5 = PTA12,
9797
D6 = PTB6,
9898
D7 = PTB7,
99-
D8 = PTA10,
99+
D8 = PTB10,
100100
D9 = PTB11,
101101
D10 = PTA5,
102102
D11 = PTA7,
@@ -111,6 +111,9 @@ typedef enum {
111111
A3 = PTA0,
112112
A4 = PTA9,
113113
A5 = PTB13,
114+
115+
I2C_SCL = D15,
116+
I2C_SDA = D14,
114117

115118
// Not connected
116119
NC = (int)0xFFFFFFFF

libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL46Z/PinNames.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,9 @@ typedef enum {
232232
A3 = PTB3,
233233
A4 = PTC2,
234234
A5 = PTC1,
235+
236+
I2C_SCL = D15,
237+
I2C_SDA = D14,
235238

236239
// Not connected
237240
NC = (int)0xFFFFFFFF

0 commit comments

Comments
 (0)