Other Parts Discussed in Thread: SIMPLELINK-CC13X2-26X2-SDK, Z-STACK, CC1352P
Hi there,
I got two questions when the CC2520 chip with TIVA TM4C1294 development board.
1. When I set up the SRXON, the status I read from the register looks normal, which is 0b'11000001 (Crystal, RSSI, RX Active are enabled). However, when I set the device as transmitter, it always gives me error flag when setting STXON.
Strobe_SPI_CMD_8(CC2520_INS_STXONCCA);
Strobe_SPI_CMD_8(CC2520_INS_STXON); //set the STXON active
The register status goes to 0b'10010000 (Exception B enabled, but TX is still 0).
2. Because I got the flag on Excetpion B, I wanted to check the status of EXCFLAGn.
rcv = mySPI.transfer(MEMRD_ADDRESS); //0b'00010000 MEMRD instruction + first 4 bits of EXCFLAGn
rcv_1 = mySPI.transfer(LO_UINT16(addr)); //last 8 bits of EXCFLAGn
rcv_2 = mySPI.transfer(0x00); //dummy data to get the data bits for the status of EXCFLAGn
rcv_3 = mySPI.transfer(0x00); //dummy data to get the data bits for the status of EXCFLAGn
rcv_4 = mySPI.transfer(0x00); //dummy data to get the data bits for the status of EXCFLAGn
rcv_5= mySPI.transfer(0x00); //dummy data to get the data bits for the status of EXCFLAGn
According to the datasheet, I can get the 2 bytes of status , and then followed up 1 byte of data, which is the status of EXCFLAGn. However, this is what I got "193/193/193/12/8/0" (decimal). I got 3 times of status byte and then some weird numbers following them when I send extra strobes. For examlple, when I try to read register EXCFLAG0, it is supposed to have 2 status byte and then one byte of data. Why I keep getting different numbers when I send dummy number through SPI.