Jump to content
43oh

Recommended Posts

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

Link to post
Share on other sites

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

 

Link to post
Share on other sites

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

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...