zainmsp 2 Posted May 3, 2018 Share Posted May 3, 2018 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: csn is at pin 8 sck is at pin 7 mosi is at pin14 miso is at pin 15 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 Quote Link to post Share on other sites
zainmsp 2 Posted May 8, 2018 Author Share Posted May 8, 2018 anyone willing to answer my query?? Quote Link to post Share on other sites
zainmsp 2 Posted May 9, 2018 Author Share Posted May 9, 2018 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. Quote Link to post Share on other sites
energia 485 Posted May 11, 2018 Share Posted May 11, 2018 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? Quote Link to post Share on other sites
zainmsp 2 Posted May 14, 2018 Author Share Posted May 14, 2018 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. Quote Link to post Share on other sites
zainmsp 2 Posted May 14, 2018 Author Share Posted May 14, 2018 Please find my attachedCC1101.7z library zeke and Fmilburn 2 Quote Link to post Share on other sites
zainmsp 2 Posted May 15, 2018 Author Share Posted May 15, 2018 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 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.