|
|
View previous topic :: View next topic |
Author |
Message |
nazoa
Joined: 09 Feb 2007 Posts: 58
|
Interrupt during read_external_memory |
Posted: Fri Mar 07, 2008 4:48 am |
|
|
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
|
|
Posted: Fri Mar 07, 2008 5:05 am |
|
|
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 |
|
|
|
|
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
|