Read flash using Freertos

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Read flash using Freertos

Jump to solution
1,885 Views
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 Kudos
Reply
1 Solution
1,870 Views
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

View solution in original post

4 Replies
1,879 Views
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 Kudos
Reply
1,873 Views
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 Kudos
Reply
1,871 Views
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

1,866 Views
andréluis
Contributor II

Ok Erich. Thanks for the help. Very grateful.

0 Kudos
Reply