File corruption after eMMC formatting
Hi all,
I am using cubeMx code base for interfacing eMMC with controller STM32L496QGI6. With the support of FAT FS, I could write/read files to/from eMMC. But I am having two issues.
#issue 1. Getting issues after formatting emmc from the device( by using "f_mkfs" api). Every time the files written to emmc after format is getting corrupted and this has been verified by mounting emmc as MSD( care taken about the unmounting of emmc before initializing the USB MSD stack). Also it is taking long time to detect on PC and some times it won't detect. I am doing a processor reset after every USB disconnection from PC( it is a requirement). Interesting thing is that from second USB plugging on wards(after formatting) file is showing correctly on PC.
Eg.
- File content just after formatting and plugging device to PC :
øÿÿÿÿÿÿÿÿÿÿÿÿ
2. File content on second USB plugging :
USB initialized ( on second connection this string looks readable, earlier it was øÿÿÿÿÿÿÿÿÿÿÿÿ)
USB initialized
Same behavior is also seeing when formatting from PC.
#issue 2. After renaming a folder from PC the contents inside that is not listing, I mean there is nothing inside the folder.
But if I reconnect USB, I can see the renamed folder and its contents. As mentioned earlier I am doing processor reset after very USB disconnection.
Can anyone help me to resolve these issues
Thanks in advance.
Pramod.
