aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--demos/STM32/RT-STM32L476RG-NUCLEO/mcuconf.h36
-rw-r--r--os/hal/ports/STM32/LLD/OTGv1/usb_lld.h2
-rw-r--r--readme.txt2
-rw-r--r--testhal/STM32/STM32L4xx/CAN/mcuconf.h18
-rw-r--r--testhal/STM32/STM32L4xx/GPT-ADC/mcuconf.h16
5 files changed, 70 insertions, 4 deletions
diff --git a/demos/STM32/RT-STM32L476RG-NUCLEO/mcuconf.h b/demos/STM32/RT-STM32L476RG-NUCLEO/mcuconf.h
index 8cacd9a2a..e2b12de15 100644
--- a/demos/STM32/RT-STM32L476RG-NUCLEO/mcuconf.h
+++ b/demos/STM32/RT-STM32L476RG-NUCLEO/mcuconf.h
@@ -113,6 +113,32 @@
#define STM32_ADC_ADC123_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1
/*
+ * CAN driver system settings.
+ */
+#define STM32_CAN_USE_CAN1 FALSE
+#define STM32_CAN_CAN1_IRQ_PRIORITY 11
+
+/*
+ * GPT driver system settings.
+ */
+#define STM32_GPT_USE_TIM1 FALSE
+#define STM32_GPT_USE_TIM2 FALSE
+#define STM32_GPT_USE_TIM3 FALSE
+#define STM32_GPT_USE_TIM4 FALSE
+#define STM32_GPT_USE_TIM5 FALSE
+#define STM32_GPT_USE_TIM6 FALSE
+#define STM32_GPT_USE_TIM7 FALSE
+#define STM32_GPT_USE_TIM8 FALSE
+#define STM32_GPT_TIM1_IRQ_PRIORITY 7
+#define STM32_GPT_TIM2_IRQ_PRIORITY 7
+#define STM32_GPT_TIM3_IRQ_PRIORITY 7
+#define STM32_GPT_TIM4_IRQ_PRIORITY 7
+#define STM32_GPT_TIM5_IRQ_PRIORITY 7
+#define STM32_GPT_TIM6_IRQ_PRIORITY 7
+#define STM32_GPT_TIM7_IRQ_PRIORITY 7
+#define STM32_GPT_TIM8_IRQ_PRIORITY 7
+
+/*
* SDC driver system settings.
*/
#define STM32_SDC_USE_SDMMC1 FALSE
@@ -143,6 +169,16 @@
#define STM32_ST_USE_TIMER 2
/*
+ * USB driver system settings.
+ */
+#define STM32_USB_USE_OTG1 FALSE
+#define STM32_USB_OTG1_IRQ_PRIORITY 14
+#define STM32_USB_OTG1_RX_FIFO_SIZE 512
+#define STM32_USB_OTG_THREAD_PRIO LOWPRIO
+#define STM32_USB_OTG_THREAD_STACK_SIZE 128
+#define STM32_USB_OTGFIFO_FILL_BASEPRI 0
+
+/*
* WDG driver system settings.
*/
#define STM32_WDG_USE_IWDG FALSE
diff --git a/os/hal/ports/STM32/LLD/OTGv1/usb_lld.h b/os/hal/ports/STM32/LLD/OTGv1/usb_lld.h
index 42ef245c4..59394dd35 100644
--- a/os/hal/ports/STM32/LLD/OTGv1/usb_lld.h
+++ b/os/hal/ports/STM32/LLD/OTGv1/usb_lld.h
@@ -189,6 +189,8 @@
#define STM32_USBCLK STM32_PLL48CLK
#elif defined(STM32F10X_CL)
#define STM32_USBCLK STM32_OTGFSCLK
+#elif defined(STM32L4XX)
+#define STM32_USBCLK STM32_48CLK
#else
#error "unsupported STM32 platform for OTG functionality"
#endif
diff --git a/readme.txt b/readme.txt
index 6eaad3b47..784f3eed5 100644
--- a/readme.txt
+++ b/readme.txt
@@ -76,6 +76,8 @@
- RT: Removed the p_msg field from the thread_t structure saving a
msg_t-sized field from the structure. Messages now use a new field
into the p_u union. Now synchronous messages are even faster.
+- HAL: Fixed missing OTGv1 support for STM32L4 (bug #707)(backported
+ to 16.1.4).
- NIL: Fixed ARM errata 752419 (bug #706)(backported to 2.6.10,
3.0.6 and 16.1.4).
- RT: Fixed ARM errata 752419 (bug #706)(backported to 2.6.10,
diff --git a/testhal/STM32/STM32L4xx/CAN/mcuconf.h b/testhal/STM32/STM32L4xx/CAN/mcuconf.h
index 9715f15e4..c55f31771 100644
--- a/testhal/STM32/STM32L4xx/CAN/mcuconf.h
+++ b/testhal/STM32/STM32L4xx/CAN/mcuconf.h
@@ -96,9 +96,9 @@
*/
#define STM32_ADC_DUAL_MODE FALSE
#define STM32_ADC_COMPACT_SAMPLES FALSE
-#define STM32_ADC_USE_ADC1 TRUE
-#define STM32_ADC_USE_ADC2 TRUE
-#define STM32_ADC_USE_ADC3 TRUE
+#define STM32_ADC_USE_ADC1 FALSE
+#define STM32_ADC_USE_ADC2 FALSE
+#define STM32_ADC_USE_ADC3 FALSE
#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(1, 1)
#define STM32_ADC_ADC2_DMA_STREAM STM32_DMA_STREAM_ID(1, 2)
#define STM32_ADC_ADC3_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
@@ -124,7 +124,7 @@
#define STM32_GPT_USE_TIM1 FALSE
#define STM32_GPT_USE_TIM2 FALSE
#define STM32_GPT_USE_TIM3 FALSE
-#define STM32_GPT_USE_TIM4 TRUE
+#define STM32_GPT_USE_TIM4 FALSE
#define STM32_GPT_USE_TIM5 FALSE
#define STM32_GPT_USE_TIM6 FALSE
#define STM32_GPT_USE_TIM7 FALSE
@@ -169,6 +169,16 @@
#define STM32_ST_USE_TIMER 2
/*
+ * USB driver system settings.
+ */
+#define STM32_USB_USE_OTG1 FALSE
+#define STM32_USB_OTG1_IRQ_PRIORITY 14
+#define STM32_USB_OTG1_RX_FIFO_SIZE 512
+#define STM32_USB_OTG_THREAD_PRIO LOWPRIO
+#define STM32_USB_OTG_THREAD_STACK_SIZE 128
+#define STM32_USB_OTGFIFO_FILL_BASEPRI 0
+
+/*
* WDG driver system settings.
*/
#define STM32_WDG_USE_IWDG FALSE
diff --git a/testhal/STM32/STM32L4xx/GPT-ADC/mcuconf.h b/testhal/STM32/STM32L4xx/GPT-ADC/mcuconf.h
index fc4511344..6278027e7 100644
--- a/testhal/STM32/STM32L4xx/GPT-ADC/mcuconf.h
+++ b/testhal/STM32/STM32L4xx/GPT-ADC/mcuconf.h
@@ -113,6 +113,12 @@
#define STM32_ADC_ADC123_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1
/*
+ * CAN driver system settings.
+ */
+#define STM32_CAN_USE_CAN1 FALSE
+#define STM32_CAN_CAN1_IRQ_PRIORITY 11
+
+/*
* GPT driver system settings.
*/
#define STM32_GPT_USE_TIM1 FALSE
@@ -163,6 +169,16 @@
#define STM32_ST_USE_TIMER 2
/*
+ * USB driver system settings.
+ */
+#define STM32_USB_USE_OTG1 FALSE
+#define STM32_USB_OTG1_IRQ_PRIORITY 14
+#define STM32_USB_OTG1_RX_FIFO_SIZE 512
+#define STM32_USB_OTG_THREAD_PRIO LOWPRIO
+#define STM32_USB_OTG_THREAD_STACK_SIZE 128
+#define STM32_USB_OTGFIFO_FILL_BASEPRI 0
+
+/*
* WDG driver system settings.
*/
#define STM32_WDG_USE_IWDG FALSE