Hi,
I have a CC430f5137 based custom mote on which I've been able to compile
the Blink example, by setting the SURF platform as REV A (I'm using
Tinyprod). For Blink to work I had to change the LED pins, as the LEDs on
the SURF REV A board are connected to P1.0, P1.1, P1.2, P3.6 and 3.7.
I changed these to match my mote (my mote has LEDs connected to P1.7, P3.6
and P3.7) in the PlatformLedP.nc file (in tos/platforms/surf/hardware/leds)
as follows:
#elif defined(SURF_REV_A)
//{ (port_t*)P1IN_, 1 << 0 }, // Blue
//{ (port_t*)P1IN_, 1 << 1 }, // White
{ (port_t*)P1IN_, 1 << 7 }, // Red on my mote
{ (port_t*)P3IN_, 1 << 6 }, // Green on my mote
{ (port_t*)P3IN_, 1 << 7 }, // Orange on my mote
Now I'm trying to get UART working but my FTDI cable's RX and TX pins are
connected to pins P2.0 and P2.1, respectively, and not to the default P1.5
and P1.6 pins. Hence, I made the following changes to the PlatformsPinsP.nc
file (in tos/platforms/surf/hardware/pins) to reflect this difference:
//#if 0 /* Disabled:These specific setting sare defaults, but others might
not be */
#if defined(SURF_REV_A)
PMAPPWD = PMAPPW; // Get write-access to port
mapping regs
//P1MAP5 = PM_UCA0RXD; // Map UCA0RXD output to
P1.5
//P1MAP6 = PM_UCA0TXD; // Map UCA0TXD output to
P1.6
P2MAP0 = PM_UCA0RXD; // Map UCA0RXD output to P2.0
P2MAP1 = PM_UCA0TXD; // Map UCA0TXD output to P2.1
PMAPPWD = 0; // Lock port mapping
registers
#endif
These two are the only files I've changed.
Flashing the TestSerial app to my mote does not produce any output when
"java net.tinyos.tools.Listen -comm serial@/dev/ttyUSB0:115200" is run. It
hangs at "serial@/dev/ttyUSB0:115200: resynchronising" and nothing happens.
If I use Putty with TestSerial running on my mote, I can see a sequence of
bytes being periodically displayed on Putty (they are unreadable, which is
expected) so I'm assuming the serial connection is fine.
I tested the SerialTest app on a TelosB mote and "java
net.tinyos.tools.Listen -comm serial@/dev/ttyUSB0:115200" works 100%, so
I'm assuming my Java config is correct.
And I know the serial connection is working 100% OUTSIDE TinyOS as I have
tested it with a UART CC430f5137 sample
C code from TI, by using:
P2MAP1 = PM_UCA0TXD; // Map UCA0TXD output to P2.1
P2DIR |= BIT1; // Set P2.1 as TX output
P2SEL |= BIT1; // Select P2.1 UART function
Any ideas as to what is causing this issue?
Thanks!
Regards
Jorge
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help