[Tinyos-devel] Re: I2C and SPI sharing

Max CORTIANA max.cortiana at st.com
Fri Oct 13 06:20:08 PDT 2006


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)

Max

Philip Levis wrote:
> On Oct 12, 2006, at 1:41 PM, Kevin Klues wrote:
>
>> When I run this code I get a UartSend.sendDone() with error ==
>> SUCCESS.  When I set up a receiver to listen for the tranmistted
>> packet it hears it as well, meaning that it was successfully
>> transmitted.  Maybe your "non-minimial" code was doing something
>> different, but with what you've sent, I see no problems.
>
> Maybe there's a version difference here? Max, what 2.x version are you 
> using? beta1, beta2, or CVS?
>
> Phil
>



More information about the Tinyos-devel mailing list