changes to the GUI to allow for better loading and writing as well as tested our...
[goodfet] / firmware / lib / system_stm32f4xx.c
index 0ffcea0..51aaba1 100644 (file)
 \r
   uint32_t SystemCoreClock = 168000000;\r
 \r
 \r
   uint32_t SystemCoreClock = 168000000;\r
 \r
-  __I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};\r
+//__I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};\r
+__attribute__ ((section (".text"))) uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};\r
 \r
 /**\r
   * @}\r
 \r
 /**\r
   * @}\r
@@ -208,6 +209,8 @@ static void SetSysClock(void);
   */\r
 void SystemInit(void)\r
 {\r
   */\r
 void SystemInit(void)\r
 {\r
+  SystemCoreClock = 168000000; //In case global variables aren't initted.\r
+  \r
   /* Reset the RCC clock configuration to the default reset state ------------*/\r
   /* Set HSION bit */\r
   RCC->CR |= (uint32_t)0x00000001;\r
   /* Reset the RCC clock configuration to the default reset state ------------*/\r
   /* Set HSION bit */\r
   RCC->CR |= (uint32_t)0x00000001;\r