Hello,
I have a problem whith UCS module. Program debuggin stops on testing oscillator fault flag
// Loop until XT1,XT2 & DCO fault flag is cleared
do
{
UCSCTL7 &= ~(XT2OFFG + XT1LFOFFG + XT1HFOFFG + DCOFFG);
// Clear XT2,XT1,DCO fault flags
SFRIFG1 &= ~OFIFG; // Clear fault flags
}while (SFRIFG1&OFIFG); // Test oscillator fault flag
In my program I using only DCOCLK and REFOCLK (trimmed 32,768 kHz) without XT1 and XT2. Program stops on marked line.
I even switch off by software XT1 and XT2 and the fault flag still apears. The line:
SFRIFG1 &= ~OFIFG;
suppose to clean the flag, but it can't. In datasheet of cc430 family is cleary written that XT2OFFG can be clean via software.
When I comment this point of the program, everything working fine, so did before. I hope that someone had similar problem and solved it.
Regards