umesh 1 Posted December 30, 2015 Share Posted December 30, 2015 Hello everyone, i want to use TM4C1294 connected launchpad and Energia software for programming. In datasheet it is given that operating frequency is 120MHZ. So how to set it to 120MHz. and how much is by default frequency? Another problem is that i want to handle analog signal up to 40 KHz with the same board. It is having 2 msps sampling rate. So with Energia environment; how much maximum sampling rate can we achieve practically? Please tell me how to change operating frequency using energia code. thanks in advance... Quote Link to post Share on other sites
L.R.A 78 Posted December 30, 2015 Share Posted December 30, 2015 In Energia the default frequency is 120Mhz.To change that you don't have any Energia functions.The maximum with 1 ADC is just 1 msps - you get 2msps if you use both ADCs with advanced techniques.Not sure on the max speed in Energia. I would say 40Khz is a bit pushing it, maybe you can just about reach it. tripwire 1 Quote Link to post Share on other sites
energia 485 Posted December 30, 2015 Share Posted December 30, 2015 As @L.R.A mentions, the default CPU frequency is set to 120 MHz. This is done in wiring.c line 64. There is some overhead in analogRead() that will most likely not get you to 40KHz. If you would like to get the max out of the ADC then I would advice to use the driverlib API's and base the implementation on interrupts rather then polling. You can use driverlib calls in Energia directly. Below is a code snip demonstrating how: #include <stdint.h> #include "driverlib/adc.h" #include "driverlib/sysctl.h" void setup() { SysCtlPeripheralEnable(SYSCTL_PERIPH_ADC0); } void loop() { } tripwire 1 Quote Link to post Share on other sites
energia 485 Posted December 30, 2015 Share Posted December 30, 2015 The driverlib userguide can be found here: http://www.ti.com/lit/ug/spmu298a/spmu298a.pdf Quote Link to post Share on other sites
L.R.A 78 Posted December 30, 2015 Share Posted December 30, 2015 Did that work @@energia? You usually need to add pin_map.h too and for it you require to #define PART Quote Link to post Share on other sites
L.R.A 78 Posted December 30, 2015 Share Posted December 30, 2015 btw, there's a new tivaware, will it updated in Energia in the future? Quote Link to post Share on other sites
umesh 1 Posted December 30, 2015 Author Share Posted December 30, 2015 thanx for help i will try this Quote Link to post Share on other sites
umesh 1 Posted December 31, 2015 Author Share Posted December 31, 2015 Another thing is i want to send data using bluetooth through UART. I tried for it but it won't work properly.I did it correctly on MSP430G2553 Launchpad but it was not working on TM4C1294 connected launchpad.is there any extra setting required due to more no of UART and multi function pins??Plz tell me how to do in Energia..Thanks.. Quote Link to post Share on other sites
Rei Vilo 695 Posted December 31, 2015 Share Posted December 31, 2015 Use void setModule(unsigned long); to select the Serial port or any of the following objects extern HardwareSerial Serial; extern HardwareSerial Serial1; extern HardwareSerial Serial2; extern HardwareSerial Serial3; extern HardwareSerial Serial4; extern HardwareSerial Serial5; extern HardwareSerial Serial6; extern HardwareSerial Serial7; energia, Fmilburn and umesh 3 Quote Link to post Share on other sites
umesh 1 Posted January 1, 2016 Author Share Posted January 1, 2016 ok thanks...i wil try this Quote Link to post Share on other sites
umesh 1 Posted January 2, 2016 Author Share Posted January 2, 2016 Thanks vilo UART is now working fine 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.