Skip to content

ov5640 VCO frequency calculation #827

@RomanLut

Description

@RomanLut

Checklist

  • Checked the issue tracker for similar issues to ensure this is not a duplicate.
  • Provided a clear description of your suggestion.
  • Included any relevant context or examples.

Issue or Suggestion Description

  1. ov5640 driver sets:

ret = set_pll(sensor, false, sys_mul, 4, 2, false, 2, true, 4);

//Set PLL: bypass: 0, multiplier: sys_mul, sys_div: 4, pre_div: 2, root_2x: 0, pclk_root_div: 2, pclk_manual: 1, pclk_div: 4

VCO = XCLK / pre_div * multiplier = 20000000 / 2 * 180 = 1800 MHz

which is way too high the limit 500-1000Mhz of PLL1 output:

Image

So how does it work?

  1. In the code VCO is calculated differently to diagram and application note, with division by root_2x_div:

unsigned int VCO = REFIN * pll_multiplier / root_2x_div;

Why?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions