Skip to content

Commit

Permalink
test(spi_master): increase C3/C6/H2 cpu frequency
Browse files Browse the repository at this point in the history
Fixes a timing issue that caused "SPI Master clk_source and divider accuracy" test case to fail
  • Loading branch information
urish committed Aug 28, 2024
1 parent a928b3e commit 9ce4d6a
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
2 changes: 1 addition & 1 deletion test/spi_master/diagram.esp32c3.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"id": "esp",
"top": 18.9,
"left": -109.38,
"attrs": { "cpuFrequency": "16" }
"attrs": { "cpuFrequency": "24" }
}
],
"connections": [ [ "esp:TX", "$serialMonitor:RX", "", [] ], [ "esp:RX", "$serialMonitor:TX", "", [] ] ],
Expand Down
2 changes: 1 addition & 1 deletion test/spi_master/diagram.esp32c6.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"id": "esp",
"top": 5.29,
"left": 4.12,
"attrs": { "cpuFrequency": "16" }
"attrs": { "cpuFrequency": "28" }
}
],
"connections": [ [ "esp:TX", "$serialMonitor:RX", "", [] ], [ "esp:RX", "$serialMonitor:TX", "", [] ] ],
Expand Down
19 changes: 19 additions & 0 deletions test/spi_master/diagram.esp32h2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"version": 1,
"author": "Uri Shaked",
"editor": "wokwi",
"parts": [
{
"type": "board-esp32-h2-devkitm-1",
"id": "esp",
"top": 2.23,
"left": -5.1,
"attrs": { "cpuFrequency": "36" }
}
],
"connections": [
["esp:TX", "$serialMonitor:RX", "", []],
["esp:RX", "$serialMonitor:TX", "", []]
],
"dependencies": {}
}
7 changes: 1 addition & 6 deletions test/test_spi_master.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
"chip", ["esp32", "esp32s2", "esp32s3", "esp32c3", "esp32c6", "esp32h2"]
)
def test_spi_master(chip: str):

diagram_dir = (
"" if chip in ["esp32", "esp32s2", "esp32s3", "esp32c3", "esp32c6"] else "../"
)

# Run the Wokwi CLI
result = subprocess.run(
[
Expand All @@ -23,7 +18,7 @@ def test_spi_master(chip: str):
"--scenario",
"../test_spi_master.scenario.yaml",
"--diagram-file",
f"{diagram_dir}diagram.{chip}.json",
f"diagram.{chip}.json",
"./spi_master",
]
)
Expand Down

0 comments on commit 9ce4d6a

Please sign in to comment.