xv4y 46 Posted December 21, 2012 Share Posted December 21, 2012 Nothing else is touching BCSCTL3 and if you have not already done so can try: BCSCTL3 = (LFXT1S_0 | XCAP_3); I must have tried but will do again. Now time to pick up my son from school and out for dinner along the river in the city (Can Tho, Mekong delta, now 31 Quote Link to post Share on other sites
xv4y 46 Posted December 23, 2012 Share Posted December 23, 2012 Hi, I must be missing something... If I put BCSCTL3 = (LFXT1S_0 | XCAP_3); in the constructor, it seem to do nothing, ACLK is running at 12KHz. If I put it in my begin() (called in setup()), then the clock does not start at all... What is strange is that commenting out the BCSCTL3 line wiring.c does the trick... Yan. Quote Link to post Share on other sites
energia 485 Posted December 23, 2012 Author Share Posted December 23, 2012 By default P2.6 and P2.7 come up in XTAL mode, hence commenting out the line that sets them as GPIO makes it work. As for putting BCSCTL3 = (LFXT1S_0 | XCAP_3); in the constructor doesn't work but anywhere else does is I think as I mentioned before a compiler issue. This wasn't an issue with the previous compile. I will check in with the folks over @ mspgcc to find if this is a know issue. xv4y 1 Quote Link to post Share on other sites
xv4y 46 Posted December 27, 2012 Share Posted December 27, 2012 Hi Robert, Merry christmas to you. Sorry if I did not answer before but I was busy on other things including christmas and the kids... Thanks for investigating this. I will try to do other tests on my side. Regards, Yan. Quote Link to post Share on other sites
grahamf72 169 Posted January 5, 2013 Share Posted January 5, 2013 I've finally solved the problem with it running slow on Energia 0009.I also had the problem where it was running slow, and if I commented out the BCS3CTL line in wiring.c the clock wouldn't start at all. After a lot of mucking around I finally came up with the following solution. My file is based on version 1.03 of your source. I took all the clock commands out of the constructor, so all it does is initialise the variables, and moved them to the Begin function. My Begin now looks like the following: void RealTimeClock::begin(void) { BCSCTL1 &= ~DIVA_3; // ACLK without divider, set it to DIVA_0 P2SEL |= (BIT6 | BIT7); // This is to override default Energia settings that set P2_6 and P2_7 to GPIO instead of ACLK BCSCTL3 = (LFXT1S_0 | XCAP_3);// Override default Energia setting sourcing ACLK from VLO, now source from XTal TA1CCTL0 = CCIE; // CCR0 interupt activated TA1CCR0 = 128-1; // 4096 ticks of 32KHz XTal = 1 second, so 4 slices are 1 second => CCR0 counts N+1 TA1CTL = TASSEL_1 | ID_0 | MC_1; // Clock for TIMER 1 = ACLK, No division, up mode }; I noticed that in your version 1.02 of RealTimeClockSec, you have moved the clock initialisation to Begin() but it doesn't work. But the version of Begin() in that file doesn't have the lines to reset Bit 6 & 7 of P2. I suspect that something is playing with P2 after the constructor runs. Quote Link to post Share on other sites
grahamf72 169 Posted January 8, 2013 Share Posted January 8, 2013 I've had a bit more of a play, and found that Energia doesn't like having the hardware played with inside constructors when a global scope instance of a class is created. In addition to what I discovered with the Real-Time-Clock library, I tried xv4y's Thermometer_430 library that is on his website, and it would hang at the start every time. The library had calls to AnalogReference & AnalogRead in the constructor. When I moved those to the begin() function, it worked perfectly also. I must confess that I don't know enough about this system to know whether that is a bug or whether it is by design, but it is something to be mindful of if libraries are misbehaving - check the constructor for anything to do with the hardware, and move anything that plays with the hardware to begin() or an equivalent function. It looks like variable initialisation is about all that can be done inside constructors. Quote Link to post Share on other sites
energia 485 Posted January 8, 2013 Author Share Posted January 8, 2013 Unfortunately this is not by design. This issue started turning up when we changed to a newer version of the compiler. I hope to get this addressed in the next release. For now, put anything that relies on interrupts anywhere other than the constructor e.g. begin(). Quote Link to post Share on other sites
asez73 1 Posted January 22, 2013 Share Posted January 22, 2013 Thanks for the solution maxik. That fixed that one for me. For me too... I had the same error with a file name (gc++) that actually existed at the right place. I had to move the whole energia directory (copy/paste), and thus shorten the path name. This made a shorter directory name for energia and all went back correctly. There must be some maximum lenght for file names that are too short for Windows 7 somewhere in energia. Thanks for the idea! Quote Link to post Share on other sites
MichelV 4 Posted January 25, 2013 Share Posted January 25, 2013 I was bitten pretty hard by a bug in "millis()" (it can't go higher than 53787 ms in 0101E0009 for the Stellaris), which seems to be fixed in GitHUB (thanks for that :-)). I could work around it for now, but I'm wondering when we could expect a new release... Is there a roadmap or anything? Quote Link to post Share on other sites
energia 485 Posted January 29, 2013 Author Share Posted January 29, 2013 Release cycle typically has been around 2-3 months. We haven't decided on what's next for Stellaris though other than a bug fix release. Quote Link to post Share on other sites
Mac_Ha 0 Posted February 2, 2013 Share Posted February 2, 2013 What drivers are needed to access the LaunchPad on Windows? I installed the "Stellaris ICDI Drivers" and the LaunchPad shows up as "Stellaris Virtual Serial Port (COM3)", "Stellaris OCDO DFI Device" and "Stellaris ICDI JTAG/SWD Interface" in the device manager, COM3 is available in the "Tools/Serial Port" menu of Energia. But when I try to upload the Blink example I get the following error message: Binary sketch size: 1.916 bytes (of a 262.144 byte maximum) Failed! No ICDI device with USB VID:PID 1cbe:00fd found! I confirmed that the Serial Port Device has the correct VID: USB\VID_1CBE&PID_00FD&REV_0100&MI_00 For the record, I'm using Windows 8. Any solution to this? I'm having exactly same problem, and also on the W8 32-bit machine. Strangely, on the same machine, CCS 5.3 as well as FlashProgrammer are having no problems withProject0 as well as putting back the qs-rgb... Any help would be much appreciated. Quote Link to post Share on other sites
HorusMex 0 Posted March 11, 2013 Share Posted March 11, 2013 Hi there! I'm new to this MSP430 world, and I was pointed into Energia direction. Unfortunatedly, I've been trying to download the Windows version for the past week, and it keep cancelling after aprox. 19.7 Mb.... Any other place I can download or someone who can help me? I'm using Chrome 25.0 on Win 7. Thanx in advance! Quote Link to post Share on other sites
semicolo 39 Posted March 11, 2013 Share Posted March 11, 2013 Strange, sent you a PM with a link to the file on my skydrive. Quote Link to post Share on other sites
chibiace 46 Posted April 5, 2013 Share Posted April 5, 2013 on my 64bit ubuntu linux with 0009, lib/librxtxSerial.so seems to be called instead of lib/librxtxSerial64.so so i get this error: wrong ELF class: ELFCLASS32 just replacing librxtxserial.so with the librxtxserial64.so seems to have worked but shouldnt this be automatic? Quote Link to post Share on other sites
PolkaDot 12 Posted May 3, 2013 Share Posted May 3, 2013 On loading blink I'm getting a "CreateProcess error=2, The system cannot find the file specified" I'm running Windows 7, 64 bit. Lay the knowledge on me 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.