Calculation of register value for audio PLL

Hi,

I'm looking at the nrf5340 PS v1.2, page 75 & 76 regarding the audio clock PLL. Using the formulae given, I'm finding that the register value that yields the closest to 12.288MHz is 39846 (12.288005MHz). This differs from the table on P76 that gives a value of 39854. Is the PS in error or am I?

Regards,

AC

  • Hello AC,

    Thank you for your patience with this.

    Re-doing the math myself I also arrive at 39846 being the value closest to producing 12.288 MHz using the formula.
    I will ask the audio pll developers for a comment on this, and update you as soon as I hear back from them.

    Best regards,
    Karl

  • Hello again, AC

    Thank you for your patience with this.
    I spoke to the developers, and they told me that the central value is not necessarily the one closest to 12.288000 MHz - the number in the PS table is actually 12.288330 MHz rounded down to 12.288 MHz. The central point here is calculated as the value being in the middle of the range between the min and max, which is why it is 39854 instead of 39846.
    If you wish to generate a frequency closest to 12.288000 MHz then you should use the 39846 value, as given by the formula.

    Furthermore, I also spoke to another colleague about this who told me that the difference of ~300 Hz here likely would be negatable for most practical purposes anyways.

    Best regards,
    Karl

  • Hi Karl,

    Thank you for clarifying this. Much appreciated.

    Regards,

    AC

  • skajam66 said:
    Thank you for clarifying this. Much appreciated.

    No problem at all, AC - I am happy to help!

    I also thought I should mention that I discovered a typo in the MAX register value for the 11 MHz range of table 3, the value should be 18068 instead of 16068 as it says currently. We have created an internal ticket to have this fixed.
    Thank you for bringing this to our attention!

    Please do not hesitate to open another ticket if you should encounter any issues or questions in the future.

    Good luck with your development!

    Best regards,
    Karl

Related