mirror of
https://github.com/espressif/esp-idf.git
synced 2024-09-20 20:56:01 -04:00
freertos: Fix Systick stuck when systimer was not reset
Relates to OTA update for C3/S3 chips from IDF version 4.3 to v5.0 and above
This commit is contained in:
parent
c570f67461
commit
bb6d154f11
@ -153,7 +153,10 @@ void vPortSetupTimer(void)
|
|||||||
systimer_ll_apply_counter_value(systimer_hal.dev, SYSTIMER_COUNTER_OS_TICK);
|
systimer_ll_apply_counter_value(systimer_hal.dev, SYSTIMER_COUNTER_OS_TICK);
|
||||||
|
|
||||||
for (cpuid = 0; cpuid < SOC_CPU_CORES_NUM; cpuid++) {
|
for (cpuid = 0; cpuid < SOC_CPU_CORES_NUM; cpuid++) {
|
||||||
|
// Set stall option and alarm mode to default state. Below they will be set to a required state.
|
||||||
systimer_hal_counter_can_stall_by_cpu(&systimer_hal, SYSTIMER_COUNTER_OS_TICK, cpuid, false);
|
systimer_hal_counter_can_stall_by_cpu(&systimer_hal, SYSTIMER_COUNTER_OS_TICK, cpuid, false);
|
||||||
|
uint32_t alarm_id = SYSTIMER_ALARM_OS_TICK_CORE0 + cpuid;
|
||||||
|
systimer_hal_select_alarm_mode(&systimer_hal, alarm_id, SYSTIMER_ALARM_MODE_ONESHOT);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (cpuid = 0; cpuid < portNUM_PROCESSORS; ++cpuid) {
|
for (cpuid = 0; cpuid < portNUM_PROCESSORS; ++cpuid) {
|
||||||
|
@ -243,7 +243,10 @@ void vPortSetupTimer(void)
|
|||||||
systimer_ll_apply_counter_value(systimer_hal.dev, SYSTIMER_COUNTER_OS_TICK);
|
systimer_ll_apply_counter_value(systimer_hal.dev, SYSTIMER_COUNTER_OS_TICK);
|
||||||
|
|
||||||
for (cpuid = 0; cpuid < SOC_CPU_CORES_NUM; cpuid++) {
|
for (cpuid = 0; cpuid < SOC_CPU_CORES_NUM; cpuid++) {
|
||||||
|
// Set stall option and alarm mode to default state. Below they will be set to a required state.
|
||||||
systimer_hal_counter_can_stall_by_cpu(&systimer_hal, SYSTIMER_COUNTER_OS_TICK, cpuid, false);
|
systimer_hal_counter_can_stall_by_cpu(&systimer_hal, SYSTIMER_COUNTER_OS_TICK, cpuid, false);
|
||||||
|
uint32_t alarm_id = SYSTIMER_ALARM_OS_TICK_CORE0 + cpuid;
|
||||||
|
systimer_hal_select_alarm_mode(&systimer_hal, alarm_id, SYSTIMER_ALARM_MODE_ONESHOT);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (cpuid = 0; cpuid < portNUM_PROCESSORS; ++cpuid) {
|
for (cpuid = 0; cpuid < portNUM_PROCESSORS; ++cpuid) {
|
||||||
|
@ -92,7 +92,10 @@ void vPortSetupTimer(void)
|
|||||||
systimer_ll_apply_counter_value(systimer_hal.dev, SYSTIMER_COUNTER_OS_TICK);
|
systimer_ll_apply_counter_value(systimer_hal.dev, SYSTIMER_COUNTER_OS_TICK);
|
||||||
|
|
||||||
for (cpuid = 0; cpuid < SOC_CPU_CORES_NUM; cpuid++) {
|
for (cpuid = 0; cpuid < SOC_CPU_CORES_NUM; cpuid++) {
|
||||||
|
// Set stall option and alarm mode to default state. Below they will be set to a required state.
|
||||||
systimer_hal_counter_can_stall_by_cpu(&systimer_hal, SYSTIMER_COUNTER_OS_TICK, cpuid, false);
|
systimer_hal_counter_can_stall_by_cpu(&systimer_hal, SYSTIMER_COUNTER_OS_TICK, cpuid, false);
|
||||||
|
uint32_t alarm_id = SYSTIMER_ALARM_OS_TICK_CORE0 + cpuid;
|
||||||
|
systimer_hal_select_alarm_mode(&systimer_hal, alarm_id, SYSTIMER_ALARM_MODE_ONESHOT);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (cpuid = 0; cpuid < portNUM_PROCESSORS; ++cpuid) {
|
for (cpuid = 0; cpuid < portNUM_PROCESSORS; ++cpuid) {
|
||||||
|
Loading…
Reference in New Issue
Block a user