CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

RTOS and timers' interrupt problem

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
HanM



Joined: 09 Sep 2021
Posts: 1

View user's profile Send private message

RTOS and timers' interrupt problem
PostPosted: Thu Sep 09, 2021 6:51 am     Reply with quote

Hi,

I'm using RTOS and timers simultaneously. There is a problem unfortunately.
One of the tasks has to read a digital sensor while two timers via proper interrupts are generating PWM pulses. The received value from the sensor is not correct when interrupts are active. On the other hand, when I disable the interrupts while reading the sensor, the generated PWM pulses are not correct. In fact, they can't work together.

Let me know if there is a solution for this problem.

Thanks
jeremiah



Joined: 20 Jul 2010
Posts: 1314

View user's profile Send private message

PostPosted: Thu Sep 09, 2021 12:01 pm     Reply with quote

Can you make a quick small program with just the RTOS, your interrupts, and read the sensor. Make sure the example compiles and fails like you expect it to. Post it here using the CODE tags.

We don't need all your code, just the code that causes a problem.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group