The CSL basically "sucks" * because it uses preprocessor macros to describe registers while the C language provides bitfields for this purpose. Here is an example (DSP interrupt controller) showing why the bitfield method is much better for coding:
CSL_FINS (intcRegs->INTMUX1, DSPINTC_INTMUX1_INTSEL4, TIMER0_EVENT); //CSL
intcRegs->INTMUX1.INTSEL4= TIMER0_EVENT; //bitfields
The bitfields method is more readable and writable. It can be read and written directly using the hardware manual, no need to learn anything to do with software libraries. It would be no more effort to provide support software that provides bitfield descriptions than macro descriptions.
Unfortunately there is a problem with the second statement. The compiler generates a byte access for it. A byte write-access to a register may have undesirable side-effects on the bytes that are not addressed. Read accesses work.
The CCS debugger fully supports bitfields, whereas macros are meaningless to the debugger. Eg you can read amd write intcRegs->INTMUX1.INTSEL4 with the debugger but you can't read it using any macro expression.
My conclusion is that TI has (maybe) not thought out how to make use of bitfields in its support software and if they had they would have had to make some provision in the compiler to generate 32 bit accesses even when only 1 bit is written to.
I hope someone can confirm or correct my understanding of how the compiler and the registers work and consider suporting improvements to the CSL, perhaps with community support. I would help.
A relevant thread from 2011, http://e2e.ti.com/support/microcontrollers/msp430/f/166/t/91725.aspx , has this information, which is relevant but not the end of the story in my opinion.
"... there are several hardware registers where bitfields simply not work, e.g. those with a password. Or interrupt vector registers, where reading the register removes the interrupt state, no matter which abstract bit member you accessed.
Or other registers where it is necessary to set several bits simultaneously. Or where the additional access for each bitfield access has unwanted (and perhaps at first unniticed) side effects. MCU programming is not an abstract thing, it has to deal with real world realtime requirements and restrictions. being as close to the hardware as possible is the key to success. ..." -Jens-Michael Gross
* Excuse me but it has been annoying me for years.