mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 12:14:32 +02:00
Merge branch 'bugfix/systick_loop_v5.0' into 'release/v5.0'
freertos: Fix Systick stuck when systimer was not reset (v5.0) See merge request espressif/esp-idf!24323
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
@@ -160,7 +160,10 @@ void vPortSetupTimer(void)
|
|||||||
systimer_ll_apply_counter_value(systimer_hal.dev, SYSTIMER_LL_COUNTER_OS_TICK);
|
systimer_ll_apply_counter_value(systimer_hal.dev, SYSTIMER_LL_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_LL_COUNTER_OS_TICK, cpuid, false);
|
systimer_hal_counter_can_stall_by_cpu(&systimer_hal, SYSTIMER_LL_COUNTER_OS_TICK, cpuid, false);
|
||||||
|
uint32_t alarm_id = SYSTIMER_LL_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) {
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
@@ -238,7 +238,10 @@ void vPortSetupTimer(void)
|
|||||||
systimer_ll_apply_counter_value(systimer_hal.dev, SYSTIMER_LL_COUNTER_OS_TICK);
|
systimer_ll_apply_counter_value(systimer_hal.dev, SYSTIMER_LL_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_LL_COUNTER_OS_TICK, cpuid, false);
|
systimer_hal_counter_can_stall_by_cpu(&systimer_hal, SYSTIMER_LL_COUNTER_OS_TICK, cpuid, false);
|
||||||
|
uint32_t alarm_id = SYSTIMER_LL_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) {
|
||||||
|
@@ -93,7 +93,10 @@ void vPortSetupTimer(void)
|
|||||||
systimer_ll_apply_counter_value(systimer_hal.dev, SYSTIMER_LL_COUNTER_OS_TICK);
|
systimer_ll_apply_counter_value(systimer_hal.dev, SYSTIMER_LL_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_LL_COUNTER_OS_TICK, cpuid, false);
|
systimer_hal_counter_can_stall_by_cpu(&systimer_hal, SYSTIMER_LL_COUNTER_OS_TICK, cpuid, false);
|
||||||
|
uint32_t alarm_id = SYSTIMER_LL_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) {
|
||||||
|
Reference in New Issue
Block a user