2016-07-22 01:39 AM
Hello friends ;
We have a datalogger based on stm32f4 discovery ; we log the data in external flash disck 8GB ( scan disck ) ; we noticed that about 20% of the usb discs we used don't work .
STM32f4 detect the usb ; but file system cant read data or open file or write data ., but the same usb work good when we put to PC .
Maybe some of you had this issue before so I would be thankful if you could help; I was debugging for few days but could not find the solution ; I am not sure if it it a usb timing problem or the fat32 library problem .
Could you guide me to solve it please ?
Thank you in advanced .
Best Regards
2016-07-22 04:31 AM
ST in the past has decribed issues related to poor oscillators in USB Flash drives, perhaps in the readme file for the fw upgrade example.
Why dont you describe the error numbers you are seeing at the FATFS and DISKIO layers, and the nature of the data returned?2016-07-22 08:00 AM
Hi ASSAAD,
I suggest to have a look to ''MSC_Standalone'' example in STM32CubeF4 at this path: STM32Cube_FW_F4_V1.12.0\Projects\STM324xG_EVAL\Applications\USB_Host\MSC_Standalone This application is based on read/write file and explore the USB flash disk content trough a MSC routine. Compare the code there to your own code to identify what you have missed. -Hannibal-2016-07-22 08:35 AM
2016-07-22 08:36 AM
Thank you Hannibal ;
I Will look to the example and return you an feedback soon . Regards2016-07-22 08:53 AM
Works on a PC != Specification Compliant, it suggests that the Flash Drives are built with components that don't guarantee functionality with all systems.
Known limitations
- For some USB Disk flashs, in the Full speed mode, the USB clock accuracy is
not in line with the clock variance recommended in the USB 2.0 specification.
Thus, the USB OTG FS core may not work properly on these devices.
It is recommended to use certified USB disks.
2016-07-25 08:28 AM
Hello Clive ;
Sorry for the late reply ; I could not sign in the forum ; I wanted to say it work with PC to confirm that the flah disk is operating and crashed. I know that all flash memories work with PC . The USB driver detect the USB pen ; but the file system fatft crashed there with error ; I contacted SCAN DISC they told that thier USB is certificied ; but I did not know which kind of certification thay have . Here I really struggled ; because most of thier flashes work good with our boards ; about 20 % not ok . For the clock problem ; is thier a software solution for it ? any idea ? Thank you for your effort Regards2016-07-25 08:47 AM
I contacted SCAN DISC they told that their USB is certified
SanDisk perhaps?Your options here would be to evaluate the accuracy of the HSE clock source on the STM32F4-DISCO, I haven't looked at the ppm rating, You could push a 48 MHz PLL signal out via the MCO (PA8) and qualify/validate the frequency against an accurate reference.You could perhaps use a USB Protocol Analyzer to validate it from that perspective.2016-12-08 04:50 AM
Hello Again ;
The problem is that the orginal software of the discovery board can not work with USB flashed version 2.1 only work with USB flashed 2.0 .
But when using the HAL example of the discovery it works ; we noticed that the usb core library is changed .
However ; our project depends on the standart old example of the discovery to move to the Hal libra we need time ; for urgent work is there a usb library that would operate with the old standart library ?
or any other suggestions ?
Thank you inadvanced