Keil™, An ARM® Company

Discussion Forum

multiple block of read and write data in SD card ( MCB2300 board with LPC2368)

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Author
embedded usb
Posted
29-Sep-2008 06:36
Toolset
ARM
New! multiple block of read and write data in SD card ( MCB2300 board with LPC2368)

Hi All,

Can anybody implemented the read and write of multiple block of data to and from SD card in MCB2300 board with LPC2368?

The source code in NXP site has single read and write block data.

For Multiple block of data we made the following changes:
User data length = 1024,
SD block length = 512.
1.Set the Block length with 512. (if we try to set Block Length > 512 i.e.1024, then BLOCK_LEN_ERROR in SD card status register)
2.Issue the CMD25, WRITE_MULTIPLE_BLOCK to SD Card.
3.configure the MCI DATA LENGTH register with 1024 and set the block_size in MCI DATA CONTROL register with 9(2 pow 9 = 512).
4. enable the interrupts.

Now waiting for DataBlockEnd flag to be set in ISR?
Now when the DataBlockEnd is set then only 512 bytes of data was transferred, for remaining 512 we haven't get the interrupt?

What changes we have to made for multiple read and write of data?

Author
Milorad Cvjetkovic
Posted
29-Sep-2008 22:55
Toolset
ARM
New! RE: multiple block of read and write data in SD card ( MCB2300 board with LPC2368)

Hi,

yes we at Keil have implemented it in our Flash File System which is part of our RealTime Library.

Just for information you can see in Complete User's Guide the results of read and write speeds.

For example we achieved write speed of 3946.3 KBs and read speed of 5330.6 KBs for MCB2300 with SD4 interface running at 24MHz.

Author
embedded usb
Posted
5-Oct-2008 23:01
Toolset
ARM
New! RE: multiple block of read and write data in SD card ( MCB2300 board with LPC2368)

Thanks milorad, I have one more doubt regarding SD/MMC card interface. Can we use SDIO(SD Input/Output) card in this interface.

Author
Milorad Cvjetkovic
Posted
5-Oct-2008 23:22
Toolset
ARM
New! RE: multiple block of read and write data in SD card ( MCB2300 board with LPC2368)

I think you can not use SDIO on this interface.

Next Thread | Thread List | Previous Thread Start a Thread | Settings