Setting Octospi free running clock mode
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-19 5: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:
- enabling the Free running clock forces the OCTOSPI to enter a busy state, no OCTOSPI command operation can be initiated in this state. Disabling the free
- running clock will be done by making an abort.
I hope my answer helped you, when your question is answered please close this topic by marking it as Best
Chahinez.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-19 5: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:
- enabling the Free running clock forces the OCTOSPI to enter a busy state, no OCTOSPI command operation can be initiated in this state. Disabling the free
- running clock will be done by making an abort.
I hope my answer helped you, when your question is answered please close this topic by marking it as Best
Chahinez.
