2021-11-09 12:39 PM
Anyone knows why in HAL_OSPI_Init(...) , Octospi free running clock has to be enabled after Octospi is enabled. Form stm32l5xx-hal_ospi.c, lines 404-411:
/* Enable OctoSPI */
__HAL_OSPI_ENABLE(hospi);
/* Enable free running clock if needed : must be done after OSPI enable */
if (hospi->Init.FreeRunningClock == HAL_OSPI_FREERUNCLK_ENABLE)
{
SET_BIT(hospi->Instance->DCR1, OCTOSPI_DCR1_FRCK);
}
Solved! Go to Solution.
2021-11-19 05:54 AM
Hello @xinu2021,
The Free running clock principal use case is for Delay block Calibration with OCTOSPI , since that the DLYB calibration require a continuous clock it is a must to enable the Free running when calibrating it with OCTOSPI. After that, the FRCK can be disabled.
In The OSPI_Init section, we give the flexibility to our users to use it for other purposes, you can enable free running clock after enabling the OCTOSPI but must pay attention when using it:
I hope my answer helped you, when your question is answered please close this topic by marking it as Best
Chahinez.
2021-11-19 05:54 AM
Hello @xinu2021,
The Free running clock principal use case is for Delay block Calibration with OCTOSPI , since that the DLYB calibration require a continuous clock it is a must to enable the Free running when calibrating it with OCTOSPI. After that, the FRCK can be disabled.
In The OSPI_Init section, we give the flexibility to our users to use it for other purposes, you can enable free running clock after enabling the OCTOSPI but must pay attention when using it:
I hope my answer helped you, when your question is answered please close this topic by marking it as Best
Chahinez.