Original author: jns.neba...@gmail.com (October 09, 2012 07:35:13)
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_
Original author: jns.neba...@gmail.com (October 09, 2012 07:35:13)
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 HplMsp430I2C0PU0CTL asm ("0x0070"); static volatile uint8_t HplMsp430I2C0PI2CTCTL asm ("0x0071");
static volatile uint8t HplMsp430I2C0PI2CDR asm ("I2CDR"); // <- this goes to .bss section
static volatile uint16_t HplMsp430I2C0PI2CSA asm ("0x011A"); static volatile uint8_t HplMsp430I2C0PI2CIE 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.html
Jonas
Original issue: http://code.google.com/p/tinyos-main/issues/detail?id=147