Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 3aee34f

Browse files
committedMar 25, 2025
[stm32] update STM32L562 pin configuration
- Corrected pin names and configurations in README.md - Updated board descriptions in boards.txt - Adjusted memory definition in ldscript.ld - Revised digital and analog pin arrays in variant_STM32L562E_DK.cpp - Consolidated pin definitions and refined constants in variant_STM32L562E_DK.h.
1 parent 5c3892e commit 3aee34f

File tree

5 files changed

+212
-283
lines changed

5 files changed

+212
-283
lines changed
 

‎README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ User can add a STM32 based board following this [wiki](https://github.com/stm32d
745745
| :----: | :-------: | ---- | :-----: | :---- |
746746
| :green_heart: | STM32L552ZC-Q<br>STM32L552ZE-Q | Generic Board | *2.0.0* | |
747747
| :green_heart: | STM32L562ZE-Q | Generic Board | *2.0.0* | |
748-
| :yellow_heart: | STM32L562QEIxQ | Generic Board | *2.11.0* | |
748+
| :yellow_heart: | STM32L562QC-EIxQ | Generic Board | *2.11.0* | |
749749

750750
### Generic STM32U0 boards
751751

‎boards.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12269,8 +12269,8 @@ GenL5.menu.pnum.GENERIC_L562ZETXQ.build.product_line=STM32L562xx
1226912269
GenL5.menu.pnum.GENERIC_L562ZETXQ.build.variant=STM32L5xx/L552Z(C-E)TxQ_L562ZETxQ
1227012270
GenL5.menu.pnum.GENERIC_L562ZETXQ.debug.svd_file={runtime.tools.STM32_SVD.path}/svd/STM32L5xx/STM32L562.svd
1227112271

12272-
# Generic L562QEIxQ
12273-
GenL5.menu.pnum.GENERIC_L562QEIXQ=Generic L562QEIxQ
12272+
# Generic L562QC-EIxQ
12273+
GenL5.menu.pnum.GENERIC_L562QEIXQ=Generic L562QC-EIxQ
1227412274
GenL5.menu.pnum.GENERIC_L562QEIXQ.upload.maximum_size=524288
1227512275
GenL5.menu.pnum.GENERIC_L562QEIXQ.upload.maximum_data_size=196608
1227612276
GenL5.menu.pnum.GENERIC_L562QEIXQ.build.board=GENERIC_L562QEIXQ

‎variants/STM32L5xx/L552Q(C-E)IxQ_L562QEIxQ/ldscript.ld

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,8 @@ _Min_Stack_Size = 0x400; /* required amount of stack */
4444
/* Memories definition */
4545
MEMORY
4646
{
47-
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 192K
48-
RAM2 (xrw) : ORIGIN = 0x20030000, LENGTH = 64K
49-
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 512K
47+
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE
48+
FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET
5049
}
5150

5251
/* Sections */

‎variants/STM32L5xx/L552Q(C-E)IxQ_L562QEIxQ/variant_STM32L562E_DK.cpp

Lines changed: 87 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -15,132 +15,96 @@
1515

1616
// Digital PinName array
1717
const PinName digitalPin[] = {
18-
PA_0, // D0/A0
19-
PA_1, // D1/A1
20-
PA_2, // D2/A2
21-
PA_3, // D3/A3
22-
PA_4, // D4/A4
23-
PA_5, // D5/A5
24-
PA_6, // D6/A6
25-
PA_7, // D7/A7
26-
PA_8, // D8
27-
PA_9, // D9
28-
PA_10, // D10
29-
PA_11, // D11
30-
PA_12, // D12
31-
PA_13, // D13
32-
PA_14, // D14
33-
PA_15, // D15
34-
PB_0, // D16/A8
35-
PB_1, // D17/A9
36-
PB_2, // D18
37-
PB_3, // D19
38-
PB_4, // D20
39-
PB_5, // D21
40-
PB_6, // D22
41-
PB_7, // D23
42-
PB_8, // D24
43-
PB_9, // D25
44-
PB_10, // D26
45-
PB_11, // D27
46-
PB_12, // D28
47-
PB_13, // D29
48-
PB_14, // D30
49-
PB_15, // D31
50-
PC_0, // D32/A10
51-
PC_1, // D33/A11
52-
PC_2, // D34/A12
53-
PC_3, // D35/A13
54-
PC_4, // D36/A14
55-
PC_5, // D37/A15
56-
PC_6, // D38
57-
PC_7, // D39
58-
PC_8, // D40
59-
PC_9, // D41
60-
PC_10, // D42
61-
PC_11, // D43
62-
PC_12, // D44
63-
PC_13, // D45
64-
PC_14, // D46
65-
PC_15, // D47
66-
PD_0, // D48
67-
PD_1, // D49
68-
PD_2, // D50
69-
PD_3, // D51
70-
PD_4, // D52
71-
PD_5, // D53
72-
PD_6, // D54
73-
PD_7, // D55
74-
PD_8, // D56
75-
PD_9, // D57
76-
PD_10, // D58
77-
PD_11, // D59
78-
PD_12, // D60
79-
PD_13, // D61
80-
PD_14, // D62
81-
PD_15, // D63
82-
PE_0, // D64
83-
PE_1, // D65
84-
PE_2, // D66
85-
PE_3, // D67
86-
PE_4, // D68
87-
PE_5, // D69
88-
PE_6, // D70
89-
PE_7, // D71
90-
PE_8, // D72
91-
PE_9, // D73
92-
PE_10, // D74
93-
PE_11, // D75
94-
PE_12, // D76
95-
PE_13, // D77
96-
PE_14, // D78
97-
PE_15, // D79
98-
PF_0, // D80
99-
PF_1, // D81
100-
PF_2, // D82
101-
PF_3, // D83
102-
PF_4, // D84
103-
PF_5, // D85
104-
PF_11, // D86
105-
PF_12, // D87
106-
PF_13, // D88
107-
PF_14, // D89
108-
PF_15, // D90
109-
PG_0, // D91
110-
PG_1, // D92
111-
PG_2, // D93
112-
PG_3, // D94
113-
PG_4, // D95
114-
PG_5, // D96
115-
PG_6, // D97
116-
PG_7, // D98
117-
PG_8, // D99
118-
PG_9, // D100
119-
PG_10, // D101
120-
PG_12, // D102
121-
PH_0, // D103
122-
PH_1, // D104
123-
PH_3 // D105
18+
PB_10, // D0
19+
PB_11, // D1
20+
PD_11, // D2
21+
PD_12, // D3
22+
PF_4, // D4
23+
PD_13, // D5
24+
PB_8, // D6
25+
PC_6, // D7
26+
PG_0, // D8
27+
PB_9, // D9
28+
PE_0, // D10
29+
PB_5, // D11
30+
PB_4, // D12
31+
PG_9, // D13
32+
PB_7, // D14
33+
PB_6, // D15
34+
PA_0, // D16 (A0)
35+
PA_1, // D17 (A1)
36+
PA_4, // D18 (A2)
37+
PA_5, // D19 (A3)
38+
PC_4, // D20 (A4)
39+
PC_5, // D21 (A5)
40+
PB_14, // D22
41+
PB_15, // D23
42+
PA_13, // D24
43+
PA_14, // D25
44+
PB_3, // D26
45+
PA_15, // D27
46+
PA_9, // D28
47+
PA_2, // D29
48+
PA_3, // D30
49+
PA_6, // D31
50+
PA_7, // D32
51+
PB_0, // D33
52+
PB_1, // D34
53+
PB_2, // D35
54+
PC_0, // D36
55+
PC_1, // D37
56+
PC_2, // D38
57+
PC_3, // D39
58+
PF_2, // D40
59+
PC_8, // D41
60+
PC_9, // D42
61+
PC_10, // D43
62+
PC_11, // D44
63+
PC_12, // D45
64+
PD_2, // D46
65+
PD_7, // D47
66+
PD_5, // D48
67+
PD_4, // D49
68+
PF_0, // D50
69+
PD_14, // D51
70+
PD_15, // D52
71+
PD_0, // D53
72+
PD_1, // D54
73+
PE_7, // D55
74+
PE_8, // D56
75+
PE_9, // D57
76+
PE_10, // D58
77+
PE_11, // D59
78+
PE_12, // D60
79+
PE_13, // D61
80+
PE_14, // D62
81+
PE_15, // D63
82+
PD_8, // D64
83+
PD_9, // D65
84+
PD_10, // D66
85+
PE_1, // D67
86+
PF_1, // D68
87+
PF_14, // D69
88+
PF_15, // D70
89+
PH_0, // D71
90+
PA_10, // D72
91+
PA_13, // D73 (ALT)
92+
PA_14, // D74 (ALT)
93+
PA_11, // D75
94+
PA_12, // D76
95+
PC_13, // D77
96+
PD_3, // D78
97+
PG_12 // D79
12498
};
12599

126-
// Analog (Ax) pin number array
100+
127101
const uint32_t analogInputPin[] = {
128-
0, // A0, PA0
129-
1, // A1, PA1
130-
2, // A2, PA2
131-
3, // A3, PA3
132-
4, // A4, PA4
133-
5, // A5, PA5
134-
6, // A6, PA6
135-
7, // A7, PA7
136-
16, // A8, PB0
137-
17, // A9, PB1
138-
32, // A10, PC0
139-
33, // A11, PC1
140-
34, // A12, PC2
141-
35, // A13, PC3
142-
36, // A14, PC4
143-
37 // A15, PC5
102+
16, // A0
103+
17, // A1
104+
18, // A2
105+
19, // A3
106+
20, // A4
107+
21 // A5
144108
};
145109

146110
// ----------------------------------------------------------------------------

‎variants/STM32L5xx/L552Q(C-E)IxQ_L562QEIxQ/variant_STM32L562E_DK.h

Lines changed: 120 additions & 154 deletions
Original file line numberDiff line numberDiff line change
@@ -15,169 +15,135 @@
1515
/*----------------------------------------------------------------------------
1616
* STM32 pins number
1717
*----------------------------------------------------------------------------*/
18+
19+
// CN12: Arduino connector
20+
#define PB10 0 // ARD.D0_RX, T.VCP_RX
21+
#define PB11 1 // ARD.D1_TX, T.VCP_TX
22+
#define PD11 2 // ARD.D2_IO
23+
#define PD12 3 // ARD.D3_TIM
24+
#define PF4 4 // ARD.D4_INT
25+
#define PD13 5 // ARD.D5_TIM
26+
#define PB8 6 // ARD.D6_TIM
27+
#define PC6 7 // ARD.D7_IO
28+
29+
// CN11: Arduino connector
30+
#define PG0 8 // ARD.D8_IO
31+
#define PB9 9 // ARD.D9_TIM
32+
#define PE0 10 // ARD.D10: SPI_CSn and TIM16_CH1
33+
#define PB5 11 // ARD.D11_TIM_SPI_MOSI, STMod+3_SPI_MOSIp
34+
#define PB4 12 // ARD.D12_SPI_MISO, STMod+3_SPI_MISOp
35+
#define PG9 13 // ARD.D13_SPI_SCK
36+
#define PB7 14 // ARD.D14_I2C1_SDA
37+
#define PB6 15 // ARD.D15_I2C1_SCL
38+
39+
// CN19: Arduino connector
1840
#define PA0 PIN_A0 // ARD.A0: ADC1_IN5, shared with STMod+
1941
#define PA1 PIN_A1 // ARD.A1: ADC1_IN6
20-
#define PA2 PIN_A2 // OCTOSPI.NCS
21-
#define PA3 PIN_A3 // OCTOSPI.CLK
22-
#define PA4 PIN_A4 // ARD_ADC.A2, USB_C.VBUS_VSENSE
23-
#define PA5 PIN_A5 // ARD_ADC.A3
24-
#define PA6 PIN_A6 // OCTOSPI.IO3
25-
#define PA7 PIN_A7 // OCTOSPI.IO2
26-
#define PA8 8 // LCD.TE
27-
#define PA9 9 // T.VCP_TX, ARD.D1_TX
28-
#define PA10 10 // T.VCP_RX, ARD.D0_RX
29-
#define PA11 11 // USB_C.FS_N
30-
#define PA12 12 // USB_C.FS_P
31-
#define PA13 13 // T.SWDIO
32-
#define PA14 14 // T.SWCLK
33-
#define PA15 15 // USB_C.CC1, T.JTDI
34-
#define PB0 PIN_A8 // OCTOSPI.IO1
35-
#define PB1 PIN_A9 // OCTOSPI.IO0
36-
#define PB2 18 // OCTOSPI.DQS
37-
#define PB3 19 // T.SWO
38-
#define PB4 20 // ARD.D12_SPI_MISO, STMod+3_SPI_MISOp
39-
#define PB5 21 // USB_C.DBn, STMod+2_SPI_MOSIp, ARD.D11_TIM_SPI_MOSI
40-
#define PB6 22 // I2C1_SCL
41-
#define PB7 23 // I2C1_SDA
42-
#define PB8 24 // ARD.D6_TIM
43-
#define PB9 25 // ARD.D9_TIM
44-
#define PB10 26 // ARD.D0_RX, T.VCP_RX
45-
#define PB11 27 // ARC.D1_TX, T.VCP_TX
46-
#define PB12 28 // DFSDM_DATIN1
47-
#define PB13 29 // STMod+1_SPI_CSN, ARD.D0_RX
48-
#define PB14 30 // USB_C.FLT
49-
#define PB15 31 // USB_C.CC2
50-
#define PC0 PIN_A10 // OCTOSPI.IO7
51-
#define PC1 PIN_A11 // OCTOSPI.IO4
52-
#define PC2 PIN_A12 // OCTOSPI.IO5
53-
#define PC3 PIN_A13 // OCTOSPI.IO6
54-
#define PC4 PIN_A14 // ARD_ADC.A5
55-
#define PC5 PIN_A15 // ARD_ADC.A4
56-
#define PC6 38 // ARD.D7_IO
57-
#define PC7 39 // DFSMD_DATIN3
58-
#define PC8 40 // STMod+_TIM
59-
#define PC9 41 // PMOD_RST
60-
#define PC10 42 // STMod+2_UART_TX, PMOD_RST
61-
#define PC11 43 // STMod+3_UART_RX, PMOD_RST
62-
#define PC12 44 // SDIO.CLK
63-
#define PC13 45 // USER BUTTON (WKUP2), PM_WAKE-UP
64-
#define PC14 46 // PC14-OSC32_IN
65-
#define PC15 47 // OSC32_OUT
66-
#define PD0 48 // LCD.FMC_D2
67-
#define PD1 49 // LCD.FMC_D3
68-
#define PD2 50 // SDIO.CMD, STMod+4_UART_RTS
69-
#define PD3 51 // LED_RED
70-
#define PD4 52 // LCD.FMC_NOE
71-
#define PD5 53 // LCD.FMC_NWE
72-
#define PD6 54 // $TMod+8_SPI_MOSIs
73-
#define PD7 55 // LCD.FMC_NE1_CS
74-
#define PD8 56 // LCD.FMC_D13
75-
#define PD9 57 // LCD.FMC_D14
76-
#define PD10 58 // LCD.FMC_D15
77-
#define PD11 59 // ARD.D2_IO
78-
#define PD12 60 // ARD.D3_TIM
79-
#define PD13 61 // ARD.D5_TIM
80-
#define PD14 62 // LCD.FMC_D0
81-
#define PD15 63 // LCD.FMC_D1
82-
#define PE0 64 // ARD.D10: SPI_CSn and TIM16_CH1
83-
#define PE1 65 // LCD_BL_CTRL
84-
#define PE2 66 // SAI.MCLK_A
85-
#define PE3 67 // SAI.SD_B
86-
#define PE4 68 // SAI.FS_A
87-
#define PE5 69 // SAI.SCK_A
88-
#define PE6 70 // SAI.SD_A
89-
#define PE7 71 // LCD.FMC_D4
90-
#define PE8 72 // LCD.FMC_D5
91-
#define PE9 73 // LCD.FMC_D6
92-
#define PE10 74 // LCD.FMC_D7
93-
#define PE11 75 // LCD.FMC_D8
94-
#define PE12 76 // LCD.FMC_D9
95-
#define PE13 77 // LCD.FMC_D10
96-
#define PE14 78 // LCD.FMC_D11
97-
#define PE15 79 // LCD.FMC_D12
98-
#define PF1 81 // LCD.CTP_INT
99-
#define PF2 82 // SDIO.DETECT
100-
#define PF3 83 // GYRO_ACC_INT
101-
#define PF4 84 // ARD.D4_INT
102-
#define PF5 85 // STMod+ 11_INT
103-
#define PF11 86 // STMod+SEL_12
104-
#define PF12 87 // STMod+SEL_34
105-
#define PF13 88 // -
106-
#define PF14 89 // LCD.RST
107-
#define PF15 90 // LCD.CTP_RST
108-
#define PG0 91 // ARD.D8_IO
109-
#define PG1 92 // AUDIO_RESETN
110-
#define PG2 93 // SPI1.SCK
111-
#define PG3 94 // SPI1.MISO
112-
#define PG4 95 // SPI1.MOSI
113-
#define PG5 96 // SPI1.BLE_CS
114-
#define PG6 97 // BLE_INT
115-
#define PG7 98 // DFSMD_CKOUT
116-
#define PG8 99 // BLE_RSTN
117-
#define PG9 100 // ARD.D13_SPI_SCK
118-
#define PG10 101 // -
119-
#define PG12 102 // LED_GREEN
120-
#define PH0 103 // LCD_PWR_ON
121-
#define PH1 104 // MEMS_LED
122-
#define PH3 105 // PH3_BOOT0
123-
//
124-
// Alternate pins number
125-
#define PA0_ALT1 (PA0 | ALT1)
126-
#define PA1_ALT1 (PA1 | ALT1)
127-
#define PA1_ALT2 (PA1 | ALT2)
128-
#define PA2_ALT1 (PA2 | ALT1)
129-
#define PA2_ALT2 (PA2 | ALT2)
130-
#define PA3_ALT1 (PA3 | ALT1)
131-
#define PA3_ALT2 (PA3 | ALT2)
132-
#define PA4_ALT1 (PA4 | ALT1)
133-
#define PA5_ALT1 (PA5 | ALT1)
134-
#define PA6_ALT1 (PA6 | ALT1)
135-
#define PA7_ALT1 (PA7 | ALT1)
136-
#define PA7_ALT2 (PA7 | ALT2)
137-
#define PA7_ALT3 (PA7 | ALT3)
138-
#define PA15_ALT1 (PA15 | ALT1)
139-
#define PB0_ALT1 (PB0 | ALT1)
140-
#define PB0_ALT2 (PB0 | ALT2)
141-
#define PB1_ALT1 (PB1 | ALT1)
142-
#define PB1_ALT2 (PB1 | ALT2)
143-
#define PB3_ALT1 (PB3 | ALT1)
144-
#define PB4_ALT1 (PB4 | ALT1)
145-
#define PB5_ALT1 (PB5 | ALT1)
146-
#define PB6_ALT1 (PB6 | ALT1)
147-
#define PB7_ALT1 (PB7 | ALT1)
148-
#define PB8_ALT1 (PB8 | ALT1)
149-
#define PB9_ALT1 (PB9 | ALT1)
150-
#define PB10_ALT1 (PB10 | ALT1)
151-
#define PB11_ALT1 (PB11 | ALT1)
152-
#define PB13_ALT1 (PB13 | ALT1)
153-
#define PB14_ALT1 (PB14 | ALT1)
154-
#define PB14_ALT2 (PB14 | ALT2)
155-
#define PB15_ALT1 (PB15 | ALT1)
156-
#define PB15_ALT2 (PB15 | ALT2)
157-
#define PC0_ALT1 (PC0 | ALT1)
158-
#define PC1_ALT1 (PC1 | ALT1)
159-
#define PC2_ALT1 (PC2 | ALT1)
160-
#define PC3_ALT1 (PC3 | ALT1)
161-
#define PC4_ALT1 (PC4 | ALT1)
162-
#define PC5_ALT1 (PC5 | ALT1)
163-
#define PC6_ALT1 (PC6 | ALT1)
164-
#define PC7_ALT1 (PC7 | ALT1)
165-
#define PC8_ALT1 (PC8 | ALT1)
166-
#define PC9_ALT1 (PC9 | ALT1)
167-
#define PC10_ALT1 (PC10 | ALT1)
168-
#define PC11_ALT1 (PC11 | ALT1)
42+
#define PA4 PIN_A2 // ARD_ADC.A2, USB_C.VBUS_VSENSE
43+
#define PA5 PIN_A3 // ARD_ADC.A3
44+
#define PC4 PIN_A4 // ARD_ADC.A5
45+
#define PC5 PIN_A5 // ARD_ADC.A4
46+
47+
// CN17: USB Micro-B
48+
#define PB14 22 // USB_C.FLT
49+
#define PB15 23 // USB_C.CC2
50+
51+
// STDConn: STMod+ connector
52+
#define PA13 24 // STMod+1_UART_TX
53+
#define PA14 25 // STMod+1_UART_RX
54+
#define PB3 26 // STMod+1_SPI_CSN
55+
#define PA15 27 // STMod+1_UART_CTS
56+
#define PA9 28 // STMod+1_UART_RTS
57+
58+
// octoSPI pins (no reused pin numbers)
59+
#define PA2 29 // OCTOSPI.NCS
60+
#define PA3 30 // OCTOSPI.CLK
61+
#define PA6 31 // OCTOSPI.IO3
62+
#define PA7 32 // OCTOSPI.IO2
63+
#define PB0 33 // OCTOSPI.IO1
64+
#define PB1 34 // OCTOSPI.IO0
65+
#define PB2 35 // OCTOSPI.DQS
66+
#define PC0 36 // OCTOSPI.IO7
67+
#define PC1 37 // OCTOSPI.IO4
68+
#define PC2 38 // OCTOSPI.IO5
69+
#define PC3 39 // OCTOSPI.IO6
70+
71+
// microSD card pins
72+
#define PF2 40 // SDIO.DETECT
73+
#define PC8 41 // SDIO.D0
74+
#define PC9 42 // SDIO.D1
75+
#define PC10 43 // SDIO.D2
76+
#define PC11 44 // SDIO.D3
77+
#define PC12 45 // SDIO.CLK
78+
#define PD2 46 // SDIO.CMD
79+
80+
// LCD pins
81+
#define PD7 47 // LCD.FMC_NE1_CS
82+
#define PD5 48 // LCD.FMC_NWE
83+
#define PD4 49 // LCD.FMC_NOE
84+
#define PF0 50 // LCD.FMC_A0
85+
#define PD14 51 // LCD.FMC_D0
86+
#define PD15 52 // LCD.FMC_D1
87+
#define PD0 53 // LCD.FMC_D2
88+
#define PD1 54 // LCD.FMC_D3
89+
#define PE7 55 // LCD.FMC_D4
90+
#define PE8 56 // LCD.FMC_D5
91+
#define PE9 57 // LCD.FMC_D6
92+
#define PE10 58 // LCD.FMC_D7
93+
#define PE11 59 // LCD.FMC_D8
94+
#define PE12 60 // LCD.FMC_D9
95+
#define PE13 61 // LCD.FMC_D10
96+
#define PE14 62 // LCD.FMC_D11
97+
#define PE15 63 // LCD.FMC_D12
98+
#define PD8 64 // LCD.FMC_D13
99+
#define PD9 65 // LCD.FMC_D14
100+
#define PD10 66 // LCD.FMC_D15
101+
#define PE1 67 // LCD_BL_CTRL
102+
#define PF1 68 // LCD.CTP_INT
103+
#define PF14 69 // LCD.RST
104+
#define PF15 70 // LCD.CTP_RST
105+
#define PH0 71 // LCD_PWR_ON
106+
107+
// uart pins
108+
#define PA10 72 // T.VCP_RX, ARD.D0_RX
109+
#define PA13_ALT 73 // T.SWDIO
110+
#define PA14_ALT 74 // T.SWCLK
111+
112+
// usb
113+
#define PA11 75 // USB_C.FS_N
114+
#define PA12 76 // USB_C.FS_P
115+
116+
// User button
117+
#define PC13 77 // USER BUTTON (WKUP2), PM_WAKE-UP
118+
119+
// User LED
120+
#define PD3 78 // LED_RED
121+
#define PG12 79 // LED_GREEN
122+
123+
// bluetooth low energy and spi
124+
#define PG8 80 // BLE_RSTN
125+
#define PG6 81 // BLE_INT
126+
#define PG5 82 // SPI1.BLE_CS
127+
#define PG4 83 // SPI1.MOSI
128+
#define PG3 84 // SPI1.MISO
129+
#define PG2 85 // SPI1.SCK
130+
131+
#define NUM_DIGITAL_PINS 80
132+
#define NUM_ANALOG_INPUTS 6
169133

170-
#define NUM_DIGITAL_PINS 106
171-
#define NUM_ANALOG_INPUTS 16
134+
// On-board LEDs pin number
135+
#define LED1 PG12
136+
#define LED_GREEN LED1
137+
#define LED2 PD3
138+
#define LED_RED LED2
172139

173-
// On-board LED pin number
174140
#ifndef LED_BUILTIN
175-
#define LED_BUILTIN PG12
141+
#define LED_BUILTIN LED_GREEN
176142
#endif
177143

178144
// On-board user button
179145
#ifndef USER_BTN
180-
#define USER_BTN PNUM_NOT_DEFINED
146+
#define USER_BTN PC13
181147
#endif
182148

183149
// SPI definitions

0 commit comments

Comments
 (0)
Please sign in to comment.