Read flash using Freertos

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Read flash using Freertos

跳至解决方案
2,774 次查看
andréluis
Contributor II

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.

0 项奖励
回复
1 解答
2,759 次查看
ErichStyger
Specialist I

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

在原帖中查看解决方案

4 回复数
2,768 次查看
ErichStyger
Specialist I

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

0 项奖励
回复
2,762 次查看
andréluis
Contributor II

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.

0 项奖励
回复
2,760 次查看
ErichStyger
Specialist I

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

2,755 次查看
andréluis
Contributor II

Ok Erich. Thanks for the help. Very grateful.

0 项奖励
回复