SIB read-modify-write fails | Cypress Semiconductor
SIB read-modify-write fails
I'm currently facing an issue with my access to the eMMC memory. To have a byte write API in upper levels, I implement an eMMC block read-modify-write in the FX3 firmware. Initially, things looked good, however, when I'm testing very high byte addresses (i.e. the ones in the highest few blocks of the big user partition), I find out that it does not work correctly.
Stepping through the whole code with the debugger, everything always worked properly (not a very nice effect, when you try to track down an error). With this result, I started to insert sleeps into the code to make out which wait actually has influence on the issue, and found out that its the one right before writing back the block(s). It's the [CyU3PThreadSleep(1)] statement in the appended code extract.
Any hint, what kind of effect this is? Actually, I'm using debug build configuration, so no "optimizing away" things should happen. Is there any restrictions in accessing the same eMMC block (read-modify-write). I assumed that waiting for read buffer, waiting for completion (DMA methods) should be enough. Is there some additional SIB/eMMC busy flag I'm not aware of?