Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Interfacng to MMC/SD with AT92RM9200's MCI
PostPosted: Fri Jan 07, 2005 1:59 am 
Offline

Joined: Wed Sep 29, 2004 1:49 am
Posts: 8
Location: Melbourne, Victoria, Australia
Hi all,

I am trying to use AT91RM9200 to interface to a MMC/SD but I am not having too much success.

The platform that I am using the AT91RM9200DK dev kit as a starting point, with linux kernel 2.4.27-vrs1, patched with the MMC patch from http://www.maxim.org.za/AT91RM9200. I know that the MMC patch targetted for a 2.4.26 kernel, but I have checked the patched results and it does not appear it did anything stupid.

As a starting point, I have created a simple routine to send a CMD0 to send it, then it continously send ACMD41 until it receives a "not busy" in the OCR response from the SD card.

Using a CRO, I have checked that the command and clock signals appear on the pins of the MMC/SD socket. I have also soldered 4K7 pull up resistors on the command and signal lines, slowed the clock to 150Khz.

The SD card just does not want to respond to anything that I send it.

Should I switch to interfacing to it via SPI rather than using the MCI? Anyone has success interfacing the MMC/SD? What interface did you use?

Thanks in advance on any ponters.
Tehn Yit Chin


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 07, 2005 5:48 pm 
Offline
User avatar

Joined: Fri Feb 13, 2004 7:53 pm
Posts: 329
Hello,

take care that for the MMC/SDCard, a pull up is missing on the RM9200-DK on the MMC_CMD pin as defined by the MMC and SDCard Std.
The pull up is between 4.7K to 10K.

That's may be your problem.

Hope this helps.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 09, 2005 11:15 pm 
Offline

Joined: Wed Sep 29, 2004 1:49 am
Posts: 8
Location: Melbourne, Victoria, Australia
Thanks for your reply. I have 4K7 pull up resistors on the command lines as well as the clock lines, but this does not seem to make any difference. Is 4K7 too low as the specifications indicated a value between 4K 7 and 100K?

thanks,


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 10, 2005 10:47 am 
Offline
User avatar

Joined: Fri Feb 13, 2004 7:53 pm
Posts: 329
Did you try to use the example from ATMEL website ?

http://www.atmel.com/dyn/resources/prod ... _2-2_0.zip

Rgds


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 10, 2005 11:47 pm 
Offline

Joined: Wed Sep 29, 2004 1:49 am
Posts: 8
Location: Melbourne, Victoria, Australia
hello,

I have tried to use the example, but I am unable to execute it. I don't access to an ADS. I have tried to execute the accompanying binary as well in u-boot, I was not sucessfull. u-boot seems to crash the system. Perhaps I am not executing it correctly.

I used u-boot to load the binary, BasicMCIDevice.bin, at address 0x20000000 via u-boot's tftp and executed it via u-boot's go command. The following is the error.

Uboot> go 0x20000000
## Starting application at 0x20000000 ...
data abort
pc : [<00200888>] lr : [<20000038>]
sp : 00202d38 ip : 21f1fd4c fp : 21f1fee8
r10: 00000000 r9 : 00000000 r8 : 21f201e8
r7 : 21f1fef0 r6 : fffff200 r5 : 00200870 r4 : 20000000
r3 : 00000000 r2 : fffff200 r1 : e24dd004 r0 : 00200870
Flags: nZCv IRQs off FIQs off Mode SVC_32
Resetting CPU ...


However, I inspected the source code to check if I am doing anything differently and perhaps it has provided some clues as to what might be happenning.

thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 11, 2005 3:48 pm 
Offline
User avatar

Joined: Fri Feb 13, 2004 7:53 pm
Posts: 329
Did you try to load the binary file through the DBGU port without having UBOOT started ? It's possible that your UBOOT loader does not set the good frequency needed for the MMC project or the project is not downloaded at the right address.

Other than that, the MMC project should work. Simply follow the main.html file from the project.

Bye


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 20, 2005 12:20 am 
Offline

Joined: Wed Sep 29, 2004 1:49 am
Posts: 8
Location: Melbourne, Victoria, Australia
Hi pfilippi,

Thanks for your advise.

It appears that I am have problems in getting the linux SD/MMC device driver to behave correctly. The other thing that created a bit more confusion was that I failed to realise that the device driver was only really for MMC instead of SD, and my lack of understanding of SD protocol. The initialisation for MMC is slightly different for SD. For SD, it required a CMD55 before any of the ACMDxx commands.

Thanks.
Tehn Yit


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: