Dear Team
I have used the following clock configurations in my co
PM5CTL0 &= ~LOCKLPM5; // Startup clock system with max DCO setting ~8MHz CSCTL0_H = CSKEY >> 8; // Unlock clock registers CSCTL1 = DCOFSEL_3 | DCORSEL; // Set DCO to 8MHz [set to 8M] CSCTL2 = SELA__VLOCLK | SELS__DCOCLK | SELM__DCOCLK; //[Aclk, smclk and mclk] CSCTL3 = DIVA__1 | DIVS__1 | DIVM__1; // Set all dividers CSCTL0_H = 0; // Lock CS registers
The following functionalities are used in my code
1. UART to a GSM controller (working on uart at 115200 bps)
2. Timer for 15 mins (giving me a clear bit at the end of 15 min interval)
3. Key debounce logic (20 ms delay for debounce)
4. Flowrate calculation (every 2 seconds)
For 2 and 4 i am using the same timer configured as follows
TA0CCR0 = 40000; TA0CTL = TASSEL__SMCLK | MC_0 | TACLR | TAIE; // SMCLK, count mode, clear TAR // enable interrupt
For debounce i am using Timer1 A1 (TA1CCR0 = 8000)
My problem is that while functions 2,3,4 are working seamlessly i cannot seem to receive data on my UART Rx buffer from GSM controller.
However, when i comment the line
CSCTL3 = DIVA__1 | DIVS__1 | DIVM__1; // Set all dividers
the uart begins working. However, functions 2,3,4 are compromised (timer bit comes erratically). Can you please help me in understanding what might be going wrong and how i can resolve this?