C51 COMPILER V9.60.0.0   SYSTEM_UM800X                                                     03/02/2021 17:25:34 PAGE 1   


C51 COMPILER V9.60.0.0, COMPILATION OF MODULE SYSTEM_UM800X
OBJECT MODULE PLACED IN .\Out_Files\system_um800x.obj
COMPILER INVOKED BY: D:\keilc51\C51\BIN\C51.EXE UM800x\system\system_um800x.c COMPACT OMF2 OPTIMIZE(8,SIZE) BROWSE MOD51
                    -7(NOAU) INCDIR(.\APP;.\Common;.\UM800x\driver;.\UM800x\system) DEBUG PRINT(.\Out_Files\system_um800x.lst) OBJECT(.\Out_F
                    -iles\system_um800x.obj)

line level    source

   1          /***********************************************************************
   2           * Copyright (c)  2017 - 2020, Unicmicro Co.,Ltd .
   3           * All rights reserved.
   4           * Filename    : system_um800x.c
   5           * Description : system config source file (for example: clock config.....)
   6           * Author(s)   : Dan
   7           * version     : V1.0
   8           * Modify date : 2020-07-16
   9           ***********************************************************************/
  10           
  11          #include  "system_um800x.h"
  12          #include  "config.h"
  13          
  14          uint32_t SystemCoreClock = 0;   //core时钟 , (uint:Hz)
  15          /************************************************************************
  16           * function   : clock_init
  17           * Description: clock init, initil several clock variables
  18           * input : 
  19           *                uint32_t system_clk_hz
  20           * return: none
  21           ************************************************************************/
  22          void clock_init(uint32_t system_clk_hz)
  23          {
  24   1              CLKCON |= (0x1<<2);                                     //RCH时钟源打开
  25   1              while((CLKCON&0x20) != 0x20);           //等待RC16M时钟稳定     
  26   1                                      
  27   1          RCHDIV &= ~(0x3<<0);
  28   1          RCHDIV |= (0x2<<0);                 //RCH 3分频
  29   1          
  30   1              CLKCON &= ~(0x1<<0);                            //RCH 为高速时钟
  31   1              SYSDIV &= ~(7<<0);                                      //高频时钟不分频作为系统时钟    
  32   1                              
  33   1              SystemCoreClock = system_clk_hz;    //系统时钟
  34   1      }
  35          
  36          /************************************************************************
  37           * function   : systeminit
  38           * Description: systeminit
  39           * input : none
  40           * return: none
  41           ************************************************************************/
  42          void systeminit(void)
  43          {
  44   1          clock_init(FCLK); 
  45   1      }
  46          


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =     49    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =      4       4
C51 COMPILER V9.60.0.0   SYSTEM_UM800X                                                     03/02/2021 17:25:34 PAGE 2   

   DATA SIZE        =   ----    ----
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
   EDATA SIZE       =   ----    ----
   HDATA SIZE       =   ----    ----
   XDATA CONST SIZE =   ----    ----
   FAR CONST SIZE   =   ----    ----
END OF MODULE INFORMATION.


C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)
