2023-04-27 12:53 AM - edited 2023-11-20 06:59 AM
Hi, I am currently working on an project which uses CMSIS RTOS V2(freertos version)
There are total 5 tasks running inside the system and one of the task uses internal flash function only once if there are changes to parameter functions inside the system and internal flash usage only occurs if necessary, before system is going to go into sleep mode.
Now I am also using FMC for external NOR flash and external RTC is also connected to FMC controller.
Issue:
The issue occurs when system is going to write into internal flash. during writing of internal flash, I erase the set pages and doing that programming sequence error occur, I have tried clearing that error and it does not matter what I do that error immediately occurs again.
Now according to datasheet FMC also uses same bus as that of internal flash, so what I did I disabled the FMC completely to check if internal flash will work but the issue remains still.
I am also using proper mutuex/semi to so other tasks does not use internal flash, I am also disabling interrupts, heck I also disabled task switching while using internal flash, but the error of programming sequence remains the same. At this point I am out of ideas.
I have also made separate bare project of rtos and tried flash in there and it works, but not with this project.
Writing to Flash
Reading from Flash