Interfacing an mmc/sd memory card to hc08

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Interfacing an mmc/sd memory card to hc08

3,657件の閲覧回数
marbia
Contributor I
Hello,
 Does anyone has an application note or any example in which an hc08ap32  spi port is connected to an mmc/sd memory card.
Im trying but we have some troubles , the system works well in debug mode, but not alone.The spi signals are ok, and micro works fine.
 
Also when we connect the micro with the card together it does not work, (the supply pwer goes down)
but if you connect first the micro and then insert the card it works,
Any idea will be welcome.
thanks a lot.
ラベル(1)
0 件の賞賛
4 返答(返信)

459件の閲覧回数
tonyp
Senior Contributor II

No example, but:

I use an MMC (in SPI mode) with a GB60 without any problems.  Here's the inter-connection:

-------------------------------------------
 9S08GB60 Pins   |MMC PIN#| MMC Description
-----------------+--------+----------------

 PE2 / SPI SS    |   1    | Chip Select
 PE4 / SPI MOSI  |   2    | DataIn
 Vss             |   3    | GND
 Vdd             |   4    | +2.7-3.6V
 PE5 / SPI SCLK  |   5    | CLK
 Vss             |   6    | GND
 PE3 / SPI MISO  |   7    | DataOut
-----------------+--------+----------------

AFAIK, most cards work at 3V. Are you running the AP32 at 3V or 5V?  If at 5V, maybe your level conversion circuit isn't working as expected.

About the debug/standalone difference, here's one possibility:  Some cards (as the protocol notes I have say) expect an initialization with a slower rate (I think it is about 400KHz), then you can switch to faster SPI rates.  So, maybe while in debug (because of the extra overhead or instruction stepping) the rate is within range but gets out of range in standalone mode.

Hope this helps.

Now, while we're on the subject I've got a question, too.  Anyone know how to address more than 32MB?  Haven't been able to find any freely available reference to this yet.

TIA

0 件の賞賛

459件の閲覧回数
marbia
Contributor I
Thanks  for the data.
Do you have the same problem during init procedure, we are working at 3.3v
the initialization clock always must to be slow?.
 
What do you mean when say 32 Mbytes, only,
that is FFFF * 200, the capacity to address via spi? I really dont think  to this point yet , but it may be a problem.
Im new to this enviroment but  What about multiple block write?
 
0 件の賞賛

459件の閲覧回数
marbia
Contributor I
With 6 bytes for adressing you shouldnt have any problem to get more than 32 Mega. Are you using fat 12 instead of fat 16 . This could be a limitation.
0 件の賞賛

459件の閲覧回数
kbu
Contributor I
Does anyone have any source code for reading/writing to a FAT16 filesystem(on a SD card) from a HCS08 (GT/GB series)?
0 件の賞賛