flash: stm32_ospi: weak callbacks cannot be used by multiple octospi drivers #84647
Labels
area: Display
Enhancement
Changes/Updates/Additions to existing features
platform: STM32
ST Micro STM32
Is your enhancement proposal related to a problem? Please describe.
On the
stm32u5a9xx
, if we want to use octospi1 for thezephyr/drivers/flash/flash_stm32_ospi.c
and octospi2 for a display we cannot useHAL_OSPI_IRQHandler()
in the octospi2 isr because some weak functions are defined in the flash driver, likeHAL_OSPI_TxCpltCallback()
and they would be called on octospi2 interrupts.Describe the solution you'd like
1/ I would like to be able to call
HAL_OSPI_IRQHandler()
in the display driver isr because it contains a bit of logic. To do so, I think it should be possible in stm32cube hal to use callbacks instead of weak functions but it requires to enable it directly instm32u5xx_hal_conf.h
as it's not configurable using Kconfig.Describe alternatives you've considered
2/ An alternative would be to copy paste the HAL_OSPI_IRQHandler() function into the display driver.
3/ A second alternative would be to implement a octospi driver for
st,stm32-ospi
and move into it the octospi related part from the flash and display drivers. Then in this driver we should be able to define the weak callbacks.Additional context
The text was updated successfully, but these errors were encountered: