??? 04/19/10 21:17 Read: times |
#175136 - You just buffer things Responding to: ???'s previous message |
Most pieces of hardware take some time to complete their tasks.
You just start them off, and let them interrupt when they have finished. Since you are using a RTOS, you must be used to the idea of just asking the RTOS to do something. You should never need to sit waiting for any hardware because the OS is doing it for you. Writing to the page buffer of your EEPROM is no more than the IRQ writing the next byte to the TWI. A handful of instructions taking a few us. When you issue a STOP the EEPROM physically writes the page. This normally takes about 3-5ms. So you set a timer to go off after 5ms. Or you get on with other tasks while the EEPROM is busy. Meanwhile your RTOS is quietly looking after the rest of your hardware, normally filling or emptying buffers or setting flags. You have wasted no time. Nor has your CPU. Nor have you lost any events. You will find that DataFlash is faster in operation than the 24Cxxx. On the other hand SPI has no great advantage in using IRQs. A polled SPI takes about the same time as the code overhead of servicing an interrupt. David. |
Topic | Author | Date |
I2C page write and interrupts | 01/01/70 00:00 | |
Some Important Things to Consider | 01/01/70 00:00 | |
Re: Some Important Things to Consider | 01/01/70 00:00 | |
You just buffer things | 01/01/70 00:00 | |
ISR + superloop normally enough | 01/01/70 00:00 | |
A Quick Reply | 01/01/70 00:00 | |
Re: A Quick Reply | 01/01/70 00:00 | |
Confirmation | 01/01/70 00:00 | |
The Atmel Scheduler | 01/01/70 00:00 | |
Re: The Atmel Scheduler | 01/01/70 00:00 | |
Your times seem quite long | 01/01/70 00:00 | |
Re: Your times seem quite long | 01/01/70 00:00 | |
The problem seems to be different | 01/01/70 00:00 | |
Time to closely read data sheet. | 01/01/70 00:00 | |
Re: Time to closely read data sheet. | 01/01/70 00:00 | |
Write a generic function.![]() | 01/01/70 00:00 | |
Paged operation very common | 01/01/70 00:00 |