mirror of
https://github.com/espressif/esp-idf.git
synced 2026-09-22 13:01:16 +03:00
fix(riscv): use CSR 0xC10 for privilege mode on ESP32-H21
Reading 0x810 raises an illegal-instruction exception on this chip, which made the CPU test app panic.
This commit is contained in:
@@ -25,6 +25,7 @@ def _run_non_recoverable_case(dut: IdfDut, test_name: str, expected_reason: str)
|
||||
'config,target',
|
||||
[
|
||||
('default', 'supported_targets'),
|
||||
('default', 'esp32h21'),
|
||||
],
|
||||
indirect=['config', 'target'],
|
||||
)
|
||||
@@ -37,6 +38,7 @@ def test_cpu(dut: IdfDut) -> None:
|
||||
'config,target',
|
||||
[
|
||||
('default', 'supported_targets'),
|
||||
('default', 'esp32h21'),
|
||||
],
|
||||
indirect=['config', 'target'],
|
||||
)
|
||||
@@ -49,6 +51,7 @@ def test_cpu_reset(dut: IdfDut) -> None:
|
||||
'config,target',
|
||||
[
|
||||
('default', 'supported_targets'),
|
||||
('default', 'esp32h21'),
|
||||
],
|
||||
indirect=['config', 'target'],
|
||||
)
|
||||
|
||||
@@ -203,7 +203,7 @@ extern "C" {
|
||||
#define STPC2 0xBF2
|
||||
|
||||
/* Espressif's custom CSR for the current privilege mode */
|
||||
#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2
|
||||
#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32H21
|
||||
#define CSR_PRV_MODE 0xC10
|
||||
#else
|
||||
#define CSR_PRV_MODE 0x810
|
||||
|
||||
Reference in New Issue
Block a user