2023-10-08 01:24 PM - edited 2023-10-09 12:50 AM
i tried to build a simple audio player , data from SD-card to USB audio host.
audio host is a big mystery , only (in STM world) one (!) example now, with Azure rtos + USBx .
(CubeIDE 1.13.1 , H563zit-nucleo board )
ok, seem to work now, but SD-card reading with Filex not working - what a surprise.
tried to debug, but i cannot find the problem...debug shows access to read low level sectors work,
but after ...> 100 sectors reading, first "logical" sector access, then hard fault. always.
but i cannot find out, whats wrong here.
last sector read seem ok, can see data (FAT32 etc.) , but next read to "first logical sector" gives hard fault...
Solved! Go to Solution.
2023-12-07 01:50 AM - edited 2023-12-23 02:47 AM
Update: now with short wires (about 25mm lenght) to sd-card-holder also 4-bit mode working with all cards i tested;
Speed is 100Mbit ( 4 x 25Mbit ) with "good" cards: Transcend, Kingston canvas select plus 32GB.
Speed is 200Mbit ( 4 x 50Mbit ) with SanDisk extreme 32GB; about 22MB/s .
Just the port pin setting i have different from "what STM Cube forces you" :
GPIO_PULLUP; + GPIO_SPEED_FREQ_MEDIUM;
Without pullups its not working, so i think STM should change this setting in Cube.
2023-10-08 11:40 PM
and: sd-card mount most times working (with 2GB card , FAT16 ; not good with 8GB FAT32 :(
so hardware access (4 bit mode, 50Mbit max) seems ok.
2023-10-09 06:18 AM
so- nobody using Filex (on SD-card) ???
2023-10-10 09:27 AM
Hi @AScha.3 ,
from the screenshot, you seem to have enabled the fault tolerance in FileX is that the case?
is there any reason to enable it?
regards
Haithem.
2023-10-10 10:05 AM
Hi @Haithem Rahmani ,
this was my last idea, what could help this MS**bleep** to get it working.
But first, thx to look+write here , i already was thinking, STM no more has much interest in any problems of customers or users...
But anyway, i kicked out this MS excrement. not working at all...imagine : the company , that was "creator" of fatfs, makes program (or STM spoils it ? ) that cannot work with fatfs systems... tragedy. or almost comedy level.
Now , after debugging 5 days this nonsense, i just copied in Mr. Changs fatfs ( Generic FAT Filesystem module R0.15 , not the 6 year old version, that STM still has in Cube) and it worked instantly . So i will try to use this.
But still i would like to know, is this Filex running with success anywhere ?
response on forum shows --- not much. (nothing...) so nobody using/trying it at all ?
STM should think about their bad idea, to rule out fatfs from Cube , only Azure/Filex is to be selected now.
If going on on this road, my way will be another in future.
2023-10-19 03:22 AM
so really nobody using Azure/Filex ?
2023-10-19 03:30 AM
Hi @AScha.3 ,
the FileX is already deployed on STM32H5 and works correctly on STM32H573I-DK board.
you can find in the link below the list of all applications developed, tested and validated on that board. https://github.com/STMicroelectronics/STM32CubeH5/tree/main/Projects/STM32H573I-DK/Applications/FileX
for your use case, would it be possible to share code snippet in particular how you are using the FileX and the fx_sd_driver?
regards
Haithem.
2023-10-19 04:53 AM - edited 2023-10-19 04:55 AM
Hi @Haithem Rahmani ,
code ... just the test project
(i gave up on this, because filex could read only 2GB FAT32 card with 2 files on it, but all (!) other sd-cards, with boot partition in FAT16, or exfat 64GB card it not read - hard fault. useless...)
just make top folder H563-test , expand zip there. ( is all, except debug folder.)
regards
Alfred
2023-10-20 08:54 AM
2023-12-03 01:56 AM - edited 2023-12-03 01:58 AM
after working some time with (actual version of ) FatFS , i got similar problems with some sd-cards.
so maybe the hardware/interface is the reason -- and give Azure/Filex another chance...
after some hours of reading/learning , i got Filex now reading directories with files , as it should .
the "examples" from STM helping not much, because i found only one (!!!) example : open/write a small string to a file,
close, open and read it. only in root/main directory. and this in many copies on some boards/cpus , but this is just one super primitive example , helping nothing for searching a file through directories and subdirs etc.
With little help from MS i got it ... https://learn.microsoft.com/en-us/azure/rtos/filex/chapter4#fx_directory_first_full_entry_find
but still only 1-bit sdmmc is reading all cards , 4-bit only working with one card (in my tests , so far).