diff --git a/bsp/tm4c129x/applications/board.c b/bsp/tm4c129x/applications/board.c index 6c64a8c141b4b15b6d47761057316601dc54b576..0da547e8674d942548080d2c76c6e798c02892e1 100644 --- a/bsp/tm4c129x/applications/board.c +++ b/bsp/tm4c129x/applications/board.c @@ -25,8 +25,7 @@ #include "driverlib/rom_map.h" #define SYS_CLOCK_DEFAULT 120000000 -uint32_t SysClock; - +uint32_t SystemCoreClock; #define FAULT_NMI 2 // NMI fault #define FAULT_HARD 3 // Hard fault #define FAULT_MPU 4 // MPU fault @@ -81,12 +80,12 @@ int rt_hw_cpu_init(void) // Set the clocking to run directly from the external crystal/oscillator. // TODO: The SYSCTL_XTAL_ value must be changed to match the value of the // crystal on your board. - SysClock = MAP_SysCtlClockFreqSet( + SystemCoreClock = MAP_SysCtlClockFreqSet( (SYSCTL_XTAL_25MHZ | SYSCTL_OSC_MAIN | SYSCTL_USE_PLL | SYSCTL_CFG_VCO_480), SYS_CLOCK_DEFAULT); MAP_SysTickDisable(); - MAP_SysTickPeriodSet(SysClock/ RT_TICK_PER_SECOND - 1); + MAP_SysTickPeriodSet(SystemCoreClock/ RT_TICK_PER_SECOND - 1); MAP_SysTickIntEnable(); MAP_SysTickEnable(); diff --git a/bsp/tm4c129x/applications/board.h b/bsp/tm4c129x/applications/board.h index 8c1b6141722e27b407148514d8ed4468b2dab87b..8103d0b1f198bd148c5cffc44e69f31e6b3e48f2 100644 --- a/bsp/tm4c129x/applications/board.h +++ b/bsp/tm4c129x/applications/board.h @@ -22,8 +22,7 @@ #include #include -extern uint32_t SysClock; - +extern uint32_t SystemCoreClock; #ifdef __CC_ARM extern int Image$$RW_IRAM$$ZI$$Limit; #define HEAP_BEGIN ((void *)&Image$$RW_IRAM$$ZI$$Limit) diff --git a/bsp/tm4c129x/drivers/drv_uart.c b/bsp/tm4c129x/drivers/drv_uart.c index 7b8153d4c60821245e4906c93d4f288622b47f4d..ef95144af15667055cc6661c0652ebaac9d0d07b 100644 --- a/bsp/tm4c129x/drivers/drv_uart.c +++ b/bsp/tm4c129x/drivers/drv_uart.c @@ -92,7 +92,7 @@ static rt_err_t hw_configure(struct rt_serial_device *serial, struct serial_conf } // Initialize UART0 peripheral with given to corresponding parameter - MAP_UARTConfigSetExpClk(uart->hw_base, SysClock, cfg->baud_rate, config); + MAP_UARTConfigSetExpClk(uart->hw_base, SystemCoreClock, cfg->baud_rate, config); MAP_UARTFIFOEnable(uart->hw_base); // Enable the UART.