[Tinyos Core WG] Re: [Tinyos-devel] Re: I2C and SPI sharing
Vlado Handziski
vlado.handziski at gmail.com
Fri Oct 27 12:11:20 PDT 2006
On 10/27/06, Max CORTIANA <max.cortiana at st.com> wrote:
>
> Suppose a module is using I2C and it release it at the end.
> Suppose you are totally unlucky and the radio BackOff timer fires while
> the release is in the atomic session. BackOff procedures will run at the
> end of the atomic block.
> When the atomic quits, the BackOff Timer calls the ImmediateRequest
> command.
> ouch, it gets the control even if the resource is unconfigured.
>
>
Yes, there is a race there that needs to be fixed. However, I personally
think that clients should not rely on the previous owner properly
unconfiguring the resource for proper operation. The configurations after
granted should be self contained. That is why I was opposed to the changes
Jonathan did in his last commit where the USART is reset in the unconfigure
calls, making the success of SetModeXXX depend on the previous unconfigure
call.
I guess, I am having second thoughts about the need of "unconfigure" in
general. Assuming that the resource unconfiguration to a safe, low-power
consuming state is memory-less (not depending on the way it was configured
by the current owner), such an unconfigure can be done in the configuration
step of the ResourceController. Do we have examples in the current code base
for which this is not true?
Vlado
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-2.0wg/attachments/20061027/2454363a/attachment.htm
More information about the Tinyos-2.0wg
mailing list