Yes. The problem only occurs when I have included any bit of the radio code
in my main app. I also traced back the Spi0 resource to Usart0, which is
shared with I2C0. And the change I made to prevent the radio from ever
getting granted the SPI0 resource that allows the I2C process to work
properly was in /tinyos-2.x/tos/chips/cc2420/spi/CC2420SpiP.nc. 

Brad 

On Fri, 21 Jan 2011 12:12:16 +0100, PIETRO GONIZZI  wrote: I do not think
the problem it is related to the cc2420, since it uses the SPI bus and not
the I2C. Are you sure it is the radio that stops the process?

pietro

 2011/1/21 PIETRO GONIZZI 
 Hi Brad,

I'm facing a similar problem when using a TSL2550 light sensor bound on the
I2C bus.
 >From my understanding, the I2C bus is used by the UART serial link too,
thus it has to be reconfigured each time when switching
 from one to the other.
I think you have to implement the Msp430I2CConfigure interface, to
reinitialize the I2C before dealing with the light sensor.
I give you
more details as soon as I get it working.

pietro

 2011/1/20 Brad Campbell   

 I'm trying to use the I2C bus on the Epic/MSP430 and use the CC2420 radio.
 The radio seems to conflict with the I2C transactions. I'm sampling a
light
 sensor and the sensor requires about 4 I2C commands. After I send the
 second I2C.write() command, I2C.writeDone() never gets called. I'm
 requesting the Msp430I2CC.Resource before issuing any I2C commands and I
 don't release it until I am completely done interfacing with my I2C
sensor.
 I can't figure out why the radio is interrupting the process.

 Here is roughly my I2C code:
 configuration HalRohmBH17C {
 ...
 }
 implementation {
 components new Msp430I2CC();
 RohmBH17LogicP.I2CResource -> Msp430I2CC.Resource;
 }

 generic module RohmBH17LogicP () {
 ...
 }
 implementation {
 command error_t RohmBH17.measureLight () {
 call I2CResource.request();
 return SUCCESS;
 }
 event void I2CResource.granted () {
 post perform_action();
 }
 task void
perform_action () {
 ...
 if (done) call I2CResource.release();
 }
 }

 I found that if I edit /tinyos-2.x/tos/chips/cc2420/spi/CC2420SpiP.nc so
 that the "async command error_t Resource.request[ uint8_t id ]()" command
 simply returns EBUSY for all requests my I2C communication proceeds
without
 interruption. This obviously disables the radio, however.

 I've tried calling RadioControl.stop() in my main program before sampling
 the light sensor. This does not help. In fact, this problem occurs if I
 even just include IPDispatchC in with the app and and never turn the radio
 on or use it.

 Any ideas on why the radio doesn't seem to be following the resource
 arbitration?

 Thanks,
 Brad Campbell
 _______________________________________________
 Tinyos-help mailing list
 [email protected] [3]
 https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[4]

 

Links:
------
[1] mailto:[email protected]
[2] mailto:[email protected]
[3]
mailto:[email protected]
[4]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to