Other Parts Discussed in Thread: HALCOGEN
Tool/software: Code Composer Studio
Current setup:
- CCSv7
- Halcogen v4.07
- RM48L952ZWT
- SanDisk EDGE 4GB microSD HCI (OEM card) (speed class should be irrelevant since SPI mode treats all SD cards as class 0)
- card is formatted with FAT32
I am currently working on a project that will read/write to a microSDHC card using SPI. The CCS project also attempts to enable serial communication in order to set up a user terminal interface. SCI and SPI communications have been validated. The issue I am having deals with the SD card. I have researched the command sequence needed to boot in SPI mode. From what I understand I am supposed to execute the following process:
- Set CS pin HIGH (deselects the slave)
- Toggle clock at least 74 times (I have done this 80 times by sending dummy byte 0xFF ten times)
- Set CS pin LOW (selects the slave)
- Send CMD0; arg: 0x0; CRC: 0x95 (response: 0x01)
- Send CMD8; arg: 0x000001AA; CRC: 0x87 (response is R7 packet which is R1 followed by an echo of the arg value sent: 0x01; 0x000001AA)
- Send CMD55+ACMD41
- CMD55; arg: 0x0, CRC: 0x65 (possibly doesn't matter?)
- ACMD41; arg: 0x40000000, CRC: 0x77 (possibly doesn't matter?)
- arg for ACMD41 sets HCS bit to 1 since I am using high capacity (HC) card
- Resend CMD55+ACMD41 n times (waiting for SD card to come out of idle state)
At this point, I have validated all of the commands and their responses leading up to the first iteration of CMD55+ACMD41. I send CMD55 and I get the response 0x01 (R1 as expected); followed by ACMD41 and I get the R1 response of 0x01. This is where the problem occurs. Every subsequent iteration results in a R1 response of 0xFF for both commands (CMD55 + ACMD41). I have been trying to figure out how to fix this and the only information I found talks about the DO pin (data out; represents MISO line) potentially being left in high-Z. Possible remedies would be to put a 47k pull-up resistor on the MISO line, which I can't do because I can't change the hardware I'm using. This leaves me with using an internal pull-up. I see that there is an an internal pull-up option in HALCoGen (PSL) in the Port tab of SPI3, but it is already selected by default. I also read that an internal pull-up on the MISO line should only be used if my uC has 3.3V; and if my uC is 5V, then I shouldn't use an internal pull-up unless my MISO line has a proper 5 -> 3.3V logic translation. Simply put, I am stuck and have not been able to progress with SD card storage/communication. I currently have a github up which has a zip of the CCS project for anyone who wishes to take a closer look at what I have so far. Everything in the CCS project was developed by following a project guide that used the Hercules LaunchPad and HALCoGen. The project guide is split into three parts, which can all navigated from the page I linked (see "Related Blog" table at bottom of linked blog post). The URLs for both resources are included below:
Github URL (has .zip of project):

TI Hercules Launchpad Project Guide:

I have currently logged 43 hours over the last four days on this project and have yet to get this thing working. As usual, any advice/information that could be provided regarding this topic would be greatly appreciated!