2025-02-26 1:06 PM
Hi,
I am running my Zephyr application from an OSPI external flash and would like to write to the same flash. The MCU is an STM32H723, and the flash is an IS25LP128.
However, the flash_stm32_ospi_write method in zephyr/drivers/flash/flash_stm32_ospi.c causes my application to hang. The issue seems to be that the relevant semaphores are not initialized in the flash_stm32_ospi_init function.
To address this, I added the following two lines to flash_stm32_ospi_init:
k_sem_init(&dev_data->sem, 1, 1);
k_sem_init(&dev_data->sync, 0, 1);
After this modification, I am having problems in aborting the ongoing memory-mapped operation.
Could anyone provide guidance on properly handling flash write in XIP mode. Any pointers or suggestions would be greatly appreciated!
Thanks.