[Tinyos-devel] Re: I2C and SPI sharing

Philip Levis pal at cs.stanford.edu
Fri Oct 13 08:28:26 PDT 2006


On Oct 13, 2006, at 6:20 AM, Max CORTIANA wrote:

> I was using the development branch of CVS, updated on September, 1.
> Now I've update everything and I see the radio working.
> BUT
> I2C is not sending anything.
>
> On September I had a problem with I2C and Jonathan Hui suggested me  
> to modify file HplMsp430I2C0P by adding a statement in the  
> SetModeI2C function.
> So I've added the line
> I2CTCTL = 0;
>
> in function setModeI2C, so that now it looks like:
>
>      U0CTL |= ( ( config->rxdmaen << 7 ) |
>                 ( config->txdmaen << 6 ) |
>                 ( config->xa << 4 ) |
>                 ( config->listen << 3 ) );
>      I2CTCTL = 0;
>      I2CTCTL = ( ( config->i2cword << 7 ) |
>          ( config->i2crm << 6 ) |
>          ( config->i2cssel << 4 ) );
>
> This statement isn't reporter on the CVS.
>
> The demo program I've sent behaves like:
>
> 1-Radio is initialized (SPI activity)
> 2-I2C device is not accessed (NO I2C activity)
> 3-Radio send the message.
>
> When I re-add the missing line in HplMsp430I2C0P, the node behaves  
> like:
>
> 1- Radio is turned on (SPI activity)
> 2- Device is accessed (I2C activity)
> 3- Dead (NO SPI activity)


So it sounds like the code in the repository is fine, and the problem  
is with this line you added?

Phil


More information about the Tinyos-devel mailing list