Good morning all,
I have been trying to get a project working with the CC430 Chronos watch, but haven't had any joy. When the watch is set to transmit RF with Manchester encoding, the payload transmits ok, but when Manchester encoding is switched off, the payload is not transmitted. I'm sure I must be missing a setting, but I can't figure out what. I'm new to TI products as I have always used PICs, and the Chronos is my way of learning more about the CC430 which is what I would like to use in an upcoming product revision based.
I'm trying to use the hardware packet handler, with 2 sync bytes (FF FE), fixed length (2 bytes in this case), no address, and no CRC. I'm receiving with a custom receiver that outputs raw data to logic analyser. The data rate is 9600 baud, and carrier is set to 433.92MHz.
Any help in understanding what I am doing wrong would be much appreciated.
Kind regards,
Carl
My test code is as follows:
#include "timer.h"
#include "display.h"
#include "buzzer.h"
#include "radio.h"
#include "rf1a.h"
#include "pmm.h"
u8 status;
//****************************************************************************
#define PACKET_LEN (0x02) // PACKET_LEN <= 61
#define PATABLE_VAL (0x51) // 0 dBm output
const unsigned char TxBuffer[PACKET_LEN]= {0x0F, 0x0F};
//****************************************************************************
void reset_tpms(void);
void update_tpms(void);
void sx_tpms(u8 line);
void display_tpms(u8 line, u8 update);
void reset_tpms(void)
{
status = status_rf_idle;
}
void update_tpms(void)
{
}
void sx_tpms(u8 line)
{
// Increase PMMCOREV level to 2 for proper radio operation
//SetVCore(2);
ResetRadioCore();
InitRadio();
Transmit((unsigned char*)TxBuffer, sizeof TxBuffer);
}
void display_tpms(u8 line, u8 update)
{
if (update == DISPLAY_LINE_UPDATE_FULL)
{
display_chars(LCD_SEG_L2_5_0, (u8 *)" RF ", SEG_ON);
}
}
void InitRadio(void)
{
// Set the High-Power Mode Request Enable bit so LPM3 can be entered
// with active radio enabled
PMMCTL0_H = 0xA5;
PMMCTL0_L |= PMMHPMRE_L;
PMMCTL0_H = 0x00;
/*//WriteRfSettings(&rfSettings);
# Sync word qualifier mode = 16/16 sync word bits detected
# CRC autoflush = false
# Channel spacing = 199.951172
# Data format = Normal mode
# Data rate = 9.59587
# RX filter BW = 203.125000
# PA ramping = false
# Preamble count = 2
# Whitening = false
# Address config = No address check
# Carrier frequency = 433.919830
# Device address = 0
# TX power = 0
# Manchester enable = true
# CRC enable = false
# Deviation = 47.607422
# Packet length mode = Fixed packet length mode. Length configured in PKTLEN register
# Packet length = 2
# Modulation format = 2-FSK
# Base frequency = 433.919830
# Modulated = true
# Channel number = 0
*/
//
// Rf settings for CC430
//
WriteSingleReg(SYNC1,0xFF); //Sync Word, High Byte
WriteSingleReg(SYNC0,0xFE); //Sync Word, Low Byte
WriteSingleReg(PKTLEN,PACKET_LEN); //Packet Length
WriteSingleReg(PKTCTRL1,0x00);//Packet Automation Control
WriteSingleReg(PKTCTRL0,0x00);//Packet Automation Control
WriteSingleReg(FREQ2,0x10); //Frequency Control Word, High Byte
WriteSingleReg(FREQ1,0xB0); //Frequency Control Word, Middle Byte
WriteSingleReg(FREQ0,0x71); //Frequency Control Word, Low Byte
WriteSingleReg(MDMCFG4,0x88); //Modem Configuration
WriteSingleReg(MDMCFG3,0x83); //Modem Configuration
WriteSingleReg(MDMCFG2,0x02); //Modem Configuration
WriteSingleReg(MDMCFG1,0x02); //Modem Configuration
WriteSingleReg(FSCAL3,0xE9); //Frequency Synthesizer Calibration
WriteSingleReg(FSCAL2,0x2A); //Frequency Synthesizer Calibration
WriteSingleReg(FSCAL1,0x00); //Frequency Synthesizer Calibration
WriteSingleReg(FSCAL0,0x1F); //Frequency Synthesizer Calibration
WriteSingleReg(TEST0,0x09); //Various Test Settings
WritePATable(PATABLE_VAL);
}
void Transmit(unsigned char *buffer, unsigned char length)
{
RF1AIES |= BIT9;
RF1AIFG &= ~BIT9; // Clear pending interrupts
RF1AIE |= BIT9; // Enable TX end-of-packet interrupt
WriteBurstReg(RF_TXFIFOWR, buffer, length);
Strobe( RF_STX ); // Strobe STX
}