mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
feat(cam): esp_cam add pm lock function and test
This commit is contained in:
@@ -51,6 +51,9 @@ static bool IRAM_ATTR camera_trans_finished(esp_cam_ctlr_handle_t handle, esp_ca
|
||||
|
||||
TEST_CASE("TEST esp_cam on ov5647", "[csi][camera][ov5647]")
|
||||
{
|
||||
new_buffer_count = 0;
|
||||
trans_finished_count = 0;
|
||||
|
||||
size_t frame_buffer_size = TEST_MIPI_CSI_DISP_HRES *
|
||||
TEST_MIPI_DSI_DISP_VRES *
|
||||
TEST_RGB565_BITS_PER_PIXEL / 8;
|
||||
@@ -127,11 +130,12 @@ TEST_CASE("TEST esp_cam on ov5647", "[csi][camera][ov5647]")
|
||||
TEST_ESP_OK(esp_isp_enable(isp_proc));
|
||||
TEST_ESP_OK(esp_cam_ctlr_start(cam_handle));
|
||||
TEST_ESP_OK(esp_cam_ctlr_receive(cam_handle, &trans_data, ESP_CAM_CTLR_MAX_DELAY));
|
||||
vTaskDelay(100 / portTICK_PERIOD_MS);
|
||||
vTaskDelay(1000 / portTICK_PERIOD_MS);
|
||||
TEST_ESP_OK(esp_cam_ctlr_stop(cam_handle));
|
||||
|
||||
TEST_ASSERT_GREATER_THAN(2, new_buffer_count);
|
||||
TEST_ASSERT_GREATER_THAN(2, trans_finished_count);
|
||||
// At least 35 new buffers callback and 34 completed transfer callback are expected within 1 second when camera is 50fps.
|
||||
TEST_ASSERT_GREATER_OR_EQUAL(35, new_buffer_count);
|
||||
TEST_ASSERT_GREATER_OR_EQUAL(34, trans_finished_count);
|
||||
|
||||
TEST_ESP_OK(esp_cam_ctlr_disable(cam_handle));
|
||||
TEST_ESP_OK(esp_cam_ctlr_del(cam_handle));
|
||||
|
||||
@@ -8,7 +8,7 @@ from pytest_embedded_idf.utils import idf_parametrize
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
['cache_safe', 'release'],
|
||||
['cache_safe', 'release', 'pm_enable'],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32p4'], indirect=['target'])
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# silent the error check, as the error string are stored in rodata, causing RTL check failure
|
||||
CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT=y
|
||||
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y
|
||||
CONFIG_HAL_ASSERTION_SILENT=y
|
||||
|
||||
CONFIG_PM_ENABLE=y
|
||||
CONFIG_FREERTOS_USE_TICKLESS_IDLE=y
|
||||
CONFIG_PM_DFS_INIT_AUTO=y
|
||||
Reference in New Issue
Block a user