I cannot get the DCO / FLL to operate at the desired frequency.
1) I cannot set UCSCTL0 to estimated values. Each time I set it it changes. Seems input should only come from FLL. I have SCG0 set (bit value 1) which is supposed to disable the FLL. I note also that the code in void Init_FLL(uint16_t fsystem, uint16_t ratio) from the TI F5xx_F6xx_Core_Lib has the same problem. There USCTL0 is set to 0. adding code to read it back immediately and it is not 0. The code in the TI example is
__bis_SR_register(SCG0); // Disable FLL
UCSCTL0 = 0x0000; // Set DCO to lowest Tap
nTest=UCSCTL0 // added to test UCSCTLO reads back 0x14F8
2) It seems the lock condition of the FLL / DCO should be given by the following (assuming DCORSEL is set to the proper range)
DCO freq / prescale (FLLD) / divider (FLLN) = FLLREFCLK / divider (FLLREFDIV)
This is not working properly. Could it be related to UCSCTL0 is not close. It seems that it should not change when SCG0 is set.