RCC_APBPeriphClk_Enable1(RCC_APB1_PERIPH_RTC, ENABLE); //打开RTC模块工作时钟 } 2.配置输出...
let xtal_freq_reg = unsafe { &*LP_AON::PTR }.store4().read().bits(); // Values of RTC_XTAL_FREQ_REG and RTC_APB_FREQ_REG are stored as two copies in @@ -324,7 +324,7 @@ impl RtcClock { } /// Get the RTC_SLOW_CLK source pub(crate) fn get_slow_freq() -> RtcSlow...
Re: rtc_clk_cpu_freq_set() lockups Postbypermal»Sat Oct 14, 2017 6:18 pm I'm not 100% sure I understand what you want (what is a 320M PLL?), but I printed the value retrieved via rtc_clk_xtal_freq_get() at the beginning of rtc_clk_cpu_freq_set() at all three frequenc...
// 打开LSE时钟,作为RTC的计数时钟 RCC_APBPeriphClk_Enable1(RCC_APB1_PERIPH_RTC, ENABLE); //打开RTC模块工作时钟 } 2.配置输出时间所需GPIO口以及串口UART配置 void LogInit(void) { } static void SerialInit(uint32_t BaudRate) { uint32_tPCLK_Freq;GPIO_InitTypeDefGPIO_InitStructure= {0};UART_...
clk_prepare_enable--使能pclk和rtc_ck。 stm32_rtc_init stm32_rtc_wpr_unlock stm32_rtc_enter_init_mode stm32_rtc_exit_init_mode stm32_rtc_wait_sync stm32_rtc_wpr_lock platform_get_irq--获取rtc alarm中断号。 device_init_wakeup--设置rtc设备具备唤醒功能。
voidRCC_Configuration(void){RCC_HSI_Enable(RCC_HSIOSC_DIV6);//设置系统时钟为8MRCC_LSE_Enable(RCC_LSE_MODE_OSC,RCC_LSE_AMP_NORMAL,RCC_LSE_DRIVER_NORMAL);// 打开LSE时钟,作为RTC的计数时钟RCC_APBPeriphClk_Enable1(RCC_APB1_PERIPH_RTC,ENABLE);//打开RTC模块工作时钟} ...
cpu_clk_freq_hz =BSP_CPU_ClkFreq();CPU_TS_TmrFreqSet(cpu_clk_freq_hz); ``` }#endif#if(CPU_CFG_TS_TMR_EN == DEF_ENABLED)CPU_TS_TMRCPU_TS_TmrRd(void){return((CPU_TS_TMR)DWT_CYCCNT); }#endif#if(CPU_CFG_TS_32_EN == DEF_ENABLED)CPU_INT64UCPU_TS32_to_uSec(CPU_TS32...
freq = RTC_CPU_FREQ_80M;break; }// Wait for UART TX to finish, otherwise some UART output will be lost// when switching APB frequencyuart_tx_wait_idle(CONFIG_CONSOLE_UART_NUM); rtc_clk_cpu_freq_set(freq); } 開發者ID:mr-nice,項目名稱:esp-idf,代碼行數:41,代碼來源:clk.c ...
直至该位置 1 RTCCLK 时钟周期 根据需要编程预分频器寄存器 RTC_PRER 寄存器: 首先写入同步值,然后 写入异步值 默认情况下, RTC_PRER 预分 频器寄存器初始化为在 RTCCLK = 32768Hz 时为日历 单元提供 1Hz 时钟频率 在影子寄存器中加载时间和日期 设...
*/voidEXTI15_10_IRQHandler(void){if((EXTI_GetITStatus(KEY_BUTTON_EXTI_LINE) != RESET)) {/* Set the LCD Back Color */LCD_SetBackColor(White);/* Enable the RTC Clock */RCC_RTCCLKCmd(ENABLE);/* Wait for RTC APB registers synchronisation */RTC_WaitForSynchro();/* Enable the alarmA...