Other Parts Discussed in Thread: MSP-EXP430G2ET, RF430FRL152HEVM, , RF430FRL152H
Hello all,
I am using TRF7970A boosterpack along with MSP-EXP430G2ET laucnhpad to read data from RF430FRL152HEVM via NFC.
The project in RF430FRL152HEVM I referred to and adjusted is the NFC project. I make some adjustment so that I can send the data received from SPI (RF430FRL152HEVM as a slave) via NFC using array NFC_NDEF_Message. I write an ISR of USCI_B0_VECTOR to achieve this, and the code is as below. The main function has nothing changed except calling a funtion that initialize the SPI bus.
#pragma vector = USCI_B0_VECTOR __interrupt void USCI_B0_ISR(void) { if(UCB0IFG &= UCRXIFG) { NFC_NDEF_Message[RxNum1] = SpiBusSlaveReceive(); RxNum1++; iscomend1 = 1; //return to the main function } }
And then TRF7970A tries to communicate with RF430FRL1152H, and the data transfered has something wrong. For example, if the data received by the SPI on the RF430FRL152H is "40FA43EC" in HEX format, which proves to work well in debug mode checking the UCB0RXBUF, then TRF7970A prints data "FAEC" to the pc using UART, missing "40" and "43". This error appears steadily, I tried to add time delay in SPI master but it wouldn't help.
I don't know what is wrong, because some data can be transmitted properly while missing some of it. If UCB0RXBUF of RF430FRL152HEVM can receive data, then the array NFC_NDEF_Message is likely writen the received spi data. Will it have something wrong?
And additionally, as for now I don't need the NFC transimits the NDEF format data detecting by phone, TRF7970A+MSP-EXP430G2ET is enough for now. So my adjustment about the array NFC_NDEF_Message is not following the rules of NDEF format. Will it cause error? Because I just want to transimit some values, not URI or something.
Thank you in advance!!
Huaxuan Cai