mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
fix(freertos): workaround a hardware bug related to HWLP coprocessor
This commit manually sets the HWLP context to dirty when a Task that needs it is scheduled it.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2017-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2017-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -174,6 +174,16 @@ _panic_handler:
|
||||
la ra, _return_from_exception
|
||||
/* EXT_ILL CSR should contain the reason for the Illegal Instruction */
|
||||
csrrw a0, EXT_ILL_CSR, zero
|
||||
#if SOC_CPU_HAS_HWLOOP
|
||||
/* Check if the HWLP bit is set. */
|
||||
andi a1, a0, EXT_ILL_RSN_HWLP
|
||||
beqz a1, hwlp_not_used
|
||||
/* HWLP used in an ISR, abort */
|
||||
mv a0, sp
|
||||
j vPortCoprocUsedInISR
|
||||
hwlp_not_used:
|
||||
#endif /* SOC_CPU_HAS_HWLOOP */
|
||||
|
||||
/* Hardware loop cannot be treated lazily, so we should never end here if a HWLP instruction is used */
|
||||
#if SOC_CPU_HAS_PIE
|
||||
/* Check if the PIE bit is set. */
|
||||
|
||||
Reference in New Issue
Block a user