mirror of https://github.com/ARMmbed/mbed-os.git
[HAL][ARCH-MAX] SPI was fixed to minimum frequency
Due to typo in the #ifdef it would completely skip the ARCH-MAX when changing the SPI code, causing it to be stuck at lowest frequency.pull/1115/head
parent
4d310b79d9
commit
b5b96df58f
|
@ -214,7 +214,7 @@ void spi_format(spi_t *obj, int bits, int mode, int slave)
|
|||
|
||||
void spi_frequency(spi_t *obj, int hz)
|
||||
{
|
||||
#if defined(TARGET_STM32F401RE) || defined(TARGET_STM32F401VC) || defined(TARGET_F407VG)
|
||||
#if defined(TARGET_STM32F401RE) || defined(TARGET_STM32F401VC) || defined(TARGET_STM32F407VG)
|
||||
// Note: The frequencies are obtained with SPI1 clock = 84 MHz (APB2 clock)
|
||||
if (hz < 600000) {
|
||||
obj->br_presc = SPI_BAUDRATEPRESCALER_256; // 330 kHz
|
||||
|
|
Loading…
Reference in New Issue