This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

msp430g2553 clock calibration header values

Other Parts Discussed in Thread: MSP430G2553, MSP430G2153, MSP430G2203, MSP430G2213, MSP430G2233, MSP430G2253, MSP430G2303, MSP430G2313, MSP430G2333, MSP430G2353, MSP430G2403, MSP430G2413, MSP430G2433, MSP430G2453, MSP430G2513, MSP430G2533, MSP430TCH5E

On the msp430g2553, I have been programming the clock calibration using version 1064 of the header file, where the calibration information is declared as:

msp430g2553.h (excerpts)

----------------------------------------------------------------------

#define __MSP430_HEADER_VERSION__ 1064

#define CALDCO_1MHZ_          0x10FE    /* DCOCTL  Calibration Data for 1MHz */
const_sfrb(CALDCO_1MHZ, CALDCO_1MHZ_);
#define CALBC1_1MHZ_          0x10FF    /* BCSCTL1 Calibration Data for 1MHz */
const_sfrb(CALBC1_1MHZ, CALBC1_1MHZ_);

----------------------------------------------------------------------

Compiler : gcc4.7.2 with the mspgcc backend from Sourceforge.


Now that gcc4.9 natively supports the msp430, I have built it and it seems to work : however as part of that process I upgraded to header file version 1109, available from this page: http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/1_00_00_00/index_FDS.html

specifically this archive:

http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/1_00_00_00/exports/GCC_RH_20131206.zip

new msp430g2553.h (excerpts)

----------------------------------------------------------------------

#define __MSP430_HEADER_VERSION__ 1109

#define TLV_DCO_30_TAG_       0x10F6    /* TLV TAG_DCO30 TAG */
const_sfrb(TLV_DCO_30_TAG, TLV_DCO_30_TAG_);
#define TLV_DCO_30_LEN_       0x10F7    /* TLV TAG_DCO30 LEN */
const_sfrb(TLV_DCO_30_LEN, TLV_DCO_30_LEN_);

#define CAL_DCO_1MHZ           (0x0006)  /* Index for DCOCTL  Calibration Data for 1MHz */
#define CAL_BC1_1MHZ           (0x0007)  /* Index for BCSCTL1 Calibration Data for 1MHz */
----------------------------------------------------------------------

As we can see, CALDCO_1MHZ has gone, and been replaced with a base address to the calibration page and a bunch of offsets : thus my existing MSP430 applications no longer build.

Some other CPU header files (at version 1109) still only have the old style #defines into the calibration table; the majority have both old and new styles. But the msp430g2553 has lost the old form : is this planned obsolescence in the C header files?

It's not just the msp430g2553 : of 112 header files with the comment

/************************************************************
* Calibration Data in Info Mem
************************************************************/

there seem to be 18 with missing #defines. Full list:

msp430g2113
msp430g2153
msp430g2203
msp430g2213
msp430g2233
msp430g2253
msp430g2303
msp430g2313
msp430g2333
msp430g2353
msp430g2403
msp430g2413
msp430g2433
msp430g2453
msp430g2513
msp430g2533
msp430g2553
msp430tch5e

I can't see any reference to the old style being deprecated or obsolescent : just silently dropped...

What gives? Is the old style obsolete and I missed the announcement?

Or were the header files carelessly updated, some variables accidentally omitted, and these will be corrected in the next release?

Or do we all need to rewrite all our applications to use the new style, or what?

For now I can work around it by e.g. locally hacking the header file, but this is hardly satisfactory.

  • Yes, you are right. Something ugly happened with header files.

    Previous thread and temporary solution for g2553

    If you are sure you have up-to-date compiler, then what I can say :/ Shame on TI

  • Well the compiler is built from the upstream gcc-4.9-20140112 snapshot , so I'd call it *fairly* up to date.

    I don't actually use the header files directly, I auto-generate Ada packages from them (which incidentally reduces the size by 90%. So much for Ada being verbose!). So I won't worry about warping the package generator to cope with this ugliness, I'll just use an older version (20130321, version 1073) before the damage was done.

    If anyone else has the same problem, that version is available here :  http://sourceforge.net/projects/mspgcc/files/msp430mcu/msp430mcu-20130321.zip/download

    But it would be useful to know when the next update to the official files is supposed to be.

    ---------------------------------------------------------------------------------

    I do have one other question on the package

    http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/1_00_00_00/exports/GCC_RH_20131206.zip


    In addition to the include files, this package also includes a whole lot of folders containing ldscripts, and no install instructions. How and where is it supposed to be installed?

    If I put the ldscripts in (to me) the logical place, (the lib/ldscripts folder, following mspgcc practice), the compiler can't find them : unless I add another -L<path> option to the linker options. (Which is ugly, but it works).

  • Hi Brian,

    I'm so sorry that you've run into this issue. We are keeping the same calibration constants, this was a mistake when they tried to add in a way to access the temperature calibration constants. The version of the header files that I have that has both definitions for G2553 is 1115, so it sounds like it is newer. This is in the latest CCS though - I don't see an updated version of GCC beyond 1.00.00.00 which it sounds like you already have. I will notify the team that the GCC install needs to be updated to include the latest version of the header files so others don't run into this as well. Thanks for bringing the issue to our attention.

    In the meantime, if you can try the headers from the other post that Ilmars linked, I hope these can help get you up and running.

    Regards,

    Katie

  • Thanks for your answer - an excellent helpful group here!

    I'm still getting to grips with the new gcc4.9 but it's looking good so far. Now I just need to know what happened to all the builtin functions in the old mspgcc; how EINT, DINT and so on are handled now.


    - Brian

**Attention** This is a public forum