I think I found the reason of my problem:
In ulp_riscv_vectors.S, saving of registers are implemented as:
.equ SAVE_REGS, 17
.equ CONTEXT_SIZE, (SAVE_REGS * 4)
/* Macro which first allocates space on the stack to save general
* purpose registers, and then save them. GP register is excluded ...
Search found 23 matches
- Mon Nov 25, 2024 1:25 am
- Forum: ESP-IDF
- Topic: RISC-V ULP interrupt context saving
- Replies: 6
- Views: 2547
- Wed Nov 20, 2024 12:38 am
- Forum: ESP-IDF
- Topic: RISC-V ULP interrupt context saving
- Replies: 6
- Views: 2547
Re: RISC-V ULP interrupt context saving
This is exactly where the problem is: A function can use s0-s11 for local variables, but when interrupt happens, sx registers are not preserved so when returning from ISR, variable values may change.
- Tue Nov 19, 2024 1:58 pm
- Forum: ESP-IDF
- Topic: RISC-V ULP interrupt context saving
- Replies: 6
- Views: 2547
RISC-V ULP interrupt context saving
In ESP32-S3 RISC-V ULP interrupt code (ulp/ulp_riscv/ulp_core/ulp_riscv_vector.S), there is a note saying:
Note: We don't save the callee-saved s0-s11 registers to save space
This causes some issues that the riscv32-esp-elf-gcc generated code do used s registers for function local variables. If ...
Note: We don't save the callee-saved s0-s11 registers to save space
This causes some issues that the riscv32-esp-elf-gcc generated code do used s registers for function local variables. If ...
- Mon Nov 11, 2024 10:57 pm
- Forum: Hardware
- Topic: ESP32-S3 RTC IO input current
- Replies: 2
- Views: 1391
Re: ESP32-S3 RTC IO input current
Thanks you're right. I need to manually set my DMM input impedance to 10Gohm to get correct result.
- Mon Nov 11, 2024 3:38 pm
- Forum: Hardware
- Topic: ESP32-S3 RTC IO input current
- Replies: 2
- Views: 1391
ESP32-S3 RTC IO input current
In a low power design I'm putting esp32-s3 in deep sleep and use ext1 io to wake up.
Since the wakeup source is a rotary encoder without dent I can't assume it will stop at open position, so I'd prefer a large pull-up resistor to save power if the wiper stops at close position.
The ESP32-S3 ...
Since the wakeup source is a rotary encoder without dent I can't assume it will stop at open position, so I'd prefer a large pull-up resistor to save power if the wiper stops at close position.
The ESP32-S3 ...
- Wed Nov 06, 2024 11:11 pm
- Forum: Hardware
- Topic: ESP32-S3 RISC-V ULP termination
- Replies: 2
- Views: 1417
Re: ESP32-S3 RISC-V ULP termination
Got it! Thank you.
- Wed Nov 06, 2024 4:02 pm
- Forum: Hardware
- Topic: ESP32-S3 RISC-V ULP termination
- Replies: 2
- Views: 1417
ESP32-S3 RISC-V ULP termination
Hi,
New to ULP program, currently some doubt not so clear:
I'm implementing the ulp firmware as a state machine. For each state, it will decide how long the ULP CPU will sleep and execute the next state, some skeleton code as this:
int main(void) {
switch (s_state) {
case ULP_STATE_INIT ...
New to ULP program, currently some doubt not so clear:
I'm implementing the ulp firmware as a state machine. For each state, it will decide how long the ULP CPU will sleep and execute the next state, some skeleton code as this:
int main(void) {
switch (s_state) {
case ULP_STATE_INIT ...
- Sat Apr 27, 2024 9:11 am
- Forum: ESP-IDF
- Topic: Investigating program panic from xt_highint4
- Replies: 3
- Views: 2300
Re: Investigating program panic from xt_highint4
No, definitely not using any critical section, I also had interrupt watchdog disabled. The intriguing part is that increase instruction cache or introduce some irrelevant (logging) code within the function call will fix the issue. Is there any other reason level 4 interrupt can trigger other than ...
- Thu Apr 25, 2024 2:42 am
- Forum: ESP-IDF
- Topic: Investigating program panic from xt_highint4
- Replies: 3
- Views: 2300
Investigating program panic from xt_highint4
Hi,
I have a program that runs into a weird situation:
Main component:
ESP32-S3 16MB / No PSRAM, esp-idf 5.1.2, using built-in unity test framework and protobuf-c
Description:
I have 2 test cases covering a protobuf unpack and a protobuf pack. Both test cases run fine individually. But if I run ...
I have a program that runs into a weird situation:
Main component:
ESP32-S3 16MB / No PSRAM, esp-idf 5.1.2, using built-in unity test framework and protobuf-c
Description:
I have 2 test cases covering a protobuf unpack and a protobuf pack. Both test cases run fine individually. But if I run ...
- Wed Oct 18, 2017 4:54 am
- Forum: Hardware
- Topic: Can we run the ESP32 on 2x AA batteries
- Replies: 5
- Views: 35732
Re: Can we run the ESP32 on 2x AA batteries
I think this way too. Seems the datasheet needs updateGd25 3v flash only rated down to 2.7v? So yes it seems 2.3v is not relevant spec.