Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

microSD Card Problem (LPC1766)

Status
Not open for further replies.

skrstevsky

Newbie level 1
Joined
Dec 10, 2010
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,296
Hi,

I am trying to initialize microSD Card using Olimex LPC1766-STK Board and CMSIS
Libraries. I have tried with 3 uSD Cards from different manufacturers and all 3
are initializing BUT with different timings (one card can be initialized with
one try of sending commands with no additional delays like timers, but other
needs at least 8 tries and delays between).

The problem is not only when initializing but it exists when I am trying to Read
or Write Data Blocks (Write can somehow succeed).

All 3 cards works when using IARs code (Mass Storage Device)...

The only difference that I saw is the working frequency of the Core (and the
peripheral).
With CMSIS it is 100MHz and for the SSP1 (used as SPI) peripheral is 25MHz, With
IARs example the working frequency is 96MHz and for the SSP1 peripheral is 24
MHz (divided by 4).

It is possible to Write Data Block (512B) and getting the response 0x5 telling
wrong CRC that can be ignored (same with IARs code that works), CRC is not
required in SPI mode (MCU to uSD is working), but when I try to read the same
block from the card I get zeros (uSD to MCU problem).

I've tried with different delays, but nothing.
When I should read 512B I get zeros (busy bus ?), and after those 512B I get 0xFF which means lines are high and there is no data.

The problem might be the synchronization between the Core and the Peripheral (?).

Thanks in advance,
Regards,
Sasko Krstevski
 

I have the same problem !

I am work with microSD cards in SPI mode , and met a strange problem . Some microSD cards do not want to read/write after some special address.

MicroSD 8GB stop to read/write after block 0x7670 (address 0x7670*200=0xECE000)
MicroSD 4GB stop to read/write after block 0x3C24 (address 0x3c24*200=0x784800)
MicroSD 1GB works at these address and above them , no problem at all

Symptoms of the same:
When reading answers 0 after CMD17, but then do not send SD_START_TOKEN
When writing answers 0 after CMD25, answers 0x05 after earch block, but then do not answer anything after CMD12.

Does anyone know why this happens?
Does anyone work successfully with microSD > 2Gb in SPI mode ? Can you show me your code?

Thank you for your attention
Mikhail Polyakov
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top