I am attempting to create a wireless receiver for my project, so that my MCU will be able to act according to what the user wishes for it to do. After significant research, I came up with that the CC110L would be an ideal choice for my project to work. However, what I did not know was that most, if not all, of the examples and details of using the CC110L relate solely to the booster pack attachment for launchpads.
I have purchased a set of the launchpads for use, and have been looking through the examples and files that came with the CD. However, I still feel like I am at a loss when it comes to making the project actually work properly.
I searched further on the internet, and found a rather interesting tutorial that I hoped would help me to create a program for my project. The tutorial in question can be found here and is quite interesting when you read through it. I am running the devices in SPI mode, however the tutorial also discusses using UART mode and I am not sure why it does this as it appears to only be using SPI. However, my code would get stuck when trying to transmit from one device to the other (shown below)
// Transmitter void TXPacket(char *Buffer, char size){ P2IE &= ~(BIT4); // disable interrupt SPIBurstW(CC110L_TXFIFO, Buffer, size); // Write TX data StrobeSPI(CC110L_STX); // change state to TX, data transfer
// SOURCE OF ERROR
while(!(P2IN & BIT4)); // wait for GDO0 to go high, sync'd TX
// CANT GO PAST ABOVE LINE
while (P2IN & BIT4); // wait for GDO0 to clear, end of packet P2IFG &= ~(BIT4); // after TX, flag is set P2IFG &= ~(BIT4); P2IE |= (BIT4); // enable interrupt }
I am also aware that others have posted help requests, and many of them seem to lead back to this file. But I still do not fully understand how it is working.
As such, I'm posting this here in the hopes that someone may be able to suggest a simple command sequence that I could use for transmitting and receiving packets of data similar to the first tutorial I linked. If anyone has any suggestions on what I could do, or why the code segment I linked above would freeze, I would greatly appreciate anything that people could suggest for me to use/look at.
Thank you