Hi there,
In the last days I've working with the mp430g2221 and the CC113L.
I make the configuration correctly by SPI of the CC113L but I can´t get a good way of receiving the data from the CC113L SO (spi output pin).
The API for the SPI connection between them is similar to the ModifiedCodeSLAA325A, the only difference is that I use only 3 pins for the comunication. All the code written for this kind of receivers/transceivers, use an extra pin (GDO02 or similar). But I can't use that. Is there any fancy way of receiving correctly the data? By SPI interrupt or other?
Regards
Ralph
Hi Ralph
Are you sure that you receive error free packets with good CRC?
The verification you are using for the CRC check will always succeed since (rxBuffer[rxBytes-1] | 0x80) will always be positive. So even packets with bad CRC will clear this check. This should be change from an OR operation to AND so it would look like this:
(rxBuffer[rxBytes-1] & 0x80)
Using the CRC_OK signal you have to have your interrupt on rising edge, opposed to the sync word detection that should give the interrupt on falling edge (end of packet).
When using GDO1 for interrupt handling be sure that the assosiated pin on the MSP is set up as an I/O in the function select register PxSEL. I do not know what kind of MSP you are using but note that for some MSPs the pin interrupt function are automatically disabled if the PxSEL bit is set. In this case there will be no interrupts regardless of the state of the PxIE bit. I would advise you to check the MSP user guide to see if this applies to you.
Best regards
Martin
---------------------------------------------------------------------------------------------------------Please click the Verify Answer button on this post if it answers your question.---------------------------------------------------------------------------------------------------------