Tool/software:
Regarding the example 'ospi_flash_io_am263px-cc_r5fss0-0_nortos_ti-arm-clang'. It is bare metal and runs only once.
I have FreeRTOS running some time tasks at 1ms, 2ms, 4ms, 8ms and 20ms.
Since flash operations take a long time then I am calling functions such as Flash_write() from the vApplicationIdleHook in FreeRTOS. If I used 20ms task, it would overrun of course.
I am able to write large blocks of data, say 32k with no issue. By "no issue", I mean Flash_write() returns successfully and the time tasks listed above continue to interrupt the idle hook and execute as normal.
However, if I do a Flash_read() of more than about 1k, the application stops in the following assert trap.
<Question>
1. Can you think of a reason why Flash_write() works fine but Flash_read() causes a FreeRTOS trap please?
2. What is the best way to do lengthy flash operations in a FreeRTOS environment? I am using the idle hook but is that the best approach?
Thank you.