Hi, my name is André, and i have one question. I'm using freertos with FRDM-K64. My question it's about to read flash in different tasks using Freertos. How can i make the read of the flash without problems? Read directly from the flash have some trouble using 3 tasks by example? Some good habits to read from flash with Rtos?
Thanks for the help.
Solved! Go to Solution.
Yes, as many task can read the memory from internal FLASH, because the reading will not cause any reentrancy issues. But only as long as you are not writing or changing that flash memory.
Just the usual reentrancy stuff
Not sure where you see any problems?
Reading from internal flash memory should not be an issue, just use a constant pointer or any memory mapped data.
If you are going to use external FLASH through (Q)SPI or similar bus, you would have to establish a mutex/critical section to ensure correct parallel access.
In a similar way, access to a flash based file system works the same: https://mcuoneclipse.com/2020/05/20/fatfs-minini-shell-and-freertos-for-the-nxp-k22fn512/
I hope this helps,
Erich
Thanks for the help Erich. The question is i don't know if two tasks can read the same area of memory in the same time because the 3 tasks read the area. But i will make the project like you said.
Thanks again.
Yes, as many task can read the memory from internal FLASH, because the reading will not cause any reentrancy issues. But only as long as you are not writing or changing that flash memory.
Just the usual reentrancy stuff
Ok Erich. Thanks for the help. Very grateful.