We have a strange error with some MMC cards.
OS is CE5
PXA255
MMC card formatted with FAT.

With some MMC cards, currently the issue with with 1 1GB "MMCplus"
card, the writes to the card do not work correctly.

I have turned on FATFS_VERIFY_WRITES but still the problem persists. I
would have hoped this would have ensured the writes occur correctly?

It is only ever a byte or two within a file and it is always the top
bit (bit 7) which is dropped from 1 to 0.
(e.g it should be C5 but is actually 45).
It is not always the same byte in the file, not always the same file
(for example when extracting a CAB file different files get corrupted
on different attempts)

This happens for files written by CE5 on the device. If I remove the
MMC card and read it in a card reader on a PC it shows the missing
bit(s) in the file(s). If I write to the card using the card reader
the write is successful

I have tried reducing the maximum MMC clock speed from 10MHz to 5MHz
but still the same effect.

Any other ideas?
Any ideas how we can figure out why its failing?

Thanks

Andrew

RE: MMC card write error - dropping bit 7 by Rik

Rik
Tue Aug 12 06:32:01 PDT 2008

Hi Andrew,

A couple of questions spring to mind. What BSP are you using? How is the MMC
slot connected to the CPU? Is it via GPIO lines? Are you able to inspect the
MMC lines on a scope?

I have seen some rather similar unreliability issues in a PXA320-based BSP
when one or more of the GPIO lines (which formed the MMC connection) were not
configured in quite the right way.

Similarly, check the pull-up/pull-down resistors for the data, clock and
command lines.

Another thing to try is reducing the MMC clock speed right down to it's
lowest setting.

Finally, I've just spotted that you mention that this only occurs on some
cards. You're implying that other cards work fine here, so what are the
differences between the specs for the cards that work and those that don't?

regards,
Rik Attrill

Re: MMC card write error - dropping bit 7 by AJM42

AJM42
Tue Aug 12 09:15:08 PDT 2008

Thanks for the suggestions, I'll try and get one of our hardware
engineers to look at the signals.

Two cards from the same manufacturer, both labelled the same. One
works OK, one fails as discussed!
(Transcend 1GB MMCplus cards)


Andrew