2022-08-17 01:38 AM
Hi there!
I wanna use the Timer3 of STM8S105C6 to calculate the duty cycle of a 500Hz signal.
It's not possible to use any other timer due to hardware limitations.
ADC1,Timer1, and Timer2 are also used in my code and their interrupts of course.
They work at least at 10Khz.
Here is my problem, whenever I increase the current of the power supply to the hardware, from one point on, the power supply's current limiter begins to connect and disconnect itself continuously. What's wrong? The hardware works properly. I'm pretty sure about that
Do the interrupts influence on each other?
How can I prevent them from influencing on each other? Is it even possible?
Should I use RTOS method of programming?
any help would be appreciated.
2022-08-17 04:56 AM
Don't you understand that for other people the part about timer and the part about power supply are totally disconnected? Explain the connection between the two!
2022-08-17 05:07 AM
you're right!
The purpose is to run a bldc motor. Timer1 is used for switching. whenever the duty cycle of aforementioned signal, read by Timer 3, increases the duty cycle of PWM signals should be also increased to accelerate the motor. Do you get that?
when I increase the duty cycle of the signal, from on point on, that problem arises
2022-08-17 05:12 AM
Have you considered ucLinux?
Where's the load that demands the current? Are we talking about a bench supply powering your MCU board?
2022-08-17 05:25 AM
I explained it above.
Let me be more specific. I'm not talking about a discovery board.
I'm going to drive a BLDC motor so I need a DC power supply,
STM8S is used to produce PWM signals, read DC bus voltage and calculate the duty cycle of an external signal.
according to the duty cycle, speed must be changed but the problem is when I increase the duty cycle of the external signal from one point on. the power supply is kind of being interrupted.
I just asked to know if it was possible for interrupts to influence on each other?
How can I make them work separately?