mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 04:02:27 +00:00
feat(driver_gptimer): esp32h21 add basic gptimer support
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-H2 | ESP32-P4 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-H2 | ESP32-H21 | ESP32-P4 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | --------- | -------- | -------- | -------- |
|
||||
|
@@ -15,6 +15,8 @@ endif()
|
||||
|
||||
# In order for the cases defined by `TEST_CASE` to be linked into the final elf,
|
||||
# the component can be registered as WHOLE_ARCHIVE
|
||||
idf_component_register(SRCS ${srcs}
|
||||
PRIV_REQUIRES unity esp_driver_gptimer esp_driver_gpio
|
||||
WHOLE_ARCHIVE)
|
||||
idf_component_register(
|
||||
SRCS ${srcs}
|
||||
PRIV_REQUIRES unity esp_driver_gptimer esp_driver_gpio
|
||||
WHOLE_ARCHIVE
|
||||
)
|
||||
|
@@ -103,7 +103,7 @@ TEST_CASE("gptimer_wallclock_with_various_clock_sources", "[gptimer]")
|
||||
printf("get raw count of gptimer %d: %llu\r\n", i, value);
|
||||
// convert the raw count to us
|
||||
value = value * 1000000 / timer_resolution_hz[i];
|
||||
TEST_ASSERT_UINT_WITHIN(200, 20000, value);
|
||||
TEST_ASSERT_UINT_WITHIN(400, 20000, value); //200 more threshold for cpu on stop process
|
||||
}
|
||||
printf("restart timers\r\n");
|
||||
for (int i = 0; i < SOC_TIMER_GROUP_TOTAL_TIMERS; i++) {
|
||||
@@ -121,7 +121,7 @@ TEST_CASE("gptimer_wallclock_with_various_clock_sources", "[gptimer]")
|
||||
printf("get raw count of gptimer %d: %llu\r\n", i, value);
|
||||
// convert the raw count to us
|
||||
value = value * 1000000 / timer_resolution_hz[i];
|
||||
TEST_ASSERT_UINT_WITHIN(400, 40000, value);
|
||||
TEST_ASSERT_UINT_WITHIN(600, 40000, value); //same 200 for cpu time
|
||||
}
|
||||
printf("disable timers\r\n");
|
||||
for (int i = 0; i < SOC_TIMER_GROUP_TOTAL_TIMERS; i++) {
|
||||
|
Reference in New Issue
Block a user