Description
Is your enhancement proposal related to a problem? Please describe.
On the stm32u5a9xx
, if we want to use octospi1 for the zephyr/drivers/flash/flash_stm32_ospi.c
and octospi2 for a display we cannot use HAL_OSPI_IRQHandler()
in the octospi2 isr because some weak functions are defined in the flash driver, like HAL_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 in stm32u5xx_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