Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

Migration from CC1101 to CC430f5137

$
0
0

I've been working with CC1101's for a while using an external MCU and would like to migrate to a pure CC430 solution. I've been able to communicate with the Chronos watch from my cc1101-based modules in the past by means of OpenChronos. Everything has been working fine and found the CC430 to be a nice evolution of my current design. However, I can no longer base my developments on OpenChronos since I need something much more compact and without all those explicit references to the Chronos hardware. In a first moment, I want to communicate with my current CC1101 design from a CC430 board without all the exsting bsp+mrfi code used in the Chronos.I expected to create a simple code capable to do this at least.

This is the part of the code where the CC430 transmits a packet:

void transmit(unsigned char bytes[], unsigned int length)
{
  char status;

  // Wait for radio to be in idle state
  status = radio.strobe(RF_SIDLE);
  while (status & 0xF0)
  {
    status = radio.strobe(RF_SNOP);
  }

  // Clear TX FIFO
  status = radio.strobe(RF_SFTX);

  if(length <= 64)
  {
    radio.writeTXBuffer(bytes, length); //Write bytes to transmit buffer
    status = radio.strobe(RF_STX); //Turn on transmitter
  }

  status = radio.strobe(RF_SNOP);

  // Wait for transmission to finish
  while(status != 0x7F)
  {
    status = radio.strobe(RF_SNOP);
  }

  radio.strobe(RF_SIDLE); // Put radio back in idle mode
  return;
}

The issue is that, if I set PKTCTRL0 to variable packet length and CRC (0x05), the above function stalls on " while(status != 0x7F)" whilst waiting for the transmission to end. Otherwise, if I sent PKTCTRL0 to infinite length or fixed length the function runs OK, even if I'm not able to see anything is transmitted or not at this moment. The fact is that my current CC1101 board does not receive anything.

I'm thinking that working with this CC430 is more complicated than simply controlling a CC1101 via SPI. Have I maybe to enable some hardware option even before setting the RF config registers?


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>