forked from espressif/esp-idf
change(pcnt): reenable the target test for esp32p4
by changing the GPIO assignment
This commit is contained in:
@@ -43,10 +43,6 @@ components/driver/test_apps/legacy_mcpwm_driver:
|
|||||||
components/driver/test_apps/legacy_pcnt_driver:
|
components/driver/test_apps/legacy_pcnt_driver:
|
||||||
disable:
|
disable:
|
||||||
- if: SOC_PCNT_SUPPORTED != 1
|
- if: SOC_PCNT_SUPPORTED != 1
|
||||||
disable_test:
|
|
||||||
- if: IDF_TARGET == "esp32p4"
|
|
||||||
temporary: true
|
|
||||||
reason: test not pass, should be re-enable # TODO: IDF-8965
|
|
||||||
depends_filepatterns:
|
depends_filepatterns:
|
||||||
- components/driver/deprecated/**/*pcnt*
|
- components/driver/deprecated/**/*pcnt*
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
@@ -8,6 +8,7 @@
|
|||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
#include "freertos/task.h"
|
#include "freertos/task.h"
|
||||||
#include "freertos/queue.h"
|
#include "freertos/queue.h"
|
||||||
|
#include "sdkconfig.h"
|
||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
#include "driver/gpio.h"
|
#include "driver/gpio.h"
|
||||||
#include "driver/pcnt.h"
|
#include "driver/pcnt.h"
|
||||||
@@ -23,10 +24,18 @@
|
|||||||
#include "unity.h"
|
#include "unity.h"
|
||||||
#include "esp_rom_gpio.h"
|
#include "esp_rom_gpio.h"
|
||||||
|
|
||||||
|
#if CONFIG_IDF_TARGET_ESP32P4
|
||||||
|
#define PULSE_IO 20
|
||||||
|
#define PCNT_INPUT_IO 21
|
||||||
|
#define PCNT_CTRL_VCC_IO 1
|
||||||
|
#define PCNT_CTRL_GND_IO 0
|
||||||
|
#else
|
||||||
#define PULSE_IO 12
|
#define PULSE_IO 12
|
||||||
#define PCNT_INPUT_IO 4
|
#define PCNT_INPUT_IO 4
|
||||||
#define PCNT_CTRL_VCC_IO 5
|
#define PCNT_CTRL_VCC_IO 5
|
||||||
#define PCNT_CTRL_GND_IO 2
|
#define PCNT_CTRL_GND_IO 2
|
||||||
|
#endif
|
||||||
|
|
||||||
#define HIGHEST_LIMIT 10
|
#define HIGHEST_LIMIT 10
|
||||||
#define LOWEST_LIMIT 0
|
#define LOWEST_LIMIT 0
|
||||||
#define MAX_THRESHOLD 5
|
#define MAX_THRESHOLD 5
|
||||||
|
@@ -10,6 +10,7 @@ from pytest_embedded import Dut
|
|||||||
@pytest.mark.esp32s3
|
@pytest.mark.esp32s3
|
||||||
@pytest.mark.esp32c6
|
@pytest.mark.esp32c6
|
||||||
@pytest.mark.esp32h2
|
@pytest.mark.esp32h2
|
||||||
|
@pytest.mark.esp32p4
|
||||||
@pytest.mark.generic
|
@pytest.mark.generic
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
'config',
|
'config',
|
||||||
|
@@ -3,9 +3,5 @@
|
|||||||
components/esp_driver_pcnt/test_apps/pulse_cnt:
|
components/esp_driver_pcnt/test_apps/pulse_cnt:
|
||||||
disable:
|
disable:
|
||||||
- if: SOC_PCNT_SUPPORTED != 1
|
- if: SOC_PCNT_SUPPORTED != 1
|
||||||
disable_test:
|
|
||||||
- if: IDF_TARGET == "esp32p4"
|
|
||||||
temporary: true
|
|
||||||
reason: test not pass, should be re-enable # TODO: IDF-8965
|
|
||||||
depends_components:
|
depends_components:
|
||||||
- esp_driver_pcnt
|
- esp_driver_pcnt
|
||||||
|
@@ -1,17 +1,25 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "sdkconfig.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if CONFIG_IDF_TARGET_ESP32P4
|
||||||
|
#define TEST_PCNT_GPIO_A 20
|
||||||
|
#define TEST_PCNT_GPIO_B 21
|
||||||
|
#define TEST_PCNT_GPIO_Z 22
|
||||||
|
#else
|
||||||
#define TEST_PCNT_GPIO_A 0
|
#define TEST_PCNT_GPIO_A 0
|
||||||
#define TEST_PCNT_GPIO_B 2
|
#define TEST_PCNT_GPIO_B 2
|
||||||
#define TEST_PCNT_GPIO_Z 4
|
#define TEST_PCNT_GPIO_Z 4
|
||||||
|
#endif
|
||||||
|
|
||||||
#if CONFIG_PCNT_ISR_IRAM_SAFE
|
#if CONFIG_PCNT_ISR_IRAM_SAFE
|
||||||
#define TEST_PCNT_CALLBACK_ATTR IRAM_ATTR
|
#define TEST_PCNT_CALLBACK_ATTR IRAM_ATTR
|
||||||
|
@@ -10,6 +10,7 @@ from pytest_embedded import Dut
|
|||||||
@pytest.mark.esp32s3
|
@pytest.mark.esp32s3
|
||||||
@pytest.mark.esp32c6
|
@pytest.mark.esp32c6
|
||||||
@pytest.mark.esp32h2
|
@pytest.mark.esp32h2
|
||||||
|
@pytest.mark.esp32p4
|
||||||
@pytest.mark.generic
|
@pytest.mark.generic
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
'config',
|
'config',
|
||||||
|
Reference in New Issue
Block a user