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.

TM4C123G -Saving 9-axis accelerometer data into SD card

Hello everyone,

I am using TM4C123g evaluation board. It takes only 2 or 3 minutes to fill up the flash memory when I save 9-axis accelerometer data in the flash memory.  I want to save the data in SD card in the format  that used to store data in PC. I have also checked that there is example for SD card which is only to read data. Another applications are USB mass storage. But these are all separate application or example and  I think not suitable for my problem.

However, the evaluation board has come up with a default application that can display or store in flash or save to PC  9-axis data. What I am trying is that to store the data in SD card in comma separated value (csv) format. Can anyone please help me with this problem.

Thanks

  • Hello everyone
    How can i increase the sampling of data to more than 1/32 s. I would like to atleast go for 1Khz sampling rate or more.
    Also how can i store the data on the SD card or USB stick for 30 minutes or more ( 30X60X1000 samples of data frames, each frame can have all the sensor data)
    I am using the logger program to collect data on to PC now
    Can anyone please assist about these issues??
    Thanks
  • Hi there,

    Can't stand to see a well constructed/thoughtful post just sit.  That said - our small tech group has done (similar) to what you seek - but w/another's ARM MCU.

    So as not to exile myself from this forum (again) may I suggest that you consider an MCU upgrade - to vendor's 129 series?   (there are several)  These are vendor's best/brightest devices - our experience reveals that you'll always want more (and faster) samples - thus makes little sense to "handicap" yourself w/less than best.

    In our application - we determined that fastest means to store data was via massive RAM - operating in conjunction with DMA.  Once so captured - we could transfer to an SD card (as you note) or via a serial means directly to the PC.  

    Believe the PC (then) better serves to "massage" your raw data into suitable .csv format - for import into Excel/similar.   And - there are "tricks" you can play w/in Excel to, "scale, convert, organize/order & expedite" that data import!    As always - mating the best tool to task proves a worthwhile consideration...

  • Hi

    Thank you for your reply.

    Before TM4C123g, I have also used LM4F232 development board which has only 3-axis accelerometer. In LM4F232 board, I also tried to store accelerometer data into SD card. I searched in the forum for any idea. Similarly, I have also searched for TM4C123g board. Most of the forum have discussed like to write data on SD card or read data or lunch pad data, memory stick and those does not address my problem. The accelerometer continuously sending data and simultaneously, I also have to write and store that data in SD card.

    But first of all, I need to store the 9-axis accelerometer data into SD card in CSV format.

    I want to do this because, the flash memory of the MCU filled-up within a couple of minutes.  And if I want to develop an application, it is not always possible to send data to PC via USB cable. So, I need to store the accelerometer data in SD card. Besides, it will also be helpful for me if there is any scope to increase the sampling rate.

    I have already upgrade from LM4F232 to TM4C123g. After all, I will think to upgrade to 129 series. But the TM4C123g board will serve my purpose if I can store the accelerometer data in SD card.

    Please assist me with any idea.

     

    Thanks

  • As I again read your request - I'm unclear if you've ever been able to store data w/in your SD card - might you clarify?  

    You go on to state that your Eval Board does support storage to a USB drive - would not a large such drive satisfy?  Please detail the (apparent) appeal of the SD card.

    You (restate) your desire to store data in .csv  format - did I not answer that in an earlier post?  We believe that adding yet more data (i.e. .csv format bytes) to your SD card (or USB drive) transfer is inefficient - both slowing & complicating the process.  Instead - as past stated - the PC appears far more ready/able/suitable for that purpose.  (i.e. massaging the raw sensor data into suitable .csv format)  Is it not true that you want more data - and at a higher rate?  Embedding .csv codes w/in your acquired data "eats" both time & storage - seems counter to your stated objectives.

    I can't agree that TM4C123 is "upgrade" from your LX4F232 - by what spec comparison do you reach that conclusion?

  • Hi
    Now I made it as battery operated system that remotely placed so no PC connection for now.
    data needs to be logged on board Ram or on a SD card. so need to collect the data.
    is it possible to use the TM 4C1294 launch pad with a sensor with SENSHUB BOOSTER PACK ?
  • Your brain & style far too fast & shape-shifting for this humble reporter.  I've provided "reasonable" direction - to little direct response - and now the landscape drastically changes.

    Other minds are (likely) better suited to your comfort - I cannot keep up...  Bon chance mon ami...

  • Hi

    I don't want to bother you..I am just trying to make my question and problems clear to all of you.  

    At present, I am using my PC to story acceleratometer data. But for my project I can't use PC. Thus, the alternative is SD card. And in all of my previous post, I have mentioned this things clearly.  Anyway, I don't want to argue about these. 

    I need to store data in SD card. Do you have any suggestion how would I do this? Still, I am not getting any idea.

    As you have mentioned, adding more data in  .csv format to SD card  is a complicated process and it may slow down the processing, so, what could be the suitable data format I should use and how could I store in SD card?

    Looking forward to hearing from you soon....

  • Mohammad Shams Arman Rupok said:
    in all of my previous post, I have mentioned this things clearly

    Clearly you believe that - myself/my tech group do not.

    We also harvest data - and never/ever attempt to "burden" the "Live data collection" by the insertion of .csv data during that process.  Instead - as I past detailed - the raw live data is subsequently (after the fact) processed by a PC and at that time the data is "massaged" into .csv appropriate format.  That's simply employing the best matched "tool" to the job.

    You persist w/SD card - while avoiding vendor's (proven) success w/USB drive.  We past suggested that USB method is tested/proven & vendor code is front/center.  You've never explained the appeal nor "need" for (only) SD card - might that (now) be indicated?  You state, "I need to store data in SD card."  I need bigger plane, more staff - so what!

    Why should my group - or any other "helper" care?  You've got to "sell" your request somewhat - don't you agree?  This is not being mean/unkind - an individual's (unexplained/unjustified) need is not especially compelling - that recognition will aid you - long after this thread crumbles...

    Vendor here must now "divert eyes/ears" - (I'm told) an ARM vendor w/"S" in their name has many software examples and eval boards which host such SD cards - their code won't run here - yet you'll gain many clues w/out much effort...

  • Hi everyone

    I can save data on SD card.

    I am trying to log data at 2 or 3 khz. That means per second I  am trying to get 2000 or 3000 samples. The evaluation board is configured to get 32 samples per second. I have changed the code in menu.c to get 128 samples per second as in suggested in the file. But it does not work.

    Can anyone suggest me anything

    thanks

    Rupok

  • Hi Mohammad,

    I also have a remote application and am having problems storing data on an SD card. What did you do to get that to work?

    thanks,
    Ricky
  • Hi  Ricky

    You can use the fat file system for SD card and follow the same procedure that is used to store data at USB device.

    thanks