Global Top Smart MCU Innovator, ABOV Semiconductor
www.abovsemi.com
A31G22x
Clock Setting Guide
Application Note
Version 1.01
Страница 1: ...Global Top Smart MCU Innovator ABOV Semiconductor www abovsemi com A31G22x Clock Setting Guide Application Note Version 1 01...
Страница 2: ...F W Configuration 12 4 3 LSE Clock 13 4 3 1 H W Configuration 13 4 3 2 F W Configuration 14 4 4 HSE Clock 15 4 4 1 H W Configuration 15 4 4 2 F W Configuration 16 4 5 PLL Clock 17 4 5 1 PLL Block Dia...
Страница 3: ...17 Figure 10 PLL Clock F W Configuration Example 1 19 Figure 11 PLL Clock F W Configuration Example 2 21 Figure 12 Flash Access Timing F W Configuration 23 Figure 13 System Main Clock Output 24 Figure...
Страница 4: ...PCLK APB Clock MCLK Main Clock LSI Low Speed Internal Clock HSI High Speed Internal Clock LSE Low Speed External Clock HSE High Speed External Clock PLL Phase Locked Loop Clock XTAL External Crystal S...
Страница 5: ...ication Specifically the SCU allows users to configure a main system clock by selecting and setting a clock source for the user system In this application note users can learn a method to select a cor...
Страница 6: ...other is PCLK using APB bus which produces a clock signal for peripheral systems Table 2 Main Clock Branches Clock Source Clock Bus Description Modules MCLK HCLK High Speed Clock Bus Core Flash Memor...
Страница 7: ...TSSENSECLK TSREFCLK M U X MCLK M U X PCLK PLLBYPASS PLLOUTPUT NOTES 1 In the block diagram above peripheral blocks not specified in the SCU_MCCRx register use PCLK as a reference clock by default 2 I...
Страница 8: ...PCLK END Peripheral clock MCCRn Select clock for Peripheral In SCU_PPCLKSR Select MCCRn for the Peripheral to use Y Peripheral clock PCLK Exception WT WDT LCD N WT LSE WDTRC WDT WDTRC LCD LSE WDTRC S...
Страница 9: ...ls Peripheral Clock Clock Bus Clock Source Core HCLK CFMC HCLK PCLK DFMC HCLK PCLK DMAC HCLK PCLK CRC PCLK SysTick HCLK SCU_MCCR1 LSI HSI LSE HSE MCLK PLL TIMER1n PCLK SCU_MCCR1 LSI HSI LSE HSE MCLK P...
Страница 10: ...DTRC LSI 16 SCU_MCCR3 LSI HSI LSE HSE MCLK PLL PCU PCLK PCU Debounce Clock SCU_MCCR4 LSI HSI LSE HSE MCLK PLL USART PCLK UART PCLK SPI PCLK I2C PCLK LCD PCLK WDTRC LSI 16 SCU_MCCR5 LSI HSI LSE HSE MCL...
Страница 11: ...ng these clock sources Table 4 Definition of Clock Sources Clock source Frequency Range Clock Bus Supply Voltage V LSI 500kHz 20 Main clock Peripheral clock WDTRC Divided by 16 1 8 to 5 5 HSI 32MHz 1...
Страница 12: ...users can implement user application system with a low cost and effective solution 4 1 1 F W Configuration Right after applying power although the LSI clock is in Always On but explicitly the LSI cloc...
Страница 13: ...erations that makes accurate time measurement The RTC is realized by dividing the clock using the pre scaler and usually required for Time Critical System Tolerance of the LSE clock reflects the chara...
Страница 14: ...be set before enabling the LSE clock After enabling the LSE clock stabilization time for the SXTAL is required Next users must set the LSE clock source as the system clock and update the global variab...
Страница 15: ...the main external crystal XTAL as shown in Figure 7 Please remember that the External Load Caps C1 and C2 in the figure are varied by the value of minimum operation voltage and XTAL frequency of the a...
Страница 16: ...be set before enabling the HSE clock After enabling the HSE clock stabilization time for the XTAL is required Next users must set the HSE clock source as the system clock and update the global variabl...
Страница 17: ...cy 4 5 1 PLL Block Diagram R PFD CP VCO LPF N1 D N2 P POR LOCK DETECT PLLEN PLLRSTB fPLLINCLK PLLLOCK RST_I fDOUBLE fVCO x 2 fVCO EN PORST VCTRL PLLRSTB BYPASSB PLLINCLK fPLLOUT 0 1 fIN NOTES 1 Set PL...
Страница 18: ...2MHz At this time the range of fVCO output frequency should be set to 200MHz or less and the calculation formula is shown below VCO IN N1 1 VCO 200MHz The SCU_PLLCON register also supports the Doubler...
Страница 19: ...LINCLK 32MHz is used without change since the fIN ranges from 1MHz to 3MHz and the value of PREDIV R can be between 0 and 7 at this time the fPLLINCLK clock that is HSI clock is divided by 2 in the SC...
Страница 20: ...et BYPASSB bit to enable PLL Output Bypass mode Set PLLEN and PLLRSTB bits to enable PLL and PLL Reset Set PREDIV to the value that you defined for the PLL Divider in the step3 Option Update the SCU_P...
Страница 21: ...at operates with 8MHz XTAL Figure 11 PLL Clock F W Configuration Example 2 1 Set XIN and XOUT pins and enable HSE clock source At this time fPLLINCLK is 8MH fPLLINCLK 8MHz 1 8MHz SCU_CSCR HSECON 3 0 0...
Страница 22: ...r Set BYPASSB bit to enable PLL Output Bypass mode Set PLLEN and PLLRSTB bits to enable PLL and PLL Reset Set PREDIV to the value that you defined for the PLL Divider in the step3 Update the SCU_PLLCO...
Страница 23: ...clock MCLK HCLK and the Wait time 1 20 Table 7 Flash Wait Time Values Register Field WAIT Value Description Max Flash Access Speed CFMC_CFG WAIT or DFMC_CFG WAIT 0 Flash access in 1 cycle 0 wait Up t...
Страница 24: ...s an Alternative Function and select a CLKO function 2 Configure the SCU_COR register to enable the CLKO Divider and set its value Set CLKOEN bit to 1 This means CLKO is enabled Set CLKODIV bits to th...
Страница 25: ...System Main Clock 25 Users can measure the signal at the CLKO pin PF4 by connecting an oscilloscope probe The signal is about 50kHz Pulse Wave resulted from the LSI clock divided by 10 Figure 14 Osci...
Страница 26: ...initialization Figure 15 Example Project Changing System Clock When the power is applied to the system 500kHz of LSI operates In operation of the main the main clock is initialized by the function Sys...
Страница 27: ...A31G22x Clock Setting Guide 8 References 27 8 References A31G22x User s Manual A31G22x Datasheet...
Страница 28: ...1G22x Clock Setting Guide 28 Revision History Version Date Description 1 00 20 12 10 Initial preliminary version created 1 01 21 01 18 Revised description in 3 1 Figure 2 4 3 4 4 and 4 5 Added CLKO fo...
Страница 29: ...nd shall not be responsible or liable for any injuries or damages related to use of ABOV products in such unauthorized applications ABOV and the ABOV logo are trademarks of ABOV All other product or s...