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.

TM4C123GH6PGE: TM4C123GH6PGE

Part Number: TM4C123GH6PGE
Other Parts Discussed in Thread: CC3100

Hai sir good afternoon all,

Already i have and interface sd card and GSM modules and its functions, i developed a code for both of the two modules.My application is i want to send my sensor data to web through GSM and want to send data to sd card simultaneously. Now i am getting the problem with gsm module.If network is not there then GSM is not working and data is also not going to sd card.

I request you to please suggest me how to interface two modules and its functions work simultaneously.

Thanks in advance.

  • Hello Srinu,

    While I understand the description of your problem, there is a lot of information missing to even begin to suggest ideas for resolution.

    For the code you developed for each module, did you start with any software examples? If so, which ones?

    Are you using an RTOS?

    What are you using for GSM and sending data to the web? WiFi? If so, which device? CC3100? As the TM4C device you have listed doesn't have an Ethernet peripheral so I really have no idea what the GSM part even would look like. Please provide more details on this.

    If you could create a high level block diagram on what the expected code flow is for your program, that could help as well.

    Also lastly, your thread title should be more descriptive to help attract attention of community members who may have done a similar application and can help guide you as well.
  • Ralph Jacobi said:
    your thread title should be more descriptive to help attract attention

    *** LIKE ***

    (although "more" descriptive proves over-statement - part number's repetition (only) - as a headline - fails miserably!)

    So neat to see vendor agents join the "outsiders" who (earlier/properly) have noted - and advised/corrected - such inept subjecting...

  • Thanks for reply to me,

    I am not using RTOS, I am just developing code for GPRS by using SIM900A module, and send the data to web server,

    Now whats my problem is when i initialise the GSM function it checks the AT commands every time.If it fails then it didnot goto next function means i.e sd card writing function.

    So now what i am thinking is if is there any possible to use timer interrupt. if ok then i request you to please suggest me how to use it to work both functions simultaneously?


    Thanks in advance
  • Hello Srinu,

    A timer would be something to use if you want each task to execute at specific time intervals. If so, then yes that's an option.

    It sounds more like you just have an issue with the flow of your code though. The blocks to handle GSM and SD Card should be totally independent of one another. The SD Card API's should be on their own, capable of being called by the main function or the GSM functions, and likewise for the GSM. Then if your main function is setup right, you can try to connect on GSM first, but if it fails, you still can communicate with the SD Card. Or if the GSM is successful, you can send data across the GSM and into the SD Card.

    You should seek to ensure you modules are separate and not dependent on one another, and then if you are sure that is the case, just adjust the flow of your tasks in main. Another tip is that you would need a flag to indicate if the GSM has connected or not to know that you don't need to the write the SD Card when you do succeed with the GSM part so you don't double write for no reason.
  • I added GSM code first and after i added sd card function in my main function.Now where i am getting the problem is ,if GSM is not connected to internet then program execution not going to sd card function.

    I am requesting you, can u please send me any sample code to perform two modules simultaneously means independent each other.
    and please suggest me how to add two module functions i.e GSM and sd card in main function to work properly with out disturbing each other.


    Thanks in advance.
  • Hello Srinu,

    We don't have an example for such a specific application.

    As mentioned above, if the two modules are separate, then it's just a matter of writing your program flow correctly.

    You should make a flow diagram of how you want your code to execute, and then review what your main function does to see where your code is not aligning with that flow diagram.

    Again, you should have some system to know if you got a GSM connection or not, and if not, then prompt a section of code to still write to the SD card.
  • Thank you so much sir for suggesting me,


    I tried my code in previous according to your instructions.Finally its working fine.

    Thank you so much.