Closed andylinpersonal closed 9 months ago
Hi @andylinpersonal Thanks for sharing the extensive investigation on this. We'll take a look and get back to you.
Hi @andylinpersonal, Thank you for post. I am also Interested in this, and noticed lack of documentation in The TRM as The interrupt controller in ULP-RISC-V is implemented using a customized instruction set instead of the standard RISC-V Privileged ISA specification.
Hi @sudeep-mohanty,
Is there any update about how to bring up ULP-RISC-V's own interrupt controller correctly?
If I want to monitor the RTC GPIO pins in the ULP-RISC-V without the intervention of the main CPUs, can I use the interrupt mechanism partially mentioned in the TRM? Or I can only poll the pins manually?
Best regards, thanks
Hi @andylinpersonal, Apologies for the delayed response. We are yet to work on the ULP RISC-V interrupt controller owing to some other engagements but we do plan to work on it asap. Apologies again for the delay.
Regarding your question about monitoring GPIO pins - At the moment, to monitor the GPIO level, you will have to poll the state. However, if your use case is to wakeup the ULP core with a GPIO trigger (as opposed to periodic wakeup using ULP timer) then we do have an example demonstrating this.
a6461eab775d84e85962d14eaa11f8dfea944f9d 70241d13a29f4530d39383cc412f170e079b5f6d b9ecc1e57ab5b2ad1bdaacdb0c600f05b694853f 94e2516f6cf5ab73f6b0efa20720957c3e2e1974 82f2294bcbb2b67b8a2a79d8ab2af222e9cd0eff
Basic interrupt handling and RTC GPIO interrupt have been merged recently so closing now.
Answers checklist.
General issue report
How can I handle the IRQs inside the ULP-RISC-V without waking up the main processor?
Environment
Description
Hello, according to the ESP32-S3 TRM 2.6.3 ULP-RISC-V Interrupts, the ULP-RISC-V should be capable of implementing user-defined ISRs and handling IRQs on their own.
But here we need some more clarification and documentation related to interrupt handling due to its non-standard nature. (Not conforming to RISC-V privileged ISA)
Where should we put the ISRs inside the ULP-RISC-V’s memory space?
Structure of reset vector and interrupt vector table. Information from the current start.S is insufficient.
More detailed description and examples of how the internal/external IRQs should be handled, and the usage of mentioned custom instructions.
mret
toretirq
.Document implemented CSRs. Tested CSRs: cycle[h].
(Suggestion) Add the custom instructions (section 2.6.3.3) into
riscv32-esp-elf
.The following code is my preliminary testing:
Testing Code
Modified
${IDF_PATH}/components/ulp/cmake/CMakeLists.txt
./CMakeLists.txt
./main/CMakeLists.txt
./main/Kconfig
./main/ulp/start.S
./main/ulp/main.c
./main/ulp_isr_loader.c
Logging Messages
Following are log from the each channels
From the ULP-RISC-V
From the main processor