Take the 2-minute tour ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

Problem description:

I've built a MSP430F2370 based 15693 RFID tag reader/writer . The main board has a daughter board, shaped as a SD card, which connects to a SD card holder/reader.

We were planning to communicate with a Windows Mobile 6 handheld via SD card interface using SPI. Our software team told us this was technically impossible, or at least would take a couple of months to implement. We got three weeks to finish all of it.

So, the ball returned to me. Now I was asked to emulate a SD card with the MSP. This includes all the SPI communication and FAT16 emulation as well. This has been done before, afak not with a MSP though.

Question:

After some search, I was unable to find previous works using MSPs to emulate SD cards. Is there any info/work done about it? Also, I have a handfull of thick SD card specifications PDFs, but I can't seem to find timing diagrams telling what a happy SD card should send to a host. If someone could also please address me to a more concise, good documentation on this, it'd be very nice.

share|improve this question

5 Answers 5

Your task is certainly not impossible, but I think you would have 90+ hour weeks for those three weeks to get something you might be able to use.

There isn't a single "ZOMG" part of the design; there are a number of smaller blocks that are pretty compartmentalized and straightforward on their own. For example, there's the physical interface: SD cards are essentially (up to) "four-lane" SPI buses, and you can limit yourself to SPI mode to start to make things easier. This isn't terribly complex to do, especially if you have a SPI slave peripheral in hardware that you can use. Supporting enough of the SD protocol to fake out the Windows side probably won't be difficult either, especially if you can limit yourself to emulating an MMC card instead, which is less complex. Emulating a file system is also not terribly difficult. I think where things will get hairy is in the details of interconnecting these blocks and then spending a LOT of time working out the odd little thing that doesn't work.

Like the saying goes... the devil's in the details. From a high level perspective this is doable, although I think your timeframe is unrealistic. Nobody can work 90h weeks and maintain focus and clarity of thought.

And like my favourite saying goes... The difference between theory and reality is that in theory, there is no difference.

share|improve this answer
    
Hehe, I always knew it as: "In theory there's no difference between theory and practice, but in practice there is." –  Rocketmagnet Mar 30 '12 at 20:33
3  
I agree with this answer. If you can complete this in 3 weeks, you deserve a Nobel Prize. –  Rocketmagnet Mar 30 '12 at 20:34
4  
He mentioned that he has a software team for the Windows Phone part of the project. With 3 or 4 people working on it, your estimate of 270 hours in 3 weeks isn't bad at all. If they're Visual C# developers (For WP7), they're minutes away from being able able to write some bad C code if you ask them to. Also, consider that there's no need to implement a generic MMC card or filesystem; he only needs to emulate a single-size card, one filesystem containing one file and no folders, and a single file whose size doesn't need to change. –  Kevin Vermeer Mar 30 '12 at 20:35
1  
Minutes away from writing some bad C code... I like that. It sounds like a terrible idea that too many people will be ready to take you up on. –  AngryEE Mar 30 '12 at 21:55
2  
Or the name for a great starting C book! –  AngryEE Mar 30 '12 at 22:02

If doing it at all is more important than how you do it, then doing it with whatever is easiest (maybe because code is available) and then communicating between your MSP430 and he separate system would probably be easiest. Overall the task is more complex, but if ghe hardest part has been achieved for you already you win.

share|improve this answer

I don't really have an answer for you, but when working with SD cards and FAT16 on the MSP430, I have found the following two resources helpful:

SD Cards with the MSP430

FAT16 for the MSP430

share|improve this answer

We were planning to communicate with a Windows Mobile 6 handheld via SD card interface using SPI.

Unforunately, the SD host decides which protocol to use. For a Windows mobile device I would expect it to use the faster SD protocol and not SPI. So you'd need to implement SD protocol, which is 25 MHz: Waaay too fast for you MSP MCU, the one you mentioned tops at 16MHz.

To implement a SD card you'll need a fast MCU (ususally ARM based) with hardware SD protocol support or a ridiculuos high clock >>100 MHz.

share|improve this answer
    
Or a small FPGA to handle the fast interface and buffer it for a slower MCU. the SD protocol has built-in rate limiting so you could take advantage of that. –  akohlsmith Apr 1 '12 at 14:24

A similar solution was done in 2006 as part of a Circuit Cellar Design Challenge. The entire project software and hardware can be found here. This solution pumps data into a picture book, but yours is a similar concept.

share|improve this answer
    
This should be a comment on the answer you point to. –  Camil Staps Feb 10 '13 at 15:18
    
On the SE system we prefer answers to be self contained and only use external resources. If you would like to write an answer, please summarize what you are linking to so if that link breaks your answer is still an answer. When you gain more rep on the site you can write comments and just leave something like this as a comment to another answer/question. –  Kortuk Feb 10 '13 at 17:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.