Good afternoon,
I am using an Esp32S3 Wroom 1U device in order to create a program.
In my application, I want to create a timer using the General Purpose Timer API.
Using the following lines :
uint64_t RawCount = 0;
gptimer_handle_t gptimer = NULL;
gptimer_config_t timer_config = {
.clk_src = GPTIMER_CLK_SRC_DEFAULT,
.direction = GPTIMER_COUNT_UP,
.resolution_hz = 1 * 1000 * 1000, // 1MHz, 1 tick = 1us
};
gptimer_new_timer(&timer_config, &gptimer);
gptimer_enable(gptimer);
gptimer_start(gptimer);
I managed to create the timer and using the following line :
gptimer_get_raw_count(gptimer, &RawCount);
I managed to read the current counter in us.
My problem is that I would like to read the counter value from the RISC-V ULP program.
Could you please tell me if I have access to the API from the RISC-V ULP Copro ?
Can I use the method : gptimer_get_raw_count(gptimer, &RawCount); from the ULP ?
If the answer is no, how can I read the counter value from the registers manually ?
This question because I don't know if the API has started the T0 or T1 from Group 0 or Group 1...
Thank you for your help,
best regards,
Esp32S3 : Use of General Purpose Timer
-
- Posts: 1698
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: Esp32S3 : Use of General Purpose Timer
No.ThomasESP32 wrote: ↑Mon Sep 23, 2024 1:33 pmMy problem is that I would like to read the counter value from the RISC-V ULP program.
Could you please tell me if I have access to the API from the RISC-V ULP Copro ?
Can I use the method : gptimer_get_raw_count(gptimer, &RawCount); from the ULP ?
You can't.If the answer is no, how can I read the counter value from the registers manually ?
S3 TRM:
The ULP cannot access any registers or peripherals which are not (accessed via) RTC registers.ULP coprocessor can access the modules in RTC domain via RTC registers.
Who is online
Users browsing this forum: Bing [Bot] and 214 guests