Hi, I want to make an application to test if the SPI is working properly,
the idea is sending some random bytes and watching them on the oscilloscope.
I want to do this because Im trying to run the BlinkToRadio App in my
platform that has msp430f5438. When i run it nothing happens and the code
gets stuck  waiting for the event AMSend.sendDone();

Is there any simple test app to test the spi already?

I tried doing:

SPIP.nc:

module SPIP @safe()
{
  uses {
    interface Boot;
    interface SpiByte;
    interface Leds;

  }
}
implementation
{
 void uwait(uint16_t u) {
    uint16_t t0 = TA0R;
    while((TA0R - t0) <= u);
  }

  event void Boot.booted()  {
    uint8_t data = 0x22;

    while (1) {
     call Leds.led0Toggle();
     call Leds.led1Off();
     call Leds.led2On();
     call SpiByte.write (data);
     uwait(1024*10);
    }

  }
}

SPIAppC.nc:

configuration SPIAppC {

} implementation {
  components SPIP;

  components MainC;
  SPIP.Boot -> MainC;

  components LedsC;
  SPIP.Leds -> LedsC.Leds;

  components new Msp430UsciSpiB0C() as SpiC;

  SPIP.SpiByte -> SpiC;

}

This dind't work because the USCI registers are not being configured and
still didn't find how to do it.

Thanks in advance for any help.

João
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to