TI E2E Community
Digital Signal Processors (DSP)
C5000 Ultra Low Power DSP
C5000 Ultra Low Power DSP Forum
SD Card Lock / Unlock
I am trying to add support for the SD card lock / unlock feature using a C5515. I have some code based loosely on the CSL MMC_write routine. Unfortunately, I'm consistently getting a CRCWR error, which I find surprising.
Essentially, the pseudo-code is:
1) Send SET_BLOCK_LEN to change the block length for the password data. Wait for response.
2) Reset the FIFO, and set it up.
3) Send CMD 42 (0x282A) with zero for arguments.
4) While bytes remain, push onto FIFO if it is not full.
5) Wait for RSPDNE.
When ST0 has RSPDNE set, it consistently also has CRCWR set.
Does anyone have any experience with implementing this feature they would like to share?
I figured out the problem. It seems that the command to set the bus width to 4 bits (ACMD6) is illegal when the card is locked. I was trying to send the password information using 4 bit mode, assuming that ACMD6 had succeeded. I've since broken that code into a separate function which I execute after unlocking the device, and everything works well.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.