Reason:
I2CDR is no longer defined in the TI headers used by the 4.x toolchains. In the
3.2.3 header files there is a comment stating that I2CDR is deprecated and
I2CDRB should be used instead. However, this never propagated into tinyos files.
If I2CDR is used data will never be written to the I2C data register but to
some memory location in RAM and the I2C bus falls silent after
transmitting the slave address.
An object dump shows that I2CDR_ is located in the .bss section. __I2CDRB is
located at the correct register address 0x76.
msp430-objdump -t main.exe gives:
SYMBOL TABLE:
...
0000111a l O .bss 00000001 I2CDR_
00000076 g *ABS* 00000000 __I2CDRW
00000076 g *ABS* 00000000 __I2CDRB
...
and the corresponding app.c snippet:
#49 "/opt/tinyos2/tos/chips/msp430/usart/HplMsp430I2C0P.nc"
static volatile uint8_t HplMsp430I2C0P__U0CTL __asm ("0x0070");
static volatile uint8_t HplMsp430I2C0P__I2CTCTL __asm ("0x0071");
static volatile uint8_t HplMsp430I2C0P__I2CDR __asm ("I2CDR_"); // <- this goes
to .bss section
static volatile uint16_t HplMsp430I2C0P__I2CSA __asm ("0x011A");
static volatile uint8_t HplMsp430I2C0P__I2CIE __asm ("0x0050");
Affected files:
I2C driver in tos/msp430/usart
Thread on tinyos-devel mailing list:
https://www.millennium.berkeley.edu/pipermail/tinyos-devel/2012-October/005187.h
tml
Jonas
Original issue reported on code.google.com by jns.neba...@gmail.com on 9 Oct 2012 at 7:35
Original issue reported on code.google.com by
jns.neba...@gmail.com
on 9 Oct 2012 at 7:35