ULP-Timer
ULP-Timer
Hello everyone, i'm just beginner for esp32 programming. Firstly, i learned Write/Read function in ULP coprocessor, and now i would like to set a timer. but i could not find any example for it. is there anyone help me for this issue ? Thanks in advance.
Re: ULP-Timer
Hi numan9803,
Sorry I can't figure out how to respond on your PM regarding the question you asked. I'm not sure which question you are asking so here is my attempt to answer:
1. If your question is in regards to how to wirte and use the ULP coprocessor, you need to enable it in the menuconfig (idf.py menuconfig) under Component Config->ESP-specific->Enable Ultra Low Power (ULP) Corprocessor.
My advice is to use one of the ulp examples provided in the esp-idf/examples/system folder as your starting point and replace the files with your code.
2. If your question is regarding writing a timer, I am actually having some issues with a timer as well, if you look at my previous post:
viewtopic.php?p=78172#p78172
and remove the printf statment from the IRAM_ATTR ulp_isr_handler(void *args) function it should work. I would advise adding some small delay of a few microseconds to prevent the ISR from terminating too soon and retriggering on the same write command.
3. Regarding how to implement a timer: you can use the stage counter (https://docs.espressif.com/projects/esp ... t-register) to count up a certain number of Wait commands then use JUMPS (https://docs.espressif.com/projects/esp ... tage-count) to jump to your WAKE command (https://docs.espressif.com/projects/esp ... p-the-chip) to notify the main core. However, I am still experience some issues about inconsistent maincore wakeup.
Sorry I can't figure out how to respond on your PM regarding the question you asked. I'm not sure which question you are asking so here is my attempt to answer:
1. If your question is in regards to how to wirte and use the ULP coprocessor, you need to enable it in the menuconfig (idf.py menuconfig) under Component Config->ESP-specific->Enable Ultra Low Power (ULP) Corprocessor.
My advice is to use one of the ulp examples provided in the esp-idf/examples/system folder as your starting point and replace the files with your code.
2. If your question is regarding writing a timer, I am actually having some issues with a timer as well, if you look at my previous post:
viewtopic.php?p=78172#p78172
and remove the printf statment from the IRAM_ATTR ulp_isr_handler(void *args) function it should work. I would advise adding some small delay of a few microseconds to prevent the ISR from terminating too soon and retriggering on the same write command.
3. Regarding how to implement a timer: you can use the stage counter (https://docs.espressif.com/projects/esp ... t-register) to count up a certain number of Wait commands then use JUMPS (https://docs.espressif.com/projects/esp ... tage-count) to jump to your WAKE command (https://docs.espressif.com/projects/esp ... p-the-chip) to notify the main core. However, I am still experience some issues about inconsistent maincore wakeup.
Who is online
Users browsing this forum: No registered users and 122 guests