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.

data logging into a file in SD card using TM4C123GXL

Other Parts Discussed in Thread: EK-TM4C123GXL

Hello,

I am using Tiva C series EK-TM4C123GXL , CCS 5.4 and  TIVA WARE 2.1.

I want to create a file in a SD card and Log the "power" value into it every 30 seconds.

(The variable "power" is from the main function. The ISR contains the logging code.)

I haven't come across any example which just creates a file (text or xl )and logs some value .

I am using " D:\Programe Files\TI\CCS 5\Tiva Ware\TivaWare 2.1\utils\spi_flash.c" API. Am i correct in using this?

can someone please help me in this.

Thank you in advance.

  • Hi check the board example QSLogger ek-lf232, or SD_Card all you asked for is there.

  • Thank you for the reply.

    I saw the example code QSLogger , but it stores the data in the internal flash not in SD card .

    where as SD_ card is for reading from SD card.

    I am using the API inside the attached rar file "Utils.rar ".

    Am i correct in doing so?

    utils.rar
  •  Logger example read write from an USB attached pendrive, on FS also support is present to read write from an SD card so if you explore both SD card and QS Logger can find all you need, I customized the SDcard to read write files and it work fine and no OTG where available on board I early used.

     Also on third_party folder can browse diskio driver and a dual disk SD and usb is provided, with this one you can add both SD and USB.

     Starting from SPI generic is just reinventing the rock wheel this era.

    from QS Logger:

    //*****************************************************************************
    //
    // Saves data records that are stored in the flash to an externally connected
    // USB memory storage device (USB stick).
    // The flash memory is scanned for the presence of store data records.  When
    // records are found they are written in CSV format to the USB stick.  This
    // function assumes a non-corrupted storage area, and that any records, once
    // found, are contiguous with all stored records.  It will find the oldest
    // record and start with that when storing.
    //
    //*****************************************************************************

  • Thanks. I will try to modify the code.

  • Let me know what you come up with! I'm also trying to accomplish a similar functionality.
    I have a MicroSD breakout board that I'm trying to log GPS data with.