cancel
Showing results for 
Search instead for 
Did you mean: 

STM8S interference of interrupts

MoHos98
Associate II

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.

4 REPLIES 4
Piranha
Chief II

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!

MoHos98
Associate II

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

Have you considered ucLinux?

Where's the load that demands the current? Are we talking about a bench supply powering your MCU board?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

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?