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.

TIVA C Launchpad TM4C123GXL data logger using SD Card help

Hi there,

I am trying to create a device that logs data from an accelerometer to an SD Card that can then be mounted using Mass Storage USB or just using a card reader on the computer.

I am fairly inexperienced with the launchpad system but I have seen various threads mention porting code from examples from similar boards with built in SD cards. How ever i have no idea with where to start with this.

Any advice on where to start or what to do would be incredibly helpful as I've reached a bit of a cross roads.

Thanks in advance.

Kind Regards,

Thomas Bartley

  • The DK-TM4C123G is the place to start.  Ideally if you can afford to buy one.  If not then get the full version of TivaWare and examine the examples.  This board has USB, an SD Card and an MPU9150 accelerometer.  TivaWare has examples for all of the above.  In fact the QS-Logger application that comes pre-loaded on the board will take MPU9150 data and log it to a Flash Drive or to a PC application we created.  The board users guide in docs folder of TivaWare install will have a full list with descriptions of all the examples for the board.

    If you have to port DK-TM4C123G examples to a LaunchPad and BoosterPack system most (but probably not all) of the work will be in getting the GPIO pin configuration right at the beginning of main().  

    Dexter

  • Hi Dexter,

    Again - kudos to you for another detailed, caring response.  Much appreciated.

    Pardon - several of our clients have asked about that very, "PC application" your group created.  We expect that the PC application is a GUI - and that no "PC-GUI" source code nor any, PC "tips/tricks/hints" are included - both now and into the reasonable future.  Would you be so good as to comment upon this "PC-GUI" issue?   

    Surely many here share our clients' interest...  While your GUI may well achieve your objectives, "One size fits ALL" is unlikely to prove optimal for many users - who seek to customize and/or adapt your basic GUI - so that it better meets their unique requirements...   Such, "comfort & convenience" has past proven to, "boost Sales..."

    We thank you.

  • It has been a part of the TivaWare and StellarisWare releases since we introduces the DK-TM4C123G and EK-LM4F232 that preceded it.

    C:\ti\TivaWare_C_Series-2.0\tools\logger

  • Stellaris Dexter said:
    It has been a part of the TivaWare and StellarisWare releases

    Never doubted the PC-GUI's "inclusion" w/in past releases.

    Clients of ours - and many here - seek the Source Code for your PC-GUI - so that they may "adapt & possibly even extend it" - to their unique purposes!" 

    Are you stating that the PC-GUI's source code (not code for your MCU) is indeed included - thus a part of - past releases? 

  • Yes we release the source code for the PC application.

    The tools directory of TivaWare has several such applications with source code.  

  • Thank you - both pleased & shocked.  PC-GUI code for past apps such as BLDC, BDC motors, most (all) others clearly "guarded/withheld" such PC-GUI code.  For the reasons earlier listed - believe this new approach both wise & advantaged.  And would "so help" the BLDC App - especially...

    Our group was fortunate in receiving "gift" of earliest EK-232 Eval board.  (w/ BGA MCU)  Review of that kit's CD does not reveal PC-GUI source code.  (we later received several of the newer, QFP versions of that board - they're distant now but will check to see if that wanted/helpful source code landed there, too...)

    Thanks for this now, xtal clear (i.e. "source code" for the PC app) response - earlier one not quite so convincing...

  • The BGA board you speak of may not have had the PC source code.  That is stretching my memory capacity.  This board predates the logger application for sure. 

    The logger application came out at the time of the EK-LM4F232 kit which is now updated to be the DK-TM4C123G Kit.  The logger code should therefore be in the StellarisWare release from Sept of 2012 that included LM4F parts.  It should also be in the TivaWare releases since 1.0.  I verified it is in TivaWare 1.1, this is the oldest TivaWare i still have installed on my machine at the moment.

    Again for clarity, it is in the TivaWare installation.  It is not separately listed on the CD.  

    I put in an inquiry to the software team regarding the tool chains and utils needed to build these from the source we distribute.  I will post what i learn.

    Dexter

  • There is no doubt/question - BGA ver of EK-LM4F232 (recall that's an LX4F) showed no signs of PC source w/in its CD.  (three here have now checked/verified...)

    Here's a screen-cap showing our StellarisWare release, but Oct 2012.   Might those 3 highlighted files (especially those) be near sufficient to induce C++ to execute as intended?  (that listing is our entire content w/in StellarisWare\tools\logger.)   I note that newer versions - of those exact same files - appear w/in newer C_SeriesWare - 2.0.1.11577 - but we resist such use until the stability of past StellarisWare is demonstrated.

    Again - your efforts are appreciated...

  • The short answer i get back from the software team is yes.  We ship all that you need to build the PC application from Source.  The folder you show is the application itself. As previously stated it also uses the FLTK which is also in our TivaWare package in third_party.

    We use an older version of cygwin and GCC on our release build machine to build this and create the binaries that are in the tools\bin folder of a TivaWare release.

    I am told that for newer versions of cygwin / gcc there is no longer support for -mno_cygwin.  The work around is to modify the toolsdefs file in the parent tools directory to use the mingw compiler instead.  This is what seems to be the method of choice for our developers.

    Dexter

  • Thank you - once again you've provided great detail & aided our assistance to our joint tech clients.

    Made the time/effort to "dig up" initial, BGA ver. of EK-232.  And - no CD appeared w/that release - all files instead appeared on thumb/USB drive!

    Your last/bottom para. appears the likely cause of the difficulty our clients have presently reported (gaining some "starter, PC Side, GUI source code - so that their custom Apps could be enhanced & speeded) and explains why I sought your assistance. 

    Armed w/this new knowledge - we will (again) attack friendly wall w/our hard heads...  (although "seems to be" method of choice is not optimal for, clients' "confidence building.") 

    Might you gently tweak "software team"  for bit beyond, "seems to be?"  Merci.

  • Thank you for your detailed reply.

    I have taken the example for the mass storage device for the DK-TM4C123G and ported it to my device.

    To do this i have edited the mmc-dk-tm4c123g.c file to work with SSI3 and changed the pins accordingly.

    However, when i now try to initialize the sd card it hangs on the wait_ready() function due to rcvr_spi() returning nothing.

    Do you have any idea as to what might cause this?

    Kind Regards.

    Thomas Bartley 

  • The next suggestion would be to get a oscilloscope or logic analyzer and examine the SPI signals to and from the SD Card and begin debugging the physical connection and the software.

    Dexter