Page 1 of 1
Fat-FS for Embest STF4BB Board
Posted: Mon Aug 12, 2013 4:25 am
by abbyj
Hi Gents,
I've been using your help for a couple months now and I have to say your support has been stellar! However, I've been searching all over for example code for using the uSD card slot on the Embest DM-STF4BB board for the STM32F4, and I can't find one that has worked with mine. I see a lot of examples for the Olimex board, but so far I haven't been successful getting them to work with the Embest. The code compiles, but the hardware doesn't acknowledge when a card is inserted into the slot. I have the shell working over the USB and when I type in the "tree" command it says that it is not mounted.
I'm seriously stuck with what to do, and don't know where to start to fix this issue. Could someone please help point me in the right direction as to where to look to fix this issue?
If there is any more information you need let me know and I will get it to you right away.
Thank you very much in advance!
Jason
Re: Fat-FS for Embest STF4BB Board
Posted: Mon Aug 12, 2013 5:49 am
by Tectu
I am using the microSD card socket of the Emest board successfully every day. You should be able to run the ARMCM4-*-FATFS demos without any problem after you have supplied the correct board files. You have to set all the GPIO modes correctly in your board.h. Furthermore, you have to return a safe value if there's no card-recognition pin (This mostly happens through D3 with microSD cards, no dedicated mechanical switch anymore). You can just always return TRUE there.
~ Tectu
Re: Fat-FS for Embest STF4BB Board
Posted: Mon Aug 12, 2013 8:16 am
by abbyj
Thank you Tectu for the fast response! It's great to hear that you have been working with an Embest board for a while. That gives me hope! I will look into the information you provided and get back to you with how I make out.
Thanks again!

Re: Fat-FS for Embest STF4BB Board
Posted: Mon Aug 12, 2013 9:07 am
by Tectu
I can supply you with my board files, if you want to. However, they are not quite finished. I should finish them so they can be included into the ChibiOS/RT repository.
~ Tectu
Re: Fat-FS for Embest STF4BB Board
Posted: Mon Aug 12, 2013 4:58 pm
by abbyj
Hi Tectu,
Thank you for your offer. That would be great! They would be a great reference for me

Re: Fat-FS for Embest STF4BB Board
Posted: Mon Aug 12, 2013 5:04 pm
by Tectu
Here you go.
~ Tectu
Re: Fat-FS for Embest STF4BB Board
Posted: Mon Aug 12, 2013 5:38 pm
by abbyj
Thank you
I'm not at my home computer at the moment , but I will look over your .h and .chcfg files when I get home to see if there is any differences.
Just so we're on the same page, I have an LCD connected to my Embest which I've successfully been able to run GFX, and have also been successful at running an http server, with this forum's help, so I've had to update my board files for them. What I've noticed with my current board configuration is that I'm not getting any event when a card is inserted. As per your instructions, I have it so that the sdc_lld_is_card_inserted() always returns TRUE.
Is there something else you think I should look into if the event is not triggering on a card insertion?
Thanks!
Jason
Re: Fat-FS for Embest STF4BB Board
Posted: Mon Aug 12, 2013 5:56 pm
by Tectu
Please note that my board files do not contain the appropriate setup to run the on-board PHY.
I just took a look and verified that mmc_lld_is_card_inserted() really returns TRUE all the time. Note that you never get a card inserted event because there's nothing that can trigger any event.
The LCD will not affect any of this. Let me know when there are any more problems.
~ Tectu
Re: Fat-FS for Embest STF4BB Board
Posted: Mon Aug 12, 2013 6:42 pm
by abbyj
Thank you for the info about the PHY. My board file has that information, I can share with you if you want.
I'm curious...In your opinion, should I be using SDC or MMC? The demo appears to be using SDC, from what I can tell. From what I've read, ChibiOS doesn't have MMC support yet, or am I mistaken? Are there any performance differences between the two?
Jason