All:
Reference: HAL_UCS.c found in
C:\ti\msp430\MSP430ware_1_90_00_30\examples\boards\MSP-EXP430F5529\src\F5xx_F6xx_Core_Lib
I have noticed a difference in fault checking between an earlier level of HAL_UC and the latest (found in the release 1.90). I have seen the following difference in all of the oscillator start routines. (XT2_Start, XT1_Start, LFXT_Start)
Earlier releases had a while() loop like this:
while (SFRIFG1 & OFIFG) { // Check OFIFG fault flag
UCSCTL7 &= ~(DCOFFG+XT1LFOFFG+XT1HFOFFG+XT2OFFG); // Clear OSC flaut Flags
SFRIFG1 &= ~OFIFG; // Clear OFIFG fault flag
Later releases (including 1.90) had the following while loop like this:
while (UCSCTL7 & XT2OFFG){ // Check XT2 fault flag
UCSCTL7 &= ~(XT2OFFG); // Clear XT2 fault flag
// Clear the global fault flag. In case the XT2 caused the global fault flag to get
// set this will clear the global error condition. If any error condition persists,
// global flag will get again.
SFRIFG1 &= ~OFIFG;
}
Differences - the earlier while() loop looked for the OFIFG flag to be cleared, while the later loop looks only for the specific fault flag to be cleared. Also, the earlier loop attempted to clear all of the oscillator flags associated with OFIFG flag, and the later loop only attempts to clear the specific oscillator flag and the OFIFG flag.
Questions:
1. Why was this change made? (I tried looking through the release notes, and did not find anything related to this change.)
2. Are there problems associated with trying to clear multiple oscillator flags instead of the one that is particular to the oscillator being started?