This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
One of my project requires SD-Card to interfaced with TM4C1294NCPDT to store data regularly. I've chosen "fatsdraw_EK_TM4C1294XL_TI" project from the "Resource Explorer".
I've formatted the SD-Card with FAT32 and using 2GB and 32GB. The SD-Card module is interfaced with TM4C via SPI2. The SD-card module is from "robocraze.com/.../sd-card-module
I'm able to send proper CS, Clock (400Khz) and MOSI signals. But, I'm getting "FR_NOT_READY" status.
Need support to solve this issue.
HI,
I'm not familiar with the TI-RTOS SDcard example. Have you tried the example as-is without modification on a LaunchPad? Per the example instructions, it uses SPI0. I will suggest you run as is and make sure it works on the LaunchPad. This way it will be easier for you to debug/diagnose the problem.
Example Summary --------------- Sample application to read and write data onto a SD Card (SPI interface) Board Overview -------------- Board_LED0 Indicates that the board was initialized within main() Board_SDSPI0 Connection to SD card Resources & Jumper Settings --------------------------- Please refer to the development board's specific "Settings and Resources" section in the Getting Started Guide. For convenience, a short summary is also shown below. | Development board | Notes | | ================= | ====================================================== | | CC3200 | Requires an external SD Card boosterpack | | EK-TM4C123GXL | | | ----------------- | ------------------------------------------------------ | | DK-TM4C123G | It uses the onboard SD Card slot. | | DK-TM4C129X | | | ----------------- | ------------------------------------------------------ | | EK-TM4C1294XL | Requires an external SD Card boosterpack | | EK-TM4C129EXL | | | ----------------- | ------------------------------------------------------ | | MSP-EXP430F5529LP | Requires an external SD Card boosterpack | | MSP-EXP430FR5969 | | | MSP-EXP430FR6989 | | | MSP-EXP432P401R | | | ----------------- | ------------------------------------------------------ | | TMDXDOCK28M36 | It uses the onboard SD Card slot. | | ----------------- | ------------------------------------------------------ | | TMDXDOCKH52C1 | It uses the onboard SD Card slot. | | | Connectivity Bank 22-25: B-C position (SD card slot) | | ----------------- | ------------------------------------------------------ | Example Usage ------------- Run the example. Board_LED0 turns ON to indicate TI-RTOS driver initialization is complete. The example proceeds to read the SD card. If an "input.txt" file is not found, the file is created on the SD card with the following text: "***********************************************************************\n" "0 1 2 3 4 5 6 7\n" "01234567890123456789012345678901234567890123456789012345678901234567890\n" "This is some text to be inserted into the inputfile if there isn't \n" "already an existing file located on the SDCard. \n" "If an inputfile already exists, or if the file was already once \n" "generated, then the inputfile will NOT be modified. \n" "***********************************************************************\n" The "input.txt" file is then read and its contents are written to a new file called "output.txt". If the file already exists on the SD card, it will be overwritten. The contents of the "output.txt" file are then written to the console. Application Design Details -------------------------- This application demonstrates how to use TI-RTOS's SD Card driver to read and write data onto a SD Card using FatFS API calls (f_open, f_read, f_write, etc). This application uses SysStd instead of SysMin. This was done because real-time was not a concern and the size of the internal SysMin had to be large to hold the output. Please refer to the TI-RTOS User Guide's "Generating printf Output" for a comparison of the different System Support implementations. This application uses one task: 'fatSDTask' performs the following actions: Create and initialize SDSPI driver object. Prints the disk size and the amount of free space on it. Open the "input.txt" file. If not found, create the file for reading and writing. Write the default message to the file. Open the "output.txt" file. Content will be overwritten if found. Copy the contents of "input.txt" to "output.txt". Close both files afterwards. Open "output.txt", read the file and print the contents to System_printf. And closes "output.txt". Again, prints the disk size and the amount of free space on it. If the disk was empty, the difference in free space should can be observed. The SDSPI driver is closed and the example is terminated. For GNU and IAR users, please read the following website for details about semi-hosting: http://processors.wiki.ti.com/index.php/TI-RTOS_Examples_SemiHosting
Hi Charles,
Thanks Charles for quick response.
Yes I'm using the Tiva LaunchPad. And I've connected to SPI2. I'll try changing to SPI0 and update you on the results.
Hi Charles,
I tried changing the SPI, but still the error is same. Is bare-metal code for SD-Card is available for TM4C1294NCPDT?
Hi,
Yes, there is a bare-metal example at C:\ti\TivaWare_C_Series-2.2.0.295\examples\boards\dk-tm4c129x\sd_card. The example is created for a EVM board that has a LCD screen. You need to remove the code that pertains to the LCD and also adapt the code for your specific part number (e.g. pinmuxing.)