Communicating to a SD card using HCS08QG8's SPI module

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Communicating to a SD card using HCS08QG8's SPI module

798 Views
sarasouza
Contributor I

Hello,

 

I am rookie on MCU programming.

I have been trying to communicate a sd card memory (1GB) to a HCS08QG8 MCU but I don't know how to do this. I've been using some sample codes from the Code Warrior IDE, I configurated the clock and CPU settings as suggested. By using a protoboard I connected SS pin to CS pin, MOSI pin to Indata pin, MISO pin to Outdata pin, SPSCK pin to CLK pin and the others (GND and VSS pins to the board power supply).

PS: I am using the kit DEMO9S08QG8, and for these connections I used the kit's J1 connector.

I think the major problem is on the code and pins' configurations. I've been testing and it was supposed to write a file on the SD card. But when I read the SD by in a PC it was empty.

 

Thanks

 

Sara Mt.

Labels (1)
0 Kudos
Reply
2 Replies

570 Views
david_diaz
NXP Employee
NXP Employee

Hello Sara,

In this case like to recommend the Application Note AN4115, especially the Chapter 4 'SD card file system'.

IrDA Driver and SD Card File System on MM/JE Flexis Families - AN4115

The document explains the configuration of the SPI module to establish communication with an SD card.

The AN4115SW is attached.

As the AN4115 mentions, in order to get detailed information about accessing an SD card through an SPI module, you can refer to:

SD Card Reader Using the M9S08JM60 Series

I hope this material will be useful for you.

If I misunderstood your question, feel free to let me know.  I will be glad to help.

Have a great day.

David Diaz.

0 Kudos
Reply

570 Views
sarasouza
Contributor I

Hi David,

thank you for answering me! I'll study your recommendations and I'll try

again...

Actually I am trying to use the SPI module at least.

If I have more questions I'll ask you again!

Thank you!

2015-11-04 15:55 GMT-02:00 david_diaz <admin@community.freescale.com>:

<http://jiveon.jivesoftware.com/mpss/c/4QA/PDcDAA/t.1ru/8UKLOgZxTz2or6gf_D6Gig/h0/eqhG5v9o4WV1pCmWaB03cUjBPgRj-2F3GoJUaXSZ409bQ-3D> Communicating

to a SD card using HCS08QG8's SPI module

reply from David Diaz Marin

<http://jiveon.jivesoftware.com/mpss/c/4QA/PDcDAA/t.1ru/8UKLOgZxTz2or6gf_D6Gig/h1/eqhG5v9o4WV1pCmWaB03cUjBPgRj-2F3GoJUaXSZ409bThrj-2BSoW6vpPMNaq-2F-2FiSlgaySbkqlxXuh-2FKm2Pa-2BI-2FFlp5llnWJS5dcqZQGpRUHBg-3D>

in 8-bit Microcontrollers - View the full discussion

<http://jiveon.jivesoftware.com/mpss/c/4QA/PDcDAA/t.1ru/8UKLOgZxTz2or6gf_D6Gig/h2/eqhG5v9o4WV1pCmWaB03cUjBPgRj-2F3GoJUaXSZ409bStWagzMPTBfNI2Gl5bHZy9xsuixBC0C4r1gOW4QPO9iTithxEJq7QMpWt0h2SnS2Q-3D>

0 Kudos
Reply