4 Replies Latest reply on Aug 12, 2013 10:06 AM by chang.long.zhu.jin

    Using software to change clocks

    chang.long.zhu.jin

      Hello,

         

      I may have a 'silly' doubt about using the software (APIs) to modify clocks and frequencies, which is: how to set the the PLL as the source of the Masterclock, and changing the divider thorought the code.

         

      At the moment I have the following code, but it does not work as expected:

         

       

         

          CyPLL_OUT_SetSource(CY_PLL_SOURCE_IMO);

         

          CyPLL_OUT_SetPQ(15,1, 4);

         

          CyMasterClk_SetSource(CY_MASTER_SOURCE_PLL);

         

          CyFlash_SetWaitCycles(5);

         

          CyDelayFreq(5000000);

         

          CyMasterClk_SetDivider(14);

         

       

         

      Any suggestions?

         

       

         

      Best