CY29421FLXI: Set any clock frequency via I2C

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I need example code how to program the CY29421FLXI to an arbitrary output frequency. This runs in an embedded system without the ClockWizard software for PC. Here's what I have in mind:

void program_CY29421FLXI(double frequency)

{

    unsigned char DIVO_FS0;

    unsigned char DIVN_INT_FS0;

    unsigned char DIVO_MISC_FS0;

    unsigned char DIVN_FRAC0_FS0;

    unsigned char DIVN_FRAC1_FS0;

    unsigned char DIVN_FRAC2_FS0;

    // Calculate parameters

    // TODO...

    // Program via I2C

    i2c_write(0x55, 0x10, DIVO_FS0);

    i2c_write(0x55, 0x11, DIVN_INT_FS0);

    i2c_write(0x55, 0x12, DIVO_MISC_FS0);

    i2c_write(0x55, 0x13, DIVN_FRAC0_FS0);

    i2c_write(0x55, 0x14, DIVN_FRAC1_FS0);

    i2c_write(0x55, 0x15, DIVN_FRAC2_FS0);

    // Wait until large frequency change is active.

}

It must be possible to change the output frequency an unlimited number of times without power-cycling.

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
PradiptaB_11
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 replies posted

Hi Daniel,

I am attaching this document with one example code ( I2C script). Kindly go through it once and let us know for any further query.

Thanks and Regards,

Pradipta.

View solution in original post

0 Likes
3 Replies
lock attach
Attachments are accessible only for community members.
PradiptaB_11
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 replies posted

Hi Daniel,

I am attaching this document with one example code ( I2C script). Kindly go through it once and let us know for any further query.

Thanks and Regards,

Pradipta.

0 Likes
Anonymous
Not applicable

Thank you.

  • I'm worried about the section "Check Spurs". For the CY29421 with the fixed 122.88 MHz crystal, does it mean that some output frequencies must be avoided? We need continuous coverage from 50 MHz to 500 MHz with 1 Hz resolution
  • How does the RMS Phase Jitter (integrated over 12 kHz to 20 MHz) differ between Integer and Fractional PLL mode?
0 Likes

Hi Daniel,

Yes you are correct here. some output frequencies have to be avoided by you as for some fIN and fOUT frequencies there is a coupling in the PLL and you will not get the desired output there. Generally in that case it is suggested to change the fIN (Input frequency). So here in this case you will miss some of the frequencies which can generate spurs.

For our CY29421 device we try to program the PLL in Integer mode as it gives better Phase Noise performance. In fractional mode you will get a lower performance than Integer mode.

Thanks,

Pradipta.

0 Likes