Skip to content

Commit bb03a52

Browse files
committed
STM32L0 USB pins addition
1 parent 7883fff commit bb03a52

File tree

8 files changed

+46
-8
lines changed

8 files changed

+46
-8
lines changed

targets/TARGET_STM/TARGET_STM32L0/TARGET_NUCLEO_L073RZ/PeripheralPins.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,3 +246,13 @@ MBED_WEAK const PinMap PinMap_SPI_SSEL[] = {
246246
{PB_12, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF0_SPI2)},
247247
{NC, NC, 0}
248248
};
249+
250+
//*** USBDEVICE ***
251+
252+
MBED_WEAK const PinMap PinMap_USB[] = {
253+
{PA_11, USB, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DM
254+
{PA_12, USB, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DP
255+
// {PA_13, USB, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_USB)}, // USB_NOE // Connected to TMS
256+
// {PC_9, USB, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_USB)}, // USB_NOE
257+
{NC, NC, 0}
258+
};

targets/TARGET_STM/TARGET_STM32L0/TARGET_NUCLEO_L073RZ/PinNames.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,11 @@ typedef enum {
180180
SPI_CS = PB_6,
181181
PWM_OUT = PB_3,
182182

183-
/**** USB pins ****/
183+
/**** USB FS pins ****/
184184
USB_DM = PA_11,
185185
USB_DP = PA_12,
186-
USB_NOE = PC_9,
187-
USB_NOE_ALT0 = PA_13,
186+
USB_NOE = PA_13,
187+
USB_NOE_ALT0 = PC_9,
188188

189189
/**** OSCILLATOR pins ****/
190190
RCC_OSC32_IN = PC_14,

targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L053x8/TARGET_DISCO_L053C8/PeripheralPins.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,3 +192,12 @@ MBED_WEAK const PinMap PinMap_SPI_SSEL[] = {
192192
{PB_12, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF0_SPI2)}, // Connected to NFC_NSS
193193
{NC, NC, 0}
194194
};
195+
196+
//*** USBDEVICE ***
197+
198+
MBED_WEAK const PinMap PinMap_USB[] = {
199+
{PA_11, USB, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DM // Connected to USB1_DM
200+
{PA_12, USB, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DP // Connected to USB1_DP
201+
// {PA_13, USB, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_USB)}, // USB_NOE // Connected to SWDIO
202+
{NC, NC, 0}
203+
};

targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L053x8/TARGET_DISCO_L053C8/PinNames.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ typedef enum {
143143
SPI_CS = PB_12,
144144
PWM_OUT = PB_11,
145145

146-
/**** USB pins ****/
146+
/**** USB FS pins ****/
147147
USB_DM = PA_11,
148148
USB_DP = PA_12,
149149
USB_NOE = PA_13,

targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L053x8/TARGET_NUCLEO_L053R8/PeripheralPins.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,3 +207,13 @@ MBED_WEAK const PinMap PinMap_SPI_SSEL[] = {
207207
{PB_12, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF0_SPI2)},
208208
{NC, NC, 0}
209209
};
210+
211+
//*** USBDEVICE ***
212+
213+
MBED_WEAK const PinMap PinMap_USB[] = {
214+
{PA_11, USB, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DM
215+
{PA_12, USB, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DP
216+
// {PA_13, USB, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_USB)}, // USB_NOE // Connected to TMS
217+
// {PC_9, USB, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_USB)}, // USB_NOE
218+
{NC, NC, 0}
219+
};

targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L053x8/TARGET_NUCLEO_L053R8/PinNames.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,11 @@ typedef enum {
156156
SPI_CS = PB_6,
157157
PWM_OUT = PB_3,
158158

159-
/**** USB pins ****/
159+
/**** USB FS pins ****/
160160
USB_DM = PA_11,
161161
USB_DP = PA_12,
162-
USB_NOE = PC_9,
163-
USB_NOE_ALT0 = PA_13,
162+
USB_NOE = PA_13,
163+
USB_NOE_ALT0 = PC_9,
164164

165165
/**** OSCILLATOR pins ****/
166166
RCC_OSC32_IN = PC_14,

targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L072xZ/TARGET_DISCO_L072CZ_LRWAN1/PeripheralPins.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,3 +225,12 @@ MBED_WEAK const PinMap PinMap_SPI_SSEL[] = {
225225
{PB_12, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF0_SPI2)}, // Connected to SPI2_NSS
226226
{NC, NC, 0}
227227
};
228+
229+
//*** USBDEVICE ***
230+
231+
MBED_WEAK const PinMap PinMap_USB[] = {
232+
{PA_11, USB, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DM
233+
{PA_12, USB, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DP // Connected to RESERVED_RADIO
234+
// {PA_13, USB, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_USB)}, // USB_NOE
235+
{NC, NC, 0}
236+
};

targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L072xZ/TARGET_DISCO_L072CZ_LRWAN1/PinNames.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ typedef enum {
155155
SPI_CS = D10,
156156
PWM_OUT = D13,
157157

158-
/**** USB pins ****/
158+
/**** USB FS pins ****/
159159
USB_DM = PA_11,
160160
USB_DP = PA_12,
161161
USB_NOE = PA_13,

0 commit comments

Comments
 (0)