1
- From 2bdb291a44fd149d38662f70a574b1a06380fca7 Mon Sep 17 00:00:00 2001
1
+ From a6594adeff91a1a1942b69db209abf2b77794357 Mon Sep 17 00:00:00 2001
2
2
From: Martino Facchin <
[email protected] >
3
3
Date: Thu, 11 Mar 2021 11:50:18 +0100
4
- Subject: [PATCH 011/157 ] STM32: USB: allow dynamic USB speed configuration
4
+ Subject: [PATCH 011/204 ] STM32: USB: allow dynamic USB speed configuration
5
5
based on bootloader parameters
6
6
7
7
---
8
8
targets/TARGET_STM/USBPhy_STM32.cpp | 68 +++++++++++++++++++++++++++--
9
9
1 file changed, 64 insertions(+), 4 deletions(-)
10
10
11
11
diff --git a/targets/TARGET_STM/USBPhy_STM32.cpp b/targets/TARGET_STM/USBPhy_STM32.cpp
12
- index c45150de4b..40f1044216 100644
12
+ index a243961a97..3c86f20883 100644
13
13
--- a/targets/TARGET_STM/USBPhy_STM32.cpp
14
14
+++ b/targets/TARGET_STM/USBPhy_STM32.cpp
15
15
@@ -217,10 +217,29 @@ void USB_reenumerate()
@@ -70,7 +70,7 @@ index c45150de4b..40f1044216 100644
70
70
hpcd.Instance = USB_OTG_HS;
71
71
hpcd.Init.phy_itface = USB_OTG_EMBEDDED_PHY;
72
72
hpcd.Init.Sof_enable = ENABLE;
73
- @@ -275 ,7 +304 ,12 @@ void USBPhyHw::init(USBPhyEvents *events)
73
+ @@ -284 ,7 +313 ,12 @@ void USBPhyHw::init(USBPhyEvents *events)
74
74
75
75
map = PinMap_USB_HS;
76
76
@@ -84,7 +84,7 @@ index c45150de4b..40f1044216 100644
84
84
hpcd.Instance = USB_OTG_FS;
85
85
hpcd.Init.phy_itface = PCD_PHY_EMBEDDED;
86
86
hpcd.Init.Sof_enable = 1;
87
- @@ -292 ,7 +326 ,12 @@ void USBPhyHw::init(USBPhyEvents *events)
87
+ @@ -301 ,7 +335 ,12 @@ void USBPhyHw::init(USBPhyEvents *events)
88
88
89
89
map = PinMap_USB_FS;
90
90
@@ -98,7 +98,7 @@ index c45150de4b..40f1044216 100644
98
98
hpcd.Instance = USB;
99
99
hpcd.Init.phy_itface = PCD_PHY_EMBEDDED;
100
100
hpcd.Init.speed = PCD_SPEED_FULL;
101
- @@ -405 ,6 +444 ,13 @@ void USBPhyHw::deinit()
101
+ @@ -414 ,6 +453 ,13 @@ void USBPhyHw::deinit()
102
102
HAL_StatusTypeDef ret = HAL_PCD_DeInit(&hpcd);
103
103
MBED_ASSERT(ret == HAL_OK);
104
104
@@ -112,7 +112,7 @@ index c45150de4b..40f1044216 100644
112
112
NVIC_DisableIRQ(USBHAL_IRQn);
113
113
114
114
if (events != NULL) {
115
- @@ -639 ,6 +685 ,13 @@ void USBPhyHw::endpoint_abort(usb_ep_t endpoint)
115
+ @@ -648 ,6 +694 ,13 @@ void USBPhyHw::endpoint_abort(usb_ep_t endpoint)
116
116
117
117
void USBPhyHw::process()
118
118
{
@@ -126,7 +126,7 @@ index c45150de4b..40f1044216 100644
126
126
HAL_PCD_IRQHandler(&instance->hpcd);
127
127
// Re-enable interrupt
128
128
NVIC_ClearPendingIRQ(USBHAL_IRQn);
129
- @@ -647 ,6 +700 ,13 @@ void USBPhyHw::process()
129
+ @@ -656 ,6 +709 ,13 @@ void USBPhyHw::process()
130
130
131
131
void USBPhyHw::_usbisr(void)
132
132
{
@@ -141,5 +141,5 @@ index c45150de4b..40f1044216 100644
141
141
instance->events->start_process();
142
142
}
143
143
- -
144
- 2.36.0
144
+ 2.39.1
145
145
0 commit comments