nemetila 12 Posted January 23, 2013 Share Posted January 23, 2013 Hi, Here is my first project with Stellaris Launchpad. This is a very simple thermometer, that uses the internal temperature sensor of the Stellaris MCU for temperature measuring, and the UART_0 module for sending data to a PC application. The PC application displays the current temperature in °C numerically and graphically (acts as a logger). Short Description: In every two seconds the MCU: measures the temperature with ADC:ADC with 4 Samples and FIFO Depth Each FIFO with 64X Hardware Sample Averaging ADC Speed: 250 KS/s calculates the average and the temperature data in °C:Only integer math is used sends data to the PC:UART_0 module, TX only Baud Rate 115200 kbit/s Data format: „C” -> real temp 23.56978°C Data format: „dC” -> real temp 23.56978°C sent data: „236dC” Data format: „cC” -> real temp 23.56978°C sent data: „2357cC” and then enters to hibernation:Hibernation reduces self heating Wake from hibernation by RTC or WAKE_PIN LED indicators: BLUE: start from cold reset GREEN: start from hibernation by RTC (indicates run mode) RED: start from hibernation by WAKE_PIN Source Code: I used CCS 5.3 with StellarisWare to create the source code. Here is the full project:Stellaris_v01.zip Install CCS 5 and StellarisWare. Download and extract the *.zip file, then start CCS and use "Project"->"Import existing CCS Eclipse Project". Browse the extracted "Stellaris_v01" directory and click "Finish". Build Project then debug. I developed the PC application in C# with Visual Studio 2012, in Windows 8. The release files: Release.zip I updated my PC application. New features: error corrections users can select between Celsius [°C] and Fahrenheit [°F] temperature scale The release files: http://forum.stellarisiti.com/index.php?app=core&module=attach§ion=attach&attach_id=309 The source files: https://copy.com/4DkJpd4O49ky Requirements: Stellaris LM4F120 LaunchPad (no additional hardware is needed) Windows OS with .NET Framework 4 (for PC app.) A firmware for the MSP430 LaunchPad (MSP430G2553) with additional features(selectable averaging, supply voltage mesurement) is also available to the same PC application. The source code: main.c Important notes: „Getting Started with the Stellaris ® EK-LM4F120XL LaunchPad Workshop”: "Code Composer Studio has some issues connecting to hibernating devices (and reconnecting) since they essentially power off in the middle of the debugging process.We’ll try to step around those issues, but you may see CCS terminate abruptly. If this happens, you can restart CCS and try again, or you can use the LM Flash Programmer to reprogram the device with the qs-rgb (non-hibernation) program. In either case, you need to hold SW2 down to keep the LM4F device awake in order for either tool to connect." I am new to ARM(Stellaris). Some of the hibernation API functions is not clear to me. Sorry for my English Regards, Laszlo Updated: 02 June 2014 hongphuc6789, oPossum, Automate and 3 others 6 Quote Link to post Share on other sites
bluehash 1,581 Posted January 23, 2013 Share Posted January 23, 2013 Your english is perfect This is a well detailed project and thanks for sharing. Make sure you add it to the POTM list here. Quote Link to post Share on other sites
nemetila 12 Posted January 24, 2013 Author Share Posted January 24, 2013 Thank You for your reply. I will add it to there. OFF: I forgot to add the source code for the MSP430 LaunchPad: MSP430 Data Logger v05.zip Quote Link to post Share on other sites
trungkiena6 0 Posted January 26, 2013 Share Posted January 26, 2013 Sorry about my question. But i can't to debug your code. Have a problem with UARTprintf. please help me. I am a beginner with Stellaris Thank so Quote Link to post Share on other sites
nemetila 12 Posted January 26, 2013 Author Share Posted January 26, 2013 Hi, Thank You for your question. I'm a beginner too with Stellaris. I can debug UARTprintf function. Possible sources of the problem: Case 1: Because I used the StellarisWare library files: "If you are playing around with the code and get the message “No source available for …”, close that editor tab. The source code for that function is not present in our project. It is only present as a library file." /Stellaris WorkShop WorkBook, page 3-18/ Case 2: After the MCU has entered to hibernation mode, CCS loses connection with the LaunchPad, because the MCU is not powered. When it wakes again, CCS can't connect again. "Note: Code Composer Studio has some issues connecting to hibernating devices (and re- connecting) since they essentially power off in the middle of the debugging process. We’ll try to step around those issues, but you may see CCS terminate abruptly. If this happens, you can restart CCS and try again, or you can use the LM Flash Programmer to reprogram the device with the qs-rgb (non-hibernation) program. In either case, you need to hold SW2 down to keep the LM4F device awake in order for either tool to connect." /Stellaris WorkShop WorkBook, page 6-10/ trungkiena6 1 Quote Link to post Share on other sites
trungkiena6 0 Posted January 26, 2013 Share Posted January 26, 2013 This is my problem. Can you help me. I can't debug it. Quote Link to post Share on other sites
bluehash 1,581 Posted January 26, 2013 Share Posted January 26, 2013 You need to add or link the following files to your project. You can find them in the utils folder of Stellarisware. Right click on your project and click add files. - Uartstdio.c trungkiena6 and nemetila 2 Quote Link to post Share on other sites
trungkiena6 0 Posted January 26, 2013 Share Posted January 26, 2013 Thank admin so much. Quote Link to post Share on other sites
trungkiena6 0 Posted January 26, 2013 Share Posted January 26, 2013 Sr admin. Can you give me full folder about /ek-lm4f120xl/ in stellarisware. Because my version don't have it. Thank you Quote Link to post Share on other sites
bluehash 1,581 Posted January 26, 2013 Share Posted January 26, 2013 Sr admin. Can you give me full folder about /ek-lm4f120xl/ in stellarisware. Because my version don't have it. Thank you You can download that folder from TI. http://www.ti.com/tool/sw-ek-lm4f120xl trungkiena6 1 Quote Link to post Share on other sites
nemetila 12 Posted January 26, 2013 Author Share Posted January 26, 2013 I'm sorry for late reply. As bluehash said, first install stellarisware and add Uartstdio.c trungkiena6 and bluehash 2 Quote Link to post Share on other sites
nemetila 12 Posted January 31, 2013 Author Share Posted January 31, 2013 I updated my PC application. New features: error corrections users can select between Celsius [°C] and Fahrenheit [°F] temperature scale File to download: Release.zip Feel free to ask if you have any questions or requests. bluehash 1 Quote Link to post Share on other sites
nemetila 12 Posted February 25, 2013 Author Share Posted February 25, 2013 Someone requested the C# source code files. I uploaded my full solution to here: https://copy.com/4DkJpd4O49ky I am sorry but the source code is not commented at all, and may contains errors. (This is my first project in C#). bluehash 1 Quote Link to post Share on other sites
anisul 0 Posted February 28, 2013 Share Posted February 28, 2013 Hi I am new in microcontrolloer programming. While I compile the program in IAR workbench, I got the following message: Error[Pe020]: identifier "GPIO_PA0_U0RX" is undefinedError[Pe020]: identifier "GPIO_PA1_U0TX" is undefined I have included all necessary headerfiles and choose the stellaris in device option. Appreciate help. Rgs. Anisul Quote Link to post Share on other sites
nemetila 12 Posted February 28, 2013 Author Share Posted February 28, 2013 Hi, I think you have to add this two Preprocessor symbols: IAR -> Options -> C/C++Compiler -> Preprocessor -> Defined symbols: (one per line) -> ewarm PART_LM4F120H5QR Here is my settings: Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.