modify the div value when calling octo controller.

For ST OSPI controller driver(stm32l4xx_hal_ospi.c), the frequency it has be subtracted 1, so "div = div - 1;" should be removed.
pull/12937/head
rogeryou 2020-05-07 16:10:49 +08:00
parent f13ae088d2
commit de9b283abe
1 changed files with 0 additions and 4 deletions

View File

@ -712,10 +712,6 @@ qspi_status_t qspi_frequency(qspi_t *obj, int hz)
int div = HAL_RCC_GetHCLKFreq() / hz;
if (div > 255) {
div = 255;
} else {
if ((HAL_RCC_GetHCLKFreq() % hz) == 0) {
div = div - 1;
}
}
obj->handle.Init.ClockPrescaler = div;