This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP4302618 timer register settings



Hi everyone,

I am trying to set Basic timer module of MSP4302168 for ACLK=32 khz and MCLK=MCLK=DCOCLK=1.45/1.5 MHz. I am setting these register settings in mspxxxx.h file

For ACLK 32768 Hz Crystal on LFXT1

           #define LFXT1S0             (0x00) //(0x10)   /* Mode 0 for LFXT1 (XTS = 0) */
          #define LFXT1S1             (0x00)//(0x20)   /* Mode 1 for LFXT1 (XTS = 0) */

For drivng MCLK and SMCLK

SELMx  

 

 

 

 

Bits 00 selects DCOCLK

   #define SELM0               (0x00)        //(0x40)   /* MCLK Source Select 0 */
   #define SELM1               (0x00) //(0x80)   /* MCLK Source Select 1 */

 

 

 

SELS  Bit 3 Select SMCLK. This bit selects the SMCLK source.

#define SELS                (0x00)         //  (0x08)   /* SMCLK Source Select 0:DCOCLK / 1:XT2CLK/LFXTCLK */

To drive DCO as according to MSP4302618 data sheet page 42

fDCO(7,3) DCO frequency (7, 3) RSELx = 7, DCOx = 3, MODx = 0 2.2 V/3 V 0.80 1.50 MHz

#define DCO0                (0x20)   /* DCO Select Bit 0 */
#define DCO1                (0x40)   /* DCO Select Bit 1 */
#define DCO2                (0x00)//(0x80)   /* DCO Select Bit 2 */

#define RSEL0               (0x01)   /* Range Select Bit 0 */
#define RSEL1               (0x02)   /* Range Select Bit 1 */
#define RSEL2               (0x04)   /* Range Select Bit 2 */
#define RSEL3               (0x00)//(0x08)   /* Range Select Bit 3 */

Are these settings enough or should i do some more modification means in my main file to make these settings work. Although i am using example code for MSP4302618 but to drive different clock sources only a description is given in comments, and when i have matched the description with the register settings in msp430x26x.h, I found them opposite, so i did these modification. Are these modification right?

Your valueable comments are highly regarded and would help me to learn from my mistakes:).

BR

**Attention** This is a public forum