I'm investigating to use Starterware for our c674x based device. The device uses an SD card to store data. I can find a source code driver for the sd card (hs_mmcsd.c) in the Starterware distribution. But it seems that the driver is not compiled in the binary. It's not part of the 'drivers_c674x_c6748' project.
Is that on purpose? Or could I just add it myself and build? Is there a release planned with SD support build-in?
The hs_mmcsd.c is intentionally excluded from the C674x package. This code applies only to the AM335x device which uses a new/different MMC hardware implementation than is on the C674x devices (and is therefore not compatible). At the moment, there are no plans for supporting MMCSD in starterware for the C674x device.
Thank you for the info.
But it leaves me with a bit of a problem. I am working on a device that needs to write data to an SD card, and then allow the user to read the data by using the SD card over USB as mass-storage device.
DSP/BIOS 5 allows me to do this with the PSP drivers. But DSP/BIOS 5 seems to be the old version and not recommended for new developments. SYS/BIOS 6 does not have the drivers (yet), so starterware looked promising. I also like the starterware API better, it's closer to the device.
Maybe I just have to write my own driver, maybe based on the BSL (from the C6748 EVM)
I think you have a good grasp of the issues/tradeoffs. One path would be to start w/ BIOS5 today and then port over to BIOS6 once available. At least from a MMC/SD perspective, that port should not be huge.
On the other hand, if you are more interested in a low level "closer to the device" type of API, then the C6748 EVM BSL sounds like a good choice.
In any case, it's good to get feedback/requests for Starterware capabilities and we will feed your request forward into future planning. But as mentioned, as of now, there is no specific plans for MMC/SD starterware support on C6748.
Thanks again for the info. I'll think about what the best option is for me. BIOS5 seems like a good solution, although it is a bit memory-hungy.
I know you posted your last post over a year ago but I wondered if and how you solved the problem with writing to a SD Card on the c6748 EVM?
In the end I wrote my own driver for hte SD card, based on Starterware. It's not complete yet (no SDHC support), but for now it works.
Nicely done, happy to hear it works, I'm having difficulties with finding a suitable implementation of such a driver. Do you think you can upload a working project with the implementation? Because right now I'm having problems gettingt the biospsp mmcsd_fatfs example code to work.
Thanks in advance.Best regards,Abebe Hailu
I'm afraid I can't share the code at the moment. But I can tell that I just started with the BSL that came with the EVM kit we use. The BSL had code to use the SD card. I adjusted that driver to work with Starterware. It gives you the right commands to send, etc.
Did you use the third party file system (ff.c) as well? Because I'm having problems integrating it the BSL based driver. I want to use the BSL driver together with the starterware and the third part FATfs system, is this what you have done?
Yes, I used ff.c. Although I don't think I got it from TI, but directly from the author:http://elm-chan.org/fsw/ff/00index_e.html
Then I adjusted the BSL driver to look more like a Starterware driver (although I'm not really sure anymore what I did in that step). Then I had to implement diskio.h.
Can you read from the SD card with the BSL driver? Try looking at the first sector, there should be 0x55AA somewhere at the end. (or was is 0xAA55?)
Yes, I'm able to read and write to the SD card with the bsl driver, but in raw form. I then use an hex editor to see what I've written. I've concluded that the driver from the bsl writes in terms of sectors, so what I need is a Fat file system that simply calls the bsl functions when it needs to read or write to a sector, However, I'm having problems implementing a working Fat32 file system. Isn't diskio.h already included in the package?
Yes, diskio.h is included. But it only includes function definitions, bot the implementations. What you need to do is create a new c file that implements the functions listed in diskio.h. It will be functions of just a couple of lines, that call the BSL functions.
Thanks for the answer, I used another fat file system where I simply could use the bsl section read and write functions for the MMCSD. Workes fine now.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.