??? 04/19/10 11:06 Read: times |
#175118 - I2C page write and interrupts |
Hi,
I had developed small system using a 8052 core processor, a sensor and an I2C memory. I am collecting some data from a sensor and I am logging it into an i2c memory module. The system has an cooperative multitasking miniOS with two tasks running in alternance. Additionally because I need a timebase, I am using timer 2 interrupts to update periodically a global variable which holds the total number of ticks. Initially I was writting in memory byte by byte using random access and all was working just fine. After the system got a little bit mature I had decided it to move to page write, using a memory pool/buffer which periodically is dumped into the memory. From this moment I had started to notice an odd behaviour: sometimes the data was lost and nothing or incoerrent data was saved to the i2c memory. Now what I want is to get it is a pertinent advice from a more experienced fellow. My guess is that because I am writting 256 bytes in a memory page write the chance to intersect with a timer 2 interrupt grew up significantly and this is causing this strange behaviour. What do you think? Sandu |
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 |