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 CCS Technical Support

Should i disable interrupts for these code

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



Joined: 15 Dec 2006
Posts: 109

View user's profile Send private message

Should i disable interrupts for these code
PostPosted: Fri Mar 27, 2015 1:59 am     Reply with quote

Hi,

I want to know if i should disable interrupts for the following coding type:

Timer1 Interrupt is on.

1)
calculation of 16 or 32 bit number
followed by writing to eeprom
The 16 or 32 bit number is not changed in the Timer Interrupt procedure.

2)
x1, X2 : 16 or 32 bit number
Testing for 2 numbers ie if x1 > x2
Once again these numbers are not changed in the Timer Interrupt procedure

Thanks,
Jai.
Ttelmah



Joined: 11 Mar 2010
Posts: 19553

View user's profile Send private message

PostPosted: Fri Mar 27, 2015 2:14 am     Reply with quote

No.

If it's needed at any point the compiler will do it for you.
The interrupts _will_ be disabled, but only for the very core part of the write, not the whole routine.
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