diff --git a/bsp/tm4c129x/applications/board.c b/bsp/tm4c129x/applications/board.c index 6c64a8c141..0da547e867 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 8c1b614172..8103d0b1f1 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 7b8153d4c6..ef95144af1 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.