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.

f28335 control card clock.



Hie All,

I am using F28335 control card,

i use to run my projects on that card that are working perfectly.

my question is that i have the old version of control card that have the clock of 20 MHz and the new card that i have is having 30 MHz clock.

now can any one please tell me how do i make dis card comaptalbe to may old code that are running on old clk cycles.

how can i set the clock to run my programs.

Regards,

Atiq Kazmi.

  • Atiq,

    You will need to find where the PLL multiplier setting is edited in your code and edit it for the new crystal frequency.  Specifically, you'll be looking for the DIV bit of the PLLCR register or a function that edits this register.  If you used TI source code to begin your project, this code is likely found in the DSP2833x_SysCtrl.c or DevInit_F2833x.c file.

    You should be able to multiply the PLL value you were using on the 20MHz crystal controlCARD by 2/3 to get the new PLL setting you'll need for the 30MHz crystal controlCARD. 

    MCU frequency = crystal frequency * PLL multiplier {set by PLLCR.bit.DIV}  / PLL divider {set by PLLSTS.bit.DIVSEL}
    For example, 150MHz = 30MHz * 10 / 2

    Hopefully this will resolve your issue.


    Thank you,
    Brett

  • Atiq -

    You will have to use the PLLCR and PLLSTS registers to change your clock prescaler values. For instance, now if you want to achieve 150 Mhz on the F28335:

    30 MHz external clock  * 10 / 2 = 150 MHz.

    SysCtrlRegs.PLLCR.bit.DIV = 10;       // clock * PLLCR
    SysCtrlRegs.PLLSTS.bit.DIVSEL = 2; // 1 = divide by 4; 2 = divide by 2; 3 = divide by 1

    If you are using the header files, DSP2833x_Examples.h in the /DSP2833x_common/include/ directory includes the #defines where you can change these values.

    If you cannot achieve the same operating frequency with the 30 Mhz clock as you could with the 20 Mhz clock, you may have to change some of your peripheral baud rate/prescalers to adjust for the frequency. Likewise, if operating at a different frequency, and your code resides in Flash, you may have to change your Flash wait states.

    All of this information can be found in the 2833x/2823x System Control and Interrupts Reference Guide (SPRUFB0)