Advertisement
Guest User

Running Mandel.c on a Cerb40

a guest
Feb 14th, 2013
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.42 KB | None | 0 0
  1. void clock_setup(void)
  2. {
  3.   // This is not permissible on CERB40, b/c there's no crystal                                                  
  4.     /* Enable high-speed clock at 120MHz */
  5.         //rcc_clock_setup_hse_3v3(&hse_8mhz_3v3[CLOCK_3V3_120MHZ]);                                              
  6.  
  7.  
  8.   /* Reset the RCC clock configuration to the default reset state ------------*/
  9.   /* Set HSION bit */
  10.   //RCC->CR |= (uint32_t)0x00000001;                                                                            
  11.   RCC_CR |= (uint32_t)0x00000001;
  12.  
  13.   /* Reset CFGR register */
  14.   //RCC->CFGR = 0x00000000;                                                                                      
  15.   RCC_CFGR = 0x00000000;
  16.  
  17.   /* Reset HSEON, CSSON and PLLON bits */
  18.   //RCC->CR &= (uint32_t)0xFEF6FFFF;                                                                            
  19.   RCC_CR &= (uint32_t)0xFEF6FFFF;
  20.  
  21.   /* Reset PLLCFGR register */
  22.   //RCC->PLLCFGR = 0x24003010;                                                                                  
  23.   RCC_PLLCFGR = 0x24003010;
  24.  
  25.  
  26.   /* Reset HSEBYP bit */
  27.   //RCC->CR &= (uint32_t)0xFFFBFFFF;                                                                            
  28.   RCC_CR &= (uint32_t)0xFFFBFFFF;
  29.  
  30.   /* Disable all interrupts */
  31.   //RCC->CIR = 0x00000000;                                                                                      
  32.   RCC_CIR = 0x00000000;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement