alpinistbg 0 Posted April 30, 2019 Share Posted April 30, 2019 Hello, The Blink example works 16 times slower than expected on EXP430G2 rev.1.3 with MSP430G2452. Also enableXtal() gives up after >30 seconds. Perhaps some divider not properly adjusted. I wanted to play with the kids and Energia/Launchpad, but no luck :( Usually, I use CCS for MSP430 development, and I'm not quite familiar with Energia and the init sequence. Energia 1.8.7E21 (Linux 64), Launchpad EXP430G2 rev 1.3, MSP430G2452, no XTAL Quote Link to post Share on other sites
StefanSch 10 Posted May 2, 2019 Share Posted May 2, 2019 this issue got already fixed a while ago - unfortunately the fix did not get merged into the master branch. Just did the update there so it will go into the next release. Meanwhile you can fix this locally with patching the wiring.c file. In the function InitClock update the first lines to: void initClocks(void) { #ifdef __MSP430_HAS_BC2__ #if (defined(CAL_BC1_16MHZ) || defined(CALDCO_16MHZ_)) && F_CPU >= 16000000L BCSCTL1 = CALBC1_16MHZ; DCOCTL = CALDCO_16MHZ; #elif (defined(CAL_BC1_12MHZ) || defined(CALDCO_12MHZ_)) && (F_CPU >= 12000000L) BCSCTL1 = CALBC1_12MHZ; DCOCTL = CALDCO_12MHZ; #elif (defined(CAL_BC1_8MHZ) || defined(CALDCO_8MHZ_)) && (F_CPU >= 8000000L) BCSCTL1 = CALBC1_8MHZ; DCOCTL = CALDCO_8MHZ; #elif (defined(CAL_BC1_1MHZ) || defined(CALDCO_1MHZ_)) && (F_CPU >= 1000000L) BCSCTL1 = CALBC1_1MHZ; DCOCTL = CALDCO_1MHZ; #else #warning No Suitable Frequency found! #endif #endif alpinistbg 1 Quote Link to post Share on other sites
alpinistbg 0 Posted May 2, 2019 Author Share Posted May 2, 2019 Thanks Stefan! Now it works fine. I just wonder why the default 'Preferences/Compiler warnings' default value was 'None'. When changed to 'All' it gives at least a clue where to look for. Regards, Quote Link to post Share on other sites
StefanSch 10 Posted May 3, 2019 Share Posted May 3, 2019 Thanks for the feedback. Good to know it is working for you. Having a user not familiar with the syntax of compiler warnings this could be very confusing. So having a shorter reporting makes this easier. As the Energia or Arudino is also targeted for users without great experience on Microcontroller and compiler this makes sense. ~ Stefan 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.