diff --git a/test-app/app_stm32l0.c b/test-app/app_stm32l0.c index 1697eb61..9cf34a93 100644 --- a/test-app/app_stm32l0.c +++ b/test-app/app_stm32l0.c @@ -81,8 +81,8 @@ #define UART2_RX_PIN 2 #define UART2_TX_PIN 3 -#ifndef CPU_FREQ -#define CPU_FREQ (24000000) +#ifndef CLOCK_SPEED +#define CLOCK_SPEED (24000000) #endif static void uart2_pins_setup(void) @@ -117,7 +117,7 @@ int uart_setup(uint32_t bitrate) UART2_CR1 &= (~UART_CR1_OVER8); /* Configure clock */ - UART2_BRR |= (uint16_t)(CPU_FREQ / bitrate); + UART2_BRR |= (uint16_t)(CLOCK_SPEED / bitrate); /* Configure data bits to 8 */ UART2_CR1 &= ~UART_CR1_SYMBOL_LEN; diff --git a/test-app/system.h b/test-app/system.h index e6876232..5cd9fcc2 100644 --- a/test-app/system.h +++ b/test-app/system.h @@ -23,8 +23,6 @@ #ifndef SYSTEM_H_INCLUDED #define SYSTEM_H_INCLUDED -/* System specific: PLL with 8 MHz external oscillator, CPU at 168MHz */ -#define CPU_FREQ (168000000) #define PLL_FULL_MASK (0x7F037FFF) /* Assembly helpers */