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:
Darian Leung 2017-10-30 19:42:16 +08:00
parent 7c9b24b407
commit b908b3cd58
3 changed files with 5 additions and 5 deletions

View file

@ -67,7 +67,7 @@ static void esp_apptrace_test_timer_init(int timer_group, int timer_idx, uint32_
config.alarm_en = 1;
config.auto_reload = 1;
config.counter_dir = TIMER_COUNT_UP;
config.divider = 1;
config.divider = 2; //Range is 2 to 65536
config.intr_type = TIMER_INTR_LEVEL;
config.counter_en = TIMER_PAUSE;
/*Configure timer*/
@ -403,7 +403,7 @@ static void esp_apptrace_test_ts_init(int timer_group, int timer_idx)
config.alarm_en = 0;
config.auto_reload = 0;
config.counter_dir = TIMER_COUNT_UP;
config.divider = 1;
config.divider = 2; //Range is 2 to 65536
config.counter_en = 0;
/*Configure timer*/
timer_init(timer_group, timer_idx, &config);
@ -420,7 +420,7 @@ static void esp_apptrace_test_ts_cleanup()
config.alarm_en = 0;
config.auto_reload = 0;
config.counter_dir = TIMER_COUNT_UP;
config.divider = 1;
config.divider = 2; //Range is 2 to 65536
config.counter_en = 0;
/*Configure timer*/
timer_init(s_ts_timer_group, s_ts_timer_idx, &config);

View file

@ -69,7 +69,7 @@ TEST_CASE("Scheduler disabled can handle a pending context switch on resume", "[
.alarm_en = 1,
.auto_reload = 1,
.counter_dir = TIMER_COUNT_UP,
.divider = 1,
.divider = 2, //Range is 2 to 65536
.intr_type = TIMER_INTR_LEVEL,
.counter_en = TIMER_PAUSE,
};

View file

@ -140,7 +140,7 @@ static void test_resume_task_from_isr(int target_core)
.alarm_en = 1,
.auto_reload = 0,
.counter_dir = TIMER_COUNT_UP,
.divider = 1,
.divider = 2, //Range is 2 to 65536
.intr_type = TIMER_INTR_LEVEL,
.counter_en = TIMER_PAUSE,
};