Hello,everyone
I want to connect LCP23xx and SD Card with MCI interface but i didn't understand flow of them. Now,I founded library coding in SPI mode only. who has it in MCI bus,please help or give information about flow of operation? when i will write data(i just only single block) what i will do first time? --------------------------------------- now, i think(i don't know,is it true?)
In the first(before set pinsel in arm)
i must send command in CMD line from host to card in Card identification mode? (i don't know how to set register,now i try to coding this step)
thank you everyone (sorry if has wrong english:) )
www.standardics.nxp.com/.../code.bundle.lpc23xx.lpc24xx.uvision.zip
Please download the [code.bundle.lpc23xx.lpc24xx.uvision.zip] from the above url.
There is a folder named [MCI], it should be what you need in the first stage.
Have you looked at the free "simplified" version of the SD Card interface specification? www.sdcard.org/.../sdcard
Thank you,John Linq I has been download your zip code from the your url. and I try to understand(may be long time cause I'm beginner in C code and Arm.) I have some question to ask you. >>In your code.If I just only transfer data in single block.I must use all? --------------------------------------------------
Thank you,Andy Neil I read Sandisk manual once time but I didn't understand flow,I will try to read your document again.
Hi sunshine day,
1. It is _NOT_ my code, it is the example code provided by NXP.
2. I didn't use/try that example, because I got another example.
3. Though it is embarrassing, but actually I don't know much about SD-Card/MCI/Filesystem.
4. Though sometimes I pretend that I am a good software guy, but actually I am not.
For you question about "If I just only transfer data in single block. I must use all?" I think the answer is NO, you don't need to use all the blocks.
Please refer to:
http://www.keil.com/support/man/docs/rlarm/rlarm_fs_mem_org.htm
www.keil.com/.../rlarm_fs_falloc_info.htm
_NOT_ sure if the above KEIL information can be applied to most implementations.
Those mentioned KEIL information is not 100% suitable for your/this case.
You only need to know: The memory organization of a Flash Device is divided into flash sectors. The Flash Sector is typically a 64 KB memory page and is written cell after cell. The memory cell size depends on the device architecture and is 8-bit wide (byte), 16-bit wide (half word) or 32-bit wide (word). When you want to erase the flash data, you need to erase the whole flash sector at once. Flash Sectors are named Blocks in RL-FlashFS.
Thank you,John Linq Now,I'm reading NXP code :)Try to understand have many word in C i don't know.but i try to know.
I think interface in MCI card has 1bit(if not select wide bus) and sorry,I don't understand your introduce in above massage.
now, I set port and power up and on in SD card ready but don't know what's code of NXP i will programme next step.
Hi I has Question in C code. in code(URL) from John Linq message >> www.standardics.nxp.com/.../code.bundle.lpc23xx.lpc24xx.uvision.zip
I test it in LPC2368 board.and I want to change code to write data in Block#1 and Block#2 in different data.(in this code Your data will be same every block that 0-ff twice per block>>include 512 ) But now I can't do it.
So that I test to write Block#1 in First time then finished I start init SD card again and write Block#2. but can't to do. SD card response back to host in Timeout or fail in sometime.
I don't know how to test more,Please introduce me or help to see NXP code in above URL.
Thank you