This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

PLL RTC problem

Hi all.
I've a problem to initialize the Pll block and the Real time clock.
I would use Fin=32.768Khz Fcco=288Mhz cclk=Fcco/4=72Mhz.
I read all the datasheet and i write my code but when i download the code, the mcb2300 doesn't work. I don't understand which is the issue.

PLLCON = 0x00;
        PLLFEED = 0xAA;                 /*FEED SEQUENCE 1*/
        PLLFEED = 0x55;                 /*FEED SEQUENCE 2*/
        CLKSRCSEL = 0x02;               /*RTC CCLK 32.768KHZ*/
        PLLCFG = 0x12254;
        PLLFEED = 0xAA;                 /*FEED SEQUENCE 1*/
        PLLFEED = 0x55;                 /*FEED SEQUENCE 2*/
        PLLCON = 0x01;                  /*enable PCONE*/
        PLLFEED = 0xAA;                 /*FEED SEQUENCE 1*/
        PLLFEED = 0x55;                 /*FEED SEQUENCE 2*/
        CCLKCFG = 3;                    /*Fcco/4 --->CCLK=72MHz*/
        VICIntEnable = (1<<12);
        while ((PLLSTAT & 0x04000000) == 0); /*wait until Phase Lock*/
        PLLCON = 0x03;                       /*enable PCONE and PCONC*/
        PLLFEED = 0xAA;                 /*FEED SEQUENCE 1*/
        PLLFEED = 0x55;                 /*FEED SEQUENCE 2*/
        RTC_ILR = 0x07;                      /*clear flag*/
        RTC_CISS = 0x85;                     /*enable interrupt every 16ms*/
        RTC_CCR = 0x19;
        VICVectAddr13 = (unsigned long)RTC_IRQHandler;  /* Set Interrupt Vector     */
        VICVectCntl13 = 0;                  /* use it for RTC Interrupt */
        VICIntEnable  = (1  << 13);          /* Enable Interrupt         */


Thanks to much.

Parents Reply Children