Quantcast
Channel: MSP low-power microcontrollers
Viewing all articles
Browse latest Browse all 62309

Forum Post: MSP430FG6626 CTSD16 clock fault

$
0
0
I'm using CTSD16 on MSP430FG6626 . The CTSD16OFFG bit in CTSD16CTL Register is always 1, just on device power-up before configuring the ADC. The conversion still starts (and even enters interrupt service routine, when enabling interrupt) when writing the CTSD16SC bit, but conversion result memory is always 0. Also the Digitally Controlled Oscillator used to supply MCLK always has the DCOFFG fault bit on. But the program runs without problem...?! And CTSD16 has independent oscillator so this isn't the reason for CTSD16's clock fault? Tried 2 devices, both show the same problem. Any hint? More info: For system clock, I'm using internal REFO for ACLK and DCO for MCLK, with no external oscillator. code for clock configuration: UCSCTL0 = DCO1 + DCO2; // DCO = 6 UCSCTL1 = DCORSEL_1 + DISMOD; // disable modulation UCSCTL2 = FLLD_1 + FLLN0; // FLLD = 2, FLLN = 1 (multiplies DCOCLK by 4) UCSCTL3 = SELREF__REFOCLK + FLLREFDIV__1; UCSCTL4 = SELA__REFOCLK + SELM__DCOCLK; // ACLK = internal 32768Hz clk, MCLK = DCO UCSCTL5 = 0; // ACLK, MCLK divide by 1 UCSCTL6 = XT2OFF + SMCLKOFF + XT1OFF; UCSCTL8 = MCLKREQEN + ACLKREQEN; A 22nF ceramic capacitor is connected between CPCAP pin and GND for rail-to-rail operation of CTSD16. code for CTSD16: REFCTL0 = REFMSTR + REFON; CTSD16CTL = CTSD16REFS; // Internal voltage ref CTSD16CCTL0 = 0; // continuous conversion, oversample 256, offset binary format, single channel CTSD16INCTL0 = CTSD16RRI + CTSD16INCH_0; // rail-rail input, IN+ = A0, IN- = Vrefbg (1.16V), pre-amp gain = 1 CTSD16IE = 0; // no interrupts CTSD16CCTL0 |= CTSD16SC; // ADC start conversion

Viewing all articles
Browse latest Browse all 62309

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>