Other Parts Discussed in Thread: CC115L, CC113L, CC1150, CC110L
Can´t Texas provide a simple, basic and functional code sample to initialize the CC115L/CC113L with the a basic MSP430 micro?
Regards
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi Siri,
Thanks for your response.
I have already seen that code, it is a good code for working with the development kits. But for a brand new code is very messy, too much references to other files, and functions that use parameter of other devices (CC1150, pex).
So my idea was to have only a basic, clean, straigth code to work with the value lines devices.
I will continue to digg and work so that I can make my own code.
Regards,
Hi Ralph
Be advised that the code you got from Siri is a beta code still under development. There may still be a few bugs to sort out before we are going to release this code. One correction I advise you to do is to change the following in cc11xL_simple_link.c line 188
From:
// wait for packet to be sent( poll status byte until radio is in IDLE state)
while((trxSpiCmdStrobe(CC110L_SNOP)& 0xF0) != 0x20)
To:
// wait for packet to be sent( poll status byte until radio is in IDLE state)
while((trxSpiCmdStrobe(CC110L_SNOP)& 0xF0) != 0x00)
If you do not change this you may experience that the code gets stuck in the while loop after it has sent a packet.
Dear Martin,
I'm using the CC115L.
To work with this IC the code must be as follows:
// be sure radio is in IDLE state
trxSpiCmdStrobe(CC115L_SIDLE);
while((trxSpiCmdStrobe(CC115L_SNOP)& 0xF0) != 0x00);
// write packet to tx fifo
cc11xLSpiWriteTxFifo(txBuffer,5);
// strobe TX to send packet
trxSpiCmdStrobe(CC115L_STX);
// wait for packet to be sent( poll status byte until radio is in IDLE state)
while((trxSpiCmdStrobe(CC115L_SNOP)& 0xF0) != 0x20)
{
// wait a bit before polling again (2.5 ms @ 8 MHz system clock)
__delay_cycles(20000);
}
If I not put like this, after sending the first one the Micro gets stucked. I didn't tested it with the CC110L.
Regards,
Ralph
That looks correct. You have to change the cmd strobe definitions and register definitions according to which device you are going to use. The code was written for the CC110L but for the TX part of the code you can use the CC115L if you change the definitions like you did.
I still would correct the "wait for packet to be sent" while loop at line 188. like I suggested in the last post. There is a bug there. The while loop checks if the radio is in TX state when it should check for IDLE state. If the radio reaches IDLE state after packet transmission before you get to the while loop, the code will get stuck in the loop and the program will halt.
I would also like to mention that in the next release of SmartRF Studio there will be a template in the register export function that will make it easy to copy and paste optimum register settings from Studio and into the code. The code is also designed so it will work together with SmartRF Studio. It is easy to send and receive packets between Studio and the SW.
Dear Martin,
I have make some tests.
With the CC110L, the best thing is to make the changes that you suggest. With this code, you can also use the CC115L and there is no problem, it works perfectly well.
If you put the CC115L definitions with the CC115L chip you must change from 0x20 (as you suggest) to 0x00 (as I said). If not, after the first pack is sent the micro gets stuck.
So the best solution for not having problems is to make the changes as you said and use the CC110L or the CC115L without any sort of problems.
If you change (as I did) the registers to the CC115L, you must put the value 0x20.
Eventually you can put in the software that TI will provide, the two options and the users must comment or uncomment the registers that they want to use.
Another thing, about the Verify Answer buttton, I don´t have this option because I didn´t open this post.
I use only the post opened by Hung on 12th of August to make a question related to the CC115L chip.
Can you change my post to another one?
With regards,
RALPH
Ralph,
The sw provided was originally written only for the CC110L. In the sw that is going to be released there will be individual projects for each of the value line radios so the user do not need to change in the code depending on radio used.