2009/4/8 Sergey A. Borshch <[email protected]>:
> Roberto Padovani wrote:
>> Hi all,
>>
>> I cannot find the x5xx family definitions for UCS module.....am I
>> missing them, or are they missing at all ?
> Yes, it's not contributed yet.
>> If no one has written them, I suppose I have to write and contribute
>> them myself, right ?
> Exactly.
>
>[..]

Ok, here is a patch to the msp430x54xx.h and the ucs.h
The bit definitions are complete but I typed only the word oriented
definitions, without the _H and _L replicas, and there is no
structured packed type because.....I honestly did not understand it
very well...:-/

Can someone have a look at register UCSCTL8? It is somewhat
particular: there are some bits that are reserved in the TI family
guide (slau208), but which MUST always be written with 1s to have the
clocks running.
I made the choice to define:

/* UCSCTL8 */
#define MODOSCREQEN                     (1<<3)          /* MODOSC Clock Request 
Enable */
#define UCSCTL8_MASK            (0x0317)        /* Bit 0,1,2,4,8,9 MUST always 
be
written as 1  !!!!!

/* Aliases by mspgcc */
#define MODOSCREQEN_0           (UCSCTL8_MASK)                                  
/* Correctly Clear MODOSC:
UCSCTL8 = MODOSCREQEN_0 */
#define MODOSCREQEN_1           ((UCSCTL8_MASK)||MODOSCREQEN)   /* Correctly Set
MODOSC  :  UCSCTL8 = MODOSCREQEN_1 */

so that by using the MODOSCREQEN_0 or MODOSCREQEN_1 everything is
fine....but is someone uses the MODOSCREQEN directly, he has to pay
attention  not to forget the bit mask.

During the next days I'll try everything on an actual board and see
what I can do for the other new peripherals.

R#

Attachment: ucs.h
Description: Binary data

Attachment: msp430x54xx.h.patch
Description: Binary data

Reply via email to