Skip to content
Discussion options

You must be logged in to vote

hi @victorallume

The reason for the flash cache is because the internal flash on STM32 parts uses enormous sector sizes (8-16kiB is not uncommon, but up to 128kiB in some parts), while the filesystem works in blocks that can be more like 512B (e.g. for FAT). So the problem we have is that the filesystem layer issues a write for a block, but we can only erase the entire sector, so first we need to copy the original sector, update the subsection with the block, then write the whole sector out.
That would be extremely inefficient, so we only write the sector out again when either a timer elapses or a write comes in for a block in a different sector.

External flash typically has much smaller …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@victorallume
Comment options

@jimmo
Comment options

Answer selected by victorallume
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants