GP_timer not working properly

MicroController
Posts: 1724
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: GP_timer not working properly

Postby MicroController » Fri Oct 25, 2024 8:48 pm

Not sure what your video shows.
Are you seeing pulses of 5ms+ being generated where they should be ~100us?
I think this shouldn't happen. Looks like something may be blocking interrupts for an abnormally long time, milliseconds instead of microseconds. - Or there's another bug in your pulse-generating/timer code.

Baldhead
Posts: 468
Joined: Sun Mar 31, 2019 5:16 am

Re: GP_timer not working properly

Postby Baldhead » Fri Oct 25, 2024 10:04 pm

MicroController wrote:
Fri Oct 25, 2024 8:48 pm
Not sure what your video shows.
Are you seeing pulses of 5ms+ being generated where they should be ~100us?
I think this shouldn't happen. Looks like something may be blocking interrupts for an abnormally long time, milliseconds instead of microseconds. - Or there's another bug in your pulse-generating/timer code.
In the video i am varying the trigger angle of the triac(alpha). This time starts counting after the rising edge of the sync pulse(yellow oscilloscope channel).
The pulse(blue) is gate of triac, and stay high for 100 us and go low.
The same timer generates both times, that's why the state machine inside isr.

But some high priority isr or task is delaying entry into the interrupt, i think.

I think is wifi with https server+mdns and lcd with gdma too.

Of course it could be a bug in my software too, but now i will try to use mcpwm.

Baldhead
Posts: 468
Joined: Sun Mar 31, 2019 5:16 am

Re: GP_timer not working properly

Postby Baldhead » Fri Nov 08, 2024 1:50 am

@MicroController,

Do you think that mcpwm can work ?

Can i generate "one shot" like signals with mcpwm ?

The capture module already is working.

If the mcpwm signals is not generated by hardware, i think i will need to increase the isr priority of mcpwm above 3 too.

Thank's.

Who is online

Users browsing this forum: Baidu [Spider], Bryght-Richard and 217 guests