Hi,
I noticed that fx_stm32_levelx_nand_driver.c sets current_driver->initialized = FX_TRUE after a successful lx_nand_flash_open().
However, in the FX_DRIVER_UNINIT case, it calls lx_nand_flash_close() but does not set current_driver->initialized back to FX_FALSE.
Could this cause a later FX_DRIVER_INIT to skip lx_nand_flash_open() because initialized is still FX_TRUE, even though the LevelX NAND instance was already closed?
Would it make sense to reset the flag after a successful close, e.g.:
if (status == LX_SUCCESS)
{
current_driver->initialized = FX_FALSE;
media_ptr->fx_media_driver_status = FX_SUCCESS;
}
Thanks!
Hi,
I noticed that
fx_stm32_levelx_nand_driver.csetscurrent_driver->initialized = FX_TRUEafter a successfullx_nand_flash_open().However, in the
FX_DRIVER_UNINITcase, it callslx_nand_flash_close()but does not setcurrent_driver->initializedback toFX_FALSE.Could this cause a later
FX_DRIVER_INITto skiplx_nand_flash_open()becauseinitializedis stillFX_TRUE, even though the LevelX NAND instance was already closed?Would it make sense to reset the flag after a successful close, e.g.:
Thanks!