Skip to content

Commit 4581f25

Browse files
committed
Use 20MHz, not 24MHz, master clock
The clock module requires a very low jitter clock. The esp32-s2 can do this with a 20MHz clock but not a 24MHz one, because it is dividing an internal clock of 80MHz to generate it.
1 parent caf36a8 commit 4581f25

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

README.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ Usage Example
8787
vsync=board.CAMERA_VSYNC,
8888
href=board.CAMERA_HREF,
8989
mclk=board.CAMERA_XCLK,
90-
mclk_frequency=24_000_000,
9190
size=adafruit_ov5640.OV5640_SIZE_QQVGA,
9291
)
9392
print("print chip id")

adafruit_ov5640.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@ def __init__(
818818
shutdown=None,
819819
reset=None,
820820
mclk=None,
821-
mclk_frequency=24_000_000,
821+
mclk_frequency=20_000_000,
822822
i2c_address=0x3C,
823823
size=OV5640_SIZE_QQVGA,
824824
): # pylint: disable=too-many-arguments
@@ -838,7 +838,11 @@ def __init__(
838838
master clock signal, or None if the master clock signal is
839839
already being generated.
840840
mclk_frequency (int): The frequency of the master clock to generate, \
841-
ignored if mclk is None, requred if it is specified
841+
ignored if mclk is None, requred if it is specified.
842+
Note that the OV5640 requires a very low jitter clock,
843+
so only specific (microcontroller-dependent) values may
844+
work reliably. On the ESP32-S2, a 20MHz clock can be generated
845+
with sufficiently low jitter.
842846
i2c_address (int): The I2C address of the camera.
843847
"""
844848

examples/ov5640_directio_kaluga1_3_ili9341.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@
7474
vsync=board.CAMERA_VSYNC,
7575
href=board.CAMERA_HREF,
7676
mclk=board.CAMERA_XCLK,
77-
mclk_frequency=24_000_000,
7877
size=adafruit_ov5640.OV5640_SIZE_QVGA,
7978
)
8079

examples/ov5640_sdcard_kaluga_1_3.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
vsync=board.CAMERA_VSYNC,
4747
href=board.CAMERA_HREF,
4848
mclk=board.CAMERA_XCLK,
49-
mclk_frequency=24_000_000,
5049
size=adafruit_ov5640.OV5640_SIZE_QSXGA,
5150
)
5251

examples/ov5640_simpletest.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
vsync=board.CAMERA_VSYNC,
3939
href=board.CAMERA_HREF,
4040
mclk=board.CAMERA_XCLK,
41-
mclk_frequency=24_000_000,
4241
size=adafruit_ov5640.OV5640_SIZE_QQVGA,
4342
)
4443
print("print chip id")

0 commit comments

Comments
 (0)