Hello List,
we have developed a new version of the msp430x54xx header, which includes
mostly all things described inside the datasheet. We have only tested the
Hardware Multiplier, the USCI (Uart and I^2C), Digital IO, Unified Clock
System, ADC and the Timers because these are the things we currently need.
By standard this patch behaves exactly like the old version of the library.
If you want to use the new version you have to define "NEWVERSION" before
including io.h.
This patch also has a new include directory called "msp430_test". All files
inside this directory describe one component in the way it is done inside
the msp430x54xx family userguide by Texas Instruments (only offsets are
given for component registers). The new header "msp430x54xx_template.header"
just gives the base address for each component, so that the registers will
be defined and called according to the datasheet. For example:
#include <msp430_test/USCI.h>
BUILDUSCI(0, 0x05C0);
BUILDUSCI(1, 0x0600);
BUILDUSCI(2, 0x0640);
BUILDUSCI(3, 0x0680);
You can then use things like "UCA1CTLW0 = 0x1234;" or "UCA0CTLW0 = 0x5678;"
inside your source code if you include "io.h" if "NEWVERSION" is defined
before.
This makes the way of including new mcus to the library more easy because if
they have the same component but other base addresses for this component you
only have to use the other base address inside the new header. If you want
to insert a new mcu this way to the library you only have to follow these
steps:
- create a new header called "msp430x<newmcufamily>_template.header"
- the first line of this header has to be
"//templatemcu=msp430x<OneSpecialMcuUsingThisHeader>"
assuming that this mcu is already included in mspgcc and binutils
- create new component files inside msp430_test directory if they
don't exist
- insert all components to "msp430x<newmcufamily>_template.header"
- insert a switch inside io.h if you build headers for existing mcus
so that the old header will be used by default
Please feel free to test the new version and give back some results. By the
way, this patch is only for the MSP430X branch. I will create a patch to the
standard branch as soon as possible. Because of its length I can't attach
the patch to the mail therefore you have to download it from
http://innoventis.de/downloads/mspgcc_190809.patch.
Best Regards,
Gerald