mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
OPENMVPT: Fix H7 RTC clock source.
This commit is contained in:
parent
0fb274cf33
commit
8df4b647d0
@ -228,6 +228,10 @@ void SystemClock_Config(void)
|
||||
__HAL_RCC_PLL_PLLSOURCE_CONFIG(OMV_OSC_PLL_CLKSOURCE);
|
||||
|
||||
/* Enable HSE Oscillator and activate PLL with HSE as source */
|
||||
#if defined(OMV_OSC_LSE_STATE)
|
||||
RCC_OscInitStruct.LSEState = OMV_OSC_LSE_STATE;
|
||||
RCC_OscInitStruct.OscillatorType |= RCC_OSCILLATORTYPE_LSE;
|
||||
#endif
|
||||
#if defined(OMV_OSC_HSE_STATE)
|
||||
RCC_OscInitStruct.HSEState = OMV_OSC_HSE_STATE;
|
||||
RCC_OscInitStruct.OscillatorType |= RCC_OSCILLATORTYPE_HSE;
|
||||
@ -305,8 +309,11 @@ void SystemClock_Config(void)
|
||||
|
||||
#if defined(MCU_SERIES_H7)
|
||||
PeriphClkInitStruct.PeriphClockSelection |= RCC_PERIPHCLK_RTC;
|
||||
#if defined(OMV_OSC_RTC_CLKSOURCE)
|
||||
PeriphClkInitStruct.RTCClockSelection = OMV_OSC_RTC_CLKSOURCE;
|
||||
#else
|
||||
PeriphClkInitStruct.RTCClockSelection = RCC_RTCCLKSOURCE_LSI;
|
||||
|
||||
#endif
|
||||
PeriphClkInitStruct.PeriphClockSelection |= RCC_PERIPHCLK_RNG;
|
||||
PeriphClkInitStruct.RngClockSelection = OMV_OSC_RNG_CLKSOURCE;
|
||||
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit cb6266ee01c38c1999ac21f93726887c1aa0cb20
|
||||
Subproject commit 188f051dea799e1cdd5e369b013b01ddb4fec25e
|
||||
@ -136,9 +136,11 @@
|
||||
#define OMV_OSC_USB_CLKSOURCE RCC_USBCLKSOURCE_PLL
|
||||
#define OMV_OSC_RNG_CLKSOURCE RCC_RNGCLKSOURCE_HSI48
|
||||
#define OMV_OSC_ADC_CLKSOURCE RCC_ADCCLKSOURCE_PLL2
|
||||
#define OMV_OSC_RTC_CLKSOURCE RCC_RTCCLKSOURCE_LSE
|
||||
#define OMV_OSC_SPI123_CLKSOURCE RCC_SPI123CLKSOURCE_PLL2
|
||||
|
||||
// HSE/HSI/CSI State
|
||||
#define OMV_OSC_LSE_STATE (RCC_LSE_BYPASS)
|
||||
#define OMV_OSC_HSE_STATE (RCC_HSE_ON)
|
||||
#define OMV_OSC_HSI48_STATE (RCC_HSI48_ON)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user