[STM32] remove superfluous calls to SystemCoreClockUpdate

Supported toolchains initialization steps have been modified to make sure
that mbed_sdk_initi is called _after_ RAM initialization and _before_ C++
objects creation.

since this was done, there is no need to redundant SystemCoreClockUpdates
in the drivers
pull/2917/head
Laurent MEUNIER 2016-07-12 18:16:12 +02:00 committed by Russ Butler
parent bcbe0b17de
commit e8675033f4
13 changed files with 0 additions and 44 deletions

View File

@ -162,9 +162,6 @@ void pwmout_period_us(pwmout_t* obj, int us) {
__HAL_TIM_DISABLE(&TimHandle);
// Update the SystemCoreClock variable
SystemCoreClockUpdate();
/* To make it simple, we use to possible prescaler values which lead to:
* pwm unit = 1us, period/pulse can be from 1us to 65535us
* or

View File

@ -90,10 +90,6 @@ static void init_uart(serial_t *obj)
huart->Init.Mode = UART_MODE_TX_RX;
}
/* uAMR & ARM: Call to UART init is done between reset of pre-initialized variables */
/* and before HAL Init. SystemCoreClock init required here */
SystemCoreClockUpdate();
if (HAL_UART_Init(huart) != HAL_OK) {
error("Cannot initialize UART\n");
}

View File

@ -152,9 +152,6 @@ void pwmout_period_us(pwmout_t* obj, int us)
__HAL_TIM_DISABLE(&TimHandle);
// Update the SystemCoreClock variable
SystemCoreClockUpdate();
/* To make it simple, we use to possible prescaler values which lead to:
* pwm unit = 1us, period/pulse can be from 1us to 65535us
* or

View File

@ -82,10 +82,6 @@ static void init_uart(serial_t *obj)
huart->Init.Mode = UART_MODE_TX_RX;
}
/* uAMR & ARM: Call to UART init is done between reset of pre-initialized variables */
/* and before HAL Init. SystemCoreClock init required here */
SystemCoreClockUpdate();
if (HAL_UART_Init(huart) != HAL_OK) {
error("Cannot initialize UART\n");
}

View File

@ -82,10 +82,6 @@ static void init_uart(serial_t *obj)
huart->Init.Mode = UART_MODE_TX_RX;
}
/* uAMR & ARM: Call to UART init is done between reset of pre-initialized variables */
/* and before HAL Init. SystemCoreClock init required here */
SystemCoreClockUpdate();
if (HAL_UART_Init(huart) != HAL_OK) {
error("Cannot initialize UART\n");
}

View File

@ -113,9 +113,6 @@ void i2c_frequency(i2c_t *obj, int hz)
timeout = LONG_TIMEOUT;
while ((__HAL_I2C_GET_FLAG(&I2cHandle, I2C_FLAG_BUSY)) && (timeout-- != 0));
// Update the SystemCoreClock variable.
SystemCoreClockUpdate();
/*
Values calculated with I2C_Timing_Configuration_V1.0.1.xls file (see AN4235)
* Standard mode (up to 100 kHz)

View File

@ -82,9 +82,6 @@ static void init_uart(serial_t *obj)
huart->Init.Mode = UART_MODE_TX_RX;
}
/* uAMR & ARM: Call to UART init is done between reset of pre-initialized variables */
/* and before HAL Init. SystemCoreClock init required here */
SystemCoreClockUpdate();
if (HAL_UART_Init(huart) != HAL_OK) {
error("Cannot initialize UART\n");

View File

@ -84,10 +84,6 @@ static void init_uart(serial_t *obj)
huart->Init.Mode = UART_MODE_TX_RX;
}
/* uAMR & ARM: Call to UART init is done between reset of pre-initialized variables */
/* and before HAL Init. SystemCoreClock init required here */
SystemCoreClockUpdate();
if (HAL_UART_Init(huart) != HAL_OK) {
error("Cannot initialize UART\n");
}

View File

@ -83,10 +83,6 @@ static void init_uart(serial_t *obj)
huart->Init.Mode = UART_MODE_TX_RX;
}
/* uAMR & ARM: Call to UART init is done between reset of pre-initialized variables */
/* and before HAL Init. SystemCoreClock init required here */
SystemCoreClockUpdate();
if (HAL_UART_Init(huart) != HAL_OK) {
error("Cannot initialize UART\n");
}

View File

@ -166,8 +166,6 @@ void pwmout_period_us(pwmout_t* obj, int us)
__HAL_TIM_DISABLE(&TimHandle);
SystemCoreClockUpdate();
/* To make it simple, we use to possible prescaler values which lead to:
* pwm unit = 1us, period/pulse can be from 1us to 65535us
* or

View File

@ -82,10 +82,6 @@ static void init_uart(serial_t *obj)
huart->Init.Mode = UART_MODE_TX_RX;
}
/* uAMR & ARM: Call to UART init is done between reset of pre-initialized variables */
/* and before HAL Init. SystemCoreClock init required here */
SystemCoreClockUpdate();
if (HAL_UART_Init(huart) != HAL_OK) {
error("Cannot initialize UART\n");
}

View File

@ -167,8 +167,6 @@ void pwmout_period_us(pwmout_t* obj, int us)
__HAL_TIM_DISABLE(&TimHandle);
SystemCoreClockUpdate();
/* To make it simple, we use to possible prescaler values which lead to:
* pwm unit = 1us, period/pulse can be from 1us to 65535us
* or

View File

@ -82,10 +82,6 @@ static void init_uart(serial_t *obj)
huart->Init.Mode = UART_MODE_TX_RX;
}
/* uAMR & ARM: Call to UART init is done between reset of pre-initialized variables */
/* and before HAL Init. SystemCoreClock init required here */
SystemCoreClockUpdate();
if (HAL_UART_Init(huart) != HAL_OK) {
error("Cannot initialize UART\n");
}