Jump to content
43oh

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

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.

 

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

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...