unit_tests/Update unit test timer divider
This commit updates various test cases throughout esp-idf such that the values used for timer divider pass the assertions in the timer component. Timer divider values must be between 2 to 65536
This commit is contained in:
parent
7c9b24b407
commit
b908b3cd58
|
@ -67,7 +67,7 @@ static void esp_apptrace_test_timer_init(int timer_group, int timer_idx, uint32_
|
||||||
config.alarm_en = 1;
|
config.alarm_en = 1;
|
||||||
config.auto_reload = 1;
|
config.auto_reload = 1;
|
||||||
config.counter_dir = TIMER_COUNT_UP;
|
config.counter_dir = TIMER_COUNT_UP;
|
||||||
config.divider = 1;
|
config.divider = 2; //Range is 2 to 65536
|
||||||
config.intr_type = TIMER_INTR_LEVEL;
|
config.intr_type = TIMER_INTR_LEVEL;
|
||||||
config.counter_en = TIMER_PAUSE;
|
config.counter_en = TIMER_PAUSE;
|
||||||
/*Configure timer*/
|
/*Configure timer*/
|
||||||
|
@ -403,7 +403,7 @@ static void esp_apptrace_test_ts_init(int timer_group, int timer_idx)
|
||||||
config.alarm_en = 0;
|
config.alarm_en = 0;
|
||||||
config.auto_reload = 0;
|
config.auto_reload = 0;
|
||||||
config.counter_dir = TIMER_COUNT_UP;
|
config.counter_dir = TIMER_COUNT_UP;
|
||||||
config.divider = 1;
|
config.divider = 2; //Range is 2 to 65536
|
||||||
config.counter_en = 0;
|
config.counter_en = 0;
|
||||||
/*Configure timer*/
|
/*Configure timer*/
|
||||||
timer_init(timer_group, timer_idx, &config);
|
timer_init(timer_group, timer_idx, &config);
|
||||||
|
@ -420,7 +420,7 @@ static void esp_apptrace_test_ts_cleanup()
|
||||||
config.alarm_en = 0;
|
config.alarm_en = 0;
|
||||||
config.auto_reload = 0;
|
config.auto_reload = 0;
|
||||||
config.counter_dir = TIMER_COUNT_UP;
|
config.counter_dir = TIMER_COUNT_UP;
|
||||||
config.divider = 1;
|
config.divider = 2; //Range is 2 to 65536
|
||||||
config.counter_en = 0;
|
config.counter_en = 0;
|
||||||
/*Configure timer*/
|
/*Configure timer*/
|
||||||
timer_init(s_ts_timer_group, s_ts_timer_idx, &config);
|
timer_init(s_ts_timer_group, s_ts_timer_idx, &config);
|
||||||
|
|
|
@ -69,7 +69,7 @@ TEST_CASE("Scheduler disabled can handle a pending context switch on resume", "[
|
||||||
.alarm_en = 1,
|
.alarm_en = 1,
|
||||||
.auto_reload = 1,
|
.auto_reload = 1,
|
||||||
.counter_dir = TIMER_COUNT_UP,
|
.counter_dir = TIMER_COUNT_UP,
|
||||||
.divider = 1,
|
.divider = 2, //Range is 2 to 65536
|
||||||
.intr_type = TIMER_INTR_LEVEL,
|
.intr_type = TIMER_INTR_LEVEL,
|
||||||
.counter_en = TIMER_PAUSE,
|
.counter_en = TIMER_PAUSE,
|
||||||
};
|
};
|
||||||
|
|
|
@ -140,7 +140,7 @@ static void test_resume_task_from_isr(int target_core)
|
||||||
.alarm_en = 1,
|
.alarm_en = 1,
|
||||||
.auto_reload = 0,
|
.auto_reload = 0,
|
||||||
.counter_dir = TIMER_COUNT_UP,
|
.counter_dir = TIMER_COUNT_UP,
|
||||||
.divider = 1,
|
.divider = 2, //Range is 2 to 65536
|
||||||
.intr_type = TIMER_INTR_LEVEL,
|
.intr_type = TIMER_INTR_LEVEL,
|
||||||
.counter_en = TIMER_PAUSE,
|
.counter_en = TIMER_PAUSE,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue