Search found 5 matches

by espmajds
Sat Apr 13, 2024 7:57 am
Forum: ESP-IDF
Topic: Generate signal with timer
Replies: 8
Views: 1507

Re: Generate signal with timer

I don't understand! What's the relationship between GPTimer and Timer Group?
If a timer group includes 4 timers, then which one does GPTimer work with?
And do I need to use multiple gptimer_handle_t with different configurations to create multiple timers with GPTimer?
by espmajds
Fri Apr 12, 2024 3:35 pm
Forum: ESP-IDF
Topic: Generate signal with timer
Replies: 8
Views: 1507

Re: Generate signal with timer

I don't have any issues with LEDC. in fact, I wanted to set up an ultrasonic SR-04 module, which actually worked fine with LEDC. However, as I'm currently learning ESP-IDF and reading the GPTimer documentation, I tried to generate 100 kHz frequency for the SR-04 using GPTimer to get familiar with di...
by espmajds
Fri Apr 12, 2024 1:50 pm
Forum: ESP-IDF
Topic: Generate signal with timer
Replies: 8
Views: 1507

Re: Generate signal with timer

I directly changed the GPIO from the ISR, but it resets again.
The ESP32 has a high operating frequency, which is why it surprises me why this is happening!
What is your suggestion for generating 100 kilohertz frequency other than LEDC?
Do you have any sample code
Thanks
by espmajds
Fri Apr 12, 2024 10:42 am
Forum: ESP-IDF
Topic: Generate signal with timer
Replies: 8
Views: 1507

Re: Generate signal with timer

I tested it with LEDC and it works properly, but I want to know how to do it with GPTimer functions. I've set the timer resolution to 1MHz, so each tick equals 1 microsecond. Therefore, if I set the alarm count value to 10, an interrupt occurs every 10 microseconds, during which I can toggle a port ...
by espmajds
Fri Apr 12, 2024 8:12 am
Forum: ESP-IDF
Topic: Generate signal with timer
Replies: 8
Views: 1507

Generate signal with timer

I'm trying to generate a 100 kHz signal with ESP32 timers.
I tried to do this with the gptimer but the ESP32 keeps resetting!
Which timer can I use for this? How?