I made this reply once, but it did not appear on the bulletinboard, so
something must have screwed-up.
I figured I needed to kick-start the writes. It woulf be elegant to
have the ISR do thw WHOLE thing internally without the something
external to the ISR making the first write.
I guess it is really not posible to call the ISR because it would
become the foreground task, and I would end up not getting control
back until the end of the writes. (not even considering rentrancy).
So, I think my strategy will be to create a buffer for the data in
RAM, then call a subroutine with the address of the data and the
sizeof the data. Then have that subroutine determine the location of
the EEPROM write, store those locations and length in a global
variable, then initiate the first write, and then return to the
calling program. The ISR will handle the rest of the transfer.
The first subroutine will set a flag/semaphore to indicate that the
EEPROM is busy, and then the ISR will reset the flag/semaphore when
done.
I will try it out.
-Tony
--- In AVR-Chat@yahoogroups.com, Dave VanHorn <dvanhorn@d...> wrote:
>
> >
> >I guess there needs to be a eeprom_busy flag so nothing else tries
to
Show quoted textHide quoted text
> >use the eeprom while the ISR is busy.
>
> There is an EEPROM ready ISR, so you could just do it from there.
> If the EE is ready, then you can start another write.
> You have to "kick start it" by doing the first write outside the int
> though, or you could do a dummy read.