The USB-MSC Example read incorrect content of boot sector. Why?
My goal is to rework the SD-card code with FatFS in non-blocking mode. When I start to read the SD card with the help of DMA, I have been surprised that the boot sector (sector #0) has somehow 'damaged' content (0x55AA signature at the end, but many zeroes at the start), but the SDMMC module signals correct operations (no CRC errors, etc.)
So I started to look into 'USB-MSC Example' and the results of reading sector #0 is exactly the same as in my code. But because the 'USB-MSC Example' seems working from the PC side point of view I have digged deeper into this official example. After some moment I have recognized, that the 'USB-MSC Example' reads sector #0 many times (8 retries) until it gets the correct content.
And there is my question. Why this sector is not read correctly on the first try? Is it really necessary to retry reading? And if yes, how can I recognize, that this time I get the correct content?
I am sorry for such a long question, but any idea/help is really welcome.
Regards,
Jarda
