K64f Writing to flash within RTOS while leaving interrupts enabled

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

K64f Writing to flash within RTOS while leaving interrupts enabled

601 Views
unknowncoder
Contributor III

Hello, 

I am using the program flash to save some data.

The flash block (i.e 4KB) that stores the data is not used for anything else that is the entire block is dedicated to storing data. 

Now if this the case do I need to disable interrupts to avoid memory access violations like Read while write (RWW).

As far as I understand if the block doesn't have anything else accessing it this should be fine.

The ways the flash write layer is mutex protected between threads.

Labels (1)
2 Replies

434 Views
mjbcswitzerland
Specialist V


Hi

The K64 has 4k sectors (not blocks). It has 2 x 512k blocks (also often referred to as planes). This means that you can't access any code in a 512k block (or a sector in that block) when the same block is being operated on (written/erased).

Regards

Mark

Kinetis: http://www.utasker.com/kinetis.html
Kinetis K64:
- http://www.utasker.com/kinetis/FRDM-K64F.html
- http://www.utasker.com/kinetis/TWR-K64F120M.html
- http://www.utasker.com/kinetis/TEENSY_3.5.html
- http://www.utasker.com/kinetis/Hexiwear-K64F.html


Free Open Source solution: https://github.com/uTasker/uTasker-Kinetis
Working project in 15 minutes video: https://youtu.be/K8ScSgpgQ6M

For better, faster, cheaper product developments consider the uTasker developer's version, professional Kinetis support, one-on-one training and complete fast-track project solutions to set you apart from the herd : http://www.utasker.com/support.html

434 Views
unknowncoder
Contributor III

Hi, 

Thanks for clearing this up I was thinking of the sectors as block.

0 Kudos