Jump to content

Recommended Posts

Hi All,

I am trying to create a transmitting and receiving node. My setup is as follows

My transmitting node #1 is mbed-K64F with cc1101.(working fine sending data)

My transmitting node #2 is msp430g2553 with cc1101.(giving me challenges)

My receiving node is mbed-lpc1768 with cc1101 (working fine and received data from node #1)

my connection for msp430 are as follows:

  1. csn is at pin 8
  2. sck is at pin 7
  3. mosi is at pin14
  4. miso is at pin 15
  5. I just declare csn as output, the rest of the pins i assume gets configured when we call spi.begin()?


I imported the cc1101 library from mbed and managed to convert and compile it without errors. However I am still struggling to send the message to receiving node. My logic is as follows:

  • initialize SPI library (1 MHZ of frequency,SPI msb datamode and SPI_mode0)
  • initialize registers of cc1101 
  • send data after every 4 seconds

I used Serial.println to debug my program and I can see it is calling the spi_send function in usci_spi.cpp file but i cant see any packet in the receiving end.

Almost same logic and code is running on k64f, even my print statements are giving me same values of registers,addresses and data. But msp430 is not sending data mbed-k64f is sending data.

Anyone got a joy to successfully sending the data with msp430g2553 please help!!!

I  have also attached my cc1101.h/cpp files. Please feel free to have a look and let me know if I am doing anything wrong.
thanks in advance,

Zain

 

CC1101.cpp

CC1101.h

Share this post


Link to post
Share on other sites

I solved this problem. the problem was in the connection. I connected MOSI of cc1101 to MISO of msp430 launchpad and MISO of cc1101 to MOSI of msp430 launchpad.

It was the connection problem rather than coding issue.

 

Share this post


Link to post
Share on other sites

Great to hear you got it solved and sorry that nobody was able to answer the thread before you did solve it.

Would you mind sharing the library for the CC1101 that compiles in Energia?

Share this post


Link to post
Share on other sites

Hi,
Yes I will share my updated library today. I converted it from mbed cc1101 library. If anyone requires any help please feel free to ask.

Share this post


Link to post
Share on other sites

in order to use this library call power function first and then init function.
In usci _spi class there is a function call spi_send, before return line you might need to give delay(100). without delay you can use simple print statement as well. I had to used it otherwise it was not transmitting data

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×