File writing bug with FatFs over FreeRTOS on H743
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-25 9:00 AM
Hi!
I would like to store files on an SD card that are transmitted via HTTP POST (lwIP HTTP server). The files are correctly transmitted (hash calculating on both sides, the hashes are equal) and then written out to the card. But the content of the file is wrong: there is an additional byte before my content (and the last byte is missing, e.g. the file size is correct).
I've checked the data in the HAL_SD_WriteBlocks_DMA method before write, and everything is correct.
The cache maintenance (ENABLE_SD_DMA_CACHE_MAINTENANCE) macro is also defined. (And 1-byte offset bug cannot be by cache miss).
Another interesting thing it seems to be somehow timing related.
What can I check?
Regards,
Solved! Go to Solution.
- Labels:
-
Bug-report
-
FatFS
-
FreeRTOS
-
STM32H7 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-26 7:18 AM
This ST code base is a joke. Of course I ran into other problems immediately:
and this:
How is it possible to publish such a garbage which contains 2 years old bugs? It doesn't even compile and after fixing doesn't run ;(
***Moderation Edit: while the negative feedback is welcome, please refrain from using curse words or inflammatory language as it goes against the Community Ground Rules***
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-25 9:52 AM
memory alignment?
Shifted by 1-byte does seem a bit strange.
Buffer locked/protected from modification until the command completes?
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-26 4:23 AM
You are right, thanks a lot! I debugged and it was a memory alignment issue. BUT: why doesn't the driver complain in any form? Assert? Exit? It is very annoying! How can I ask feature from the FW developers?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-26 7:18 AM
This ST code base is a joke. Of course I ran into other problems immediately:
and this:
How is it possible to publish such a garbage which contains 2 years old bugs? It doesn't even compile and after fixing doesn't run ;(
***Moderation Edit: while the negative feedback is welcome, please refrain from using curse words or inflammatory language as it goes against the Community Ground Rules***
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-26 12:27 PM
I've found another bug which is presented:
Catastrophic!
