etherkit / Si5351Arduino

Library for the Si5351 clock generator IC in the Arduino environment
GNU General Public License v3.0
229 stars 94 forks source link

Nullify spread spectrum #82

Open mrguen opened 3 years ago

mrguen commented 3 years ago

Describe the bug

On some chips the frequency seems wrong. In fact when checking the registers spread spectrum was activated. Probably from the factory.

Correction

I added code in the reset() function

void Si5351::reset(void) {
...
    si5351_write(SI5351_SSC_PARAM0, 0);
    si5351_write(SI5351_SSC_PARAM1, 0);
    si5351_write(SI5351_SSC_PARAM2, 0);
    si5351_write(SI5351_SSC_PARAM3, 0);
    si5351_write(SI5351_SSC_PARAM4, 0);
    si5351_write(SI5351_SSC_PARAM5, 0);
    si5351_write(SI5351_SSC_PARAM6, 0);
    si5351_write(SI5351_SSC_PARAM7, 0);
    si5351_write(SI5351_SSC_PARAM8, 0);
    si5351_write(SI5351_SSC_PARAM9, 0);
    si5351_write(SI5351_SSC_PARAM10, 0);
    si5351_write(SI5351_SSC_PARAM11, 0);
    si5351_write(SI5351_SSC_PARAM12, 0);
...
}