1
1
/* mbed Microcontroller Library
2
- *******************************************************************************
3
- * Copyright (c) 2018, STMicroelectronics
2
+ * SPDX-License-Identifier: BSD-3-Clause
3
+ ******************************************************************************
4
+ *
5
+ * Copyright (c) 2016-2021 STMicroelectronics.
4
6
* All rights reserved.
5
7
*
6
- * Redistribution and use in source and binary forms, with or without
7
- * modification, are permitted provided that the following conditions are met:
8
+ * This software component is licensed by ST under BSD 3-Clause license,
9
+ * the "License"; You may not use this file except in compliance with the
10
+ * License. You may obtain a copy of the License at:
11
+ * opensource.org/licenses/BSD-3-Clause
8
12
*
9
- * 1. Redistributions of source code must retain the above copyright notice,
10
- * this list of conditions and the following disclaimer.
11
- * 2. Redistributions in binary form must reproduce the above copyright notice,
12
- * this list of conditions and the following disclaimer in the documentation
13
- * and/or other materials provided with the distribution.
14
- * 3. Neither the name of STMicroelectronics nor the names of its contributors
15
- * may be used to endorse or promote products derived from this software
16
- * without specific prior written permission.
13
+ ******************************************************************************
17
14
*
18
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
22
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
- *******************************************************************************
15
+ * Automatically generated from STM32CubeMX/db/mcu/STM32L432K(B-C)Ux.xml
29
16
*/
30
17
31
18
/* MBED TARGET LIST: NUCLEO_L432KC */
@@ -41,77 +28,70 @@ extern "C" {
41
28
#endif
42
29
43
30
typedef enum {
44
- ALT0 = 0x100 ,
45
- ALT1 = 0x200 ,
46
- ALT2 = 0x300 ,
47
- ALT3 = 0x400
48
- } ALTx ;
49
31
50
- typedef enum {
51
- PA_0 = 0x00 ,
52
- PA_1 = 0x01 ,
53
- PA_2 = 0x02 ,
54
- PA_2_ALT0 = PA_2 | ALT0 ,
55
- PA_3 = 0x03 ,
56
- PA_3_ALT0 = PA_3 | ALT0 ,
57
- PA_4 = 0x04 ,
58
- PA_4_ALT0 = PA_4 | ALT0 ,
59
- PA_5 = 0x05 ,
60
- PA_6 = 0x06 ,
61
- PA_7 = 0x07 ,
62
- PA_8 = 0x08 ,
63
- PA_9 = 0x09 ,
64
- PA_10 = 0x0A ,
65
- PA_11 = 0x0B ,
66
- PA_12 = 0x0C ,
67
- PA_13 = 0x0D ,
68
- PA_14 = 0x0E ,
69
- PA_15 = 0x0F ,
70
- PA_15_ALT0 = PA_15 | ALT0 ,
71
-
72
- PB_0 = 0x10 ,
73
- PB_1 = 0x11 ,
74
- PB_2 = 0x12 ,
75
- PB_3 = 0x13 ,
76
- PB_3_ALT0 = PB_3 | ALT0 ,
77
- PB_4 = 0x14 ,
78
- PB_4_ALT0 = PB_4 | ALT0 ,
79
- PB_5 = 0x15 ,
80
- PB_5_ALT0 = PB_5 | ALT0 ,
81
- PB_6 = 0x16 ,
82
- PB_7 = 0x17 ,
83
-
84
- PC_14 = 0x2E ,
85
- PC_15 = 0x2F ,
86
-
87
- // ADC internal channels
88
- ADC_TEMP = 0xF0 ,
89
- ADC_VREF = 0xF1 ,
90
- ADC_VBAT = 0xF2 ,
91
-
92
- // Arduino Nano connector namings
93
- A0 = PA_0 ,
94
- A1 = PA_1 ,
95
- A2 = PA_3 ,
96
- A3 = PA_4 ,
97
- A4 = PA_5 ,
98
- A5 = PA_6 ,
99
- A6 = PA_7 ,
100
- A7 = PA_2 ,
101
- D0 = PA_10 ,
102
- D1 = PA_9 ,
103
- D2 = PA_12 ,
104
- D3 = PB_0 ,
105
- D4 = PB_7 ,
106
- D5 = PB_6 ,
107
- D6 = PB_1 ,
108
- D7 = PC_14 ,
109
- D8 = PC_15 ,
110
- D9 = PA_8 ,
111
- D10 = PA_11 ,
112
- D11 = PB_5 ,
113
- D12 = PB_4 ,
114
- D13 = PB_3 ,
32
+ PA_0 = 0x00 ,
33
+ PA_1 = 0x01 ,
34
+ PA_2 = 0x02 ,
35
+ PA_2_ALT0 = PA_2 | ALT0 , // same pin used for alternate HW
36
+ PA_3 = 0x03 ,
37
+ PA_3_ALT0 = PA_3 | ALT0 , // same pin used for alternate HW
38
+ PA_4 = 0x04 ,
39
+ PA_4_ALT0 = PA_4 | ALT0 , // same pin used for alternate HW
40
+ PA_5 = 0x05 ,
41
+ PA_6 = 0x06 ,
42
+ PA_7 = 0x07 ,
43
+ PA_8 = 0x08 ,
44
+ PA_9 = 0x09 ,
45
+ PA_10 = 0x0A ,
46
+ PA_11 = 0x0B ,
47
+ PA_12 = 0x0C ,
48
+ PA_13 = 0x0D ,
49
+ PA_14 = 0x0E ,
50
+ PA_15 = 0x0F ,
51
+ PA_15_ALT0 = PA_15 | ALT0 , // same pin used for alternate HW
52
+ PB_0 = 0x10 ,
53
+ PB_1 = 0x11 ,
54
+ PB_3 = 0x13 ,
55
+ PB_3_ALT0 = PB_3 | ALT0 , // same pin used for alternate HW
56
+ PB_4 = 0x14 ,
57
+ PB_4_ALT0 = PB_4 | ALT0 , // same pin used for alternate HW
58
+ PB_5 = 0x15 ,
59
+ PB_5_ALT0 = PB_5 | ALT0 , // same pin used for alternate HW
60
+ PB_6 = 0x16 ,
61
+ PB_7 = 0x17 ,
62
+ PC_14 = 0x2E ,
63
+ PC_15 = 0x2F ,
64
+ PH_3 = 0x73 ,
65
+
66
+ /**** ADC internal channels ****/
67
+
68
+ ADC_TEMP = 0xF0 , // Internal pin virtual value
69
+ ADC_VREF = 0xF1 , // Internal pin virtual value
70
+ ADC_VBAT = 0xF2 , // Internal pin virtual value
71
+
72
+ // Arduino Nano pins
73
+ A0 = PA_0 ,
74
+ A1 = PA_1 ,
75
+ A2 = PA_3 ,
76
+ A3 = PA_4 ,
77
+ A4 = PA_5 ,
78
+ A5 = PA_6 ,
79
+ A6 = PA_7 ,
80
+ A7 = PA_2 ,
81
+ D0 = PA_10 ,
82
+ D1 = PA_9 ,
83
+ D2 = PA_12 ,
84
+ D3 = PB_0 ,
85
+ D4 = PB_7 ,
86
+ D5 = PB_6 ,
87
+ D6 = PB_1 ,
88
+ D7 = PC_14 ,
89
+ D8 = PC_15 ,
90
+ D9 = PA_8 ,
91
+ D10 = PA_11 ,
92
+ D11 = PB_5 ,
93
+ D12 = PB_4 ,
94
+ D13 = PB_3 ,
115
95
116
96
// STDIO for console print
117
97
#ifdef MBED_CONF_TARGET_STDIO_UART_TX
@@ -125,14 +105,6 @@ typedef enum {
125
105
CONSOLE_RX = PA_15 ,
126
106
#endif
127
107
128
- I2C_SCL = PB_6 ,
129
- I2C_SDA = PB_7 ,
130
- SPI_MOSI = PB_5 ,
131
- SPI_MISO = PB_4 ,
132
- SPI_SCK = PB_3 ,
133
- SPI_CS = PA_11 ,
134
- PWM_OUT = PB_0 ,
135
-
136
108
/**** USB pins ****/
137
109
USB_DM = PA_11 ,
138
110
USB_DP = PA_12 ,
@@ -156,9 +128,7 @@ typedef enum {
156
128
NC = (int )0xFFFFFFFF
157
129
} PinName ;
158
130
159
- // Standardized LED and button names
160
- #define LED1 PB_3
161
-
131
+ #define LED1 PB_3 // LD3 [Green]
162
132
163
133
#ifdef __cplusplus
164
134
}
0 commit comments