cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 interfacing RF module (TI CC11xx) over SPI

vojislav
Associate
Posted on August 25, 2016 at 17:20

Hi,

has anyone worked with on of the TI CC11xx RF modules?

I have searched a lot to find STM32 related code examples, but with no success. All I found is the following discussion, where someone is also using CC1101 RF module, and saying that ''

I'm running my RF packet library for the Radio as a test case.

'' What does that means?

It seems that I need to start to write custom  CC11xx library/driver from scratch... Still, I would very much appreciate some hints, suggestions, code examples if any of you have worked with this family of RF modules.

Thanks,

Vojin

2 REPLIES 2
Posted on August 25, 2016 at 18:35

Wouldn't the STM32 uniqueness just extend to getting bytes on/off the SPI bus? Find a sufficiently abstracted driver where you can add your own STM32 specific SPI code. Find some reference code from TI and port that.

Sounds like he had a data transport layer/stack, which he stuck on top of a physical layer to get data onto or out of the air using these specific radios.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
vojislav
Associate
Posted on August 30, 2016 at 16:13

Although it sounds like a basic instruction it kinda helped a lot. Thanks.

I have one more question.

In CC1101 documentation it says the following:

''For single access to registers, the burst bit has to be set to 0. After transmitting the address header, one can either transmit one data byte or read one byte, depending on the R/W bit...''

Okay, some info. Chip has some number of configuration registers. The R/W bit in the address header controls if the register should be written or read, and the burst bit controls if it is a single or a burst access.

R/W | B | A5 | A4 | A3 | A2 | A1 | A0

So it means that if I want to write some register, I first need to send register address, and then the data I want to write in. I somehow come to conclusion (although I haven't yet tested it) that HAL_SPI_Transmit_IT function could do the job (having data_to_send buffer containing two bytes, one for address, and another for data).

But what if I just want to read something from SPI slave device, in this case CC1101 chip, how would I do that? I somehow seem not to fully understand HAL_SPI_Receive_IT function.

Do you maybe have some experience in this subject?

Thanks