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

Should interrupts be disabled during master i2c activity?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
JamesW, Kent, England
Guest







Should interrupts be disabled during master i2c activity?
PostPosted: Mon Jan 18, 2010 9:22 am     Reply with quote

Hi folks,

A few years ago it was recommended on this forum that interrupts should be disabled when reading/writing for an I2C peripheral - so that the irq's couldn't pulse stretch the signals. (I am the bus master)

If you are using an hardware I2C SSP built into the processor - does this apply?

The reason is that I am trying to write an I2C recovery routine, that deals with what happens if a peripheral stops responding and locks the bus up. If I can use a timer interrupt, I can restart the processor after a certain time - if not - can anyone suggest an alternative method (as sometimes I2C write hangs)?

Thanks

James
James
bkamen



Joined: 07 Jan 2004
Posts: 1611
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Mon Jan 18, 2010 12:51 pm     Reply with quote

No, not really.

And I2C is a clocked data stream anyway, so timing is pretty flexible.

it's RS232 (software UARTs) where timing can really muck up the works.

Now, some I2C chips *might* have timeouts. So that becomes a "try it and if it breaks look deeper".

But a hardware I2C makes interrupts even more irrelevant.

-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
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