Hello!
I migrated from 4.4 to 5.0.1
I'm trying run example for gptimer and getting message:
D (332) gptimer: new group (0) @0x3ffb6c64
D (336) gptimer: new gptimer (0,0) at 0x3ffb6bb8, resolution=1000000Hz
I (343) system: Enable timer
I (346) system: Start timer, stop it at alarm event
I (1352) system: Timer stopped, count=1000002
I (1352) system: Set count value
I (1352) system: Get count value
I (1354) system: Timer count value=lu
I (1358) system: Disable timer
I (1362) system: Enable timer
I (1365) system: Start timer, auto-reload at alarm event
Guru Meditation Error: Core 0 panic'ed (Interrupt wdt timeout on CPU0).
Setting breakpoint at 0x00000000 and returning...
If I turn off autoreload, then example is work correct.
What can I do?
Best regards
Alex
Using new timer of GPTimer
-
- Posts: 9746
- Joined: Thu Nov 26, 2015 4:08 am
Re: Using new timer of GPTimer
Hard to say without the code, but you're likely trying to do something in an ISR that you shouldn't do in an ISR. (Specifically, you can't call functions that block in any way, shape or form, which includes most of the more complex ESP-IDF API calls.)
-
- Posts: 3
- Joined: Tue Mar 21, 2023 2:07 pm
Re: Using new timer of GPTimer
No, I found problem.
I'm using c++ and if I rename main.cpp to main.c than all work.
I'm using c++ and if I rename main.cpp to main.c than all work.
-
- Posts: 3
- Joined: Tue Mar 21, 2023 2:07 pm
Re: Using new timer of GPTimer
I'm sorry, I'm stupid man.
gptimer_alarm_config_t struct in c++ initialize like - it's correct code, and I mix 1000000 and 0.
Thanks
gptimer_alarm_config_t struct in c++ initialize like
Code: Select all
gptimer_alarm_config_t alarm_config2 = {
1000000, // period = 1s
0,
true,
};
Thanks
Who is online
Users browsing this forum: Baidu [Spider], Bing [Bot] and 67 guests