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

Interrupt during read_external_memory

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



Joined: 09 Feb 2007
Posts: 58

View user's profile Send private message

Interrupt during read_external_memory
PostPosted: Fri Mar 07, 2008 4:48 am     Reply with quote

Hello,

I would like to include a 'write_external_memory' command in my ISR. The data that is saved in RAM during the ISR is then read out by the main program some time later using 'read_external_memory' commands.

My worry is that it is possible for ISR to interrupt the main program's 'read_external_memory' operations to perform 'write_external_memory'. I cannot disable interrupts during the read operations because of the response requirements of the ISR.

Can anyone comment on this issue? Essentially, is it safe for the ISR to interrupt external memory reads to perform external memory writes?

Thanks.
Ttelmah
Guest







PostPosted: Fri Mar 07, 2008 5:05 am     Reply with quote

How is your 'external memory' implemented?. Is this flash, RAM, etc.. This makes a huge difference to the timings involved. If this is RAM mapped on the external memory bus, there should be nothing 'wrong' with disabling interrupts during the read transfer (times involved should be single processor cycles for a byte....). Keep the block sizes used small, and momentarily re-enable interrupts between the blocks.
Generally, there shouldn't be a problem. Interrupts are only serviced on the first cycle of the instruction clock. Assuming the memory hardware correctly implements wait states as required for it's read/write operations, these will prevent any interrupt, till the memory cycle has completed.

Best Wishes
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