Please help to implement frequency hopping using cc1110.I able to change channels and calibrate them successfully but cc1110 works perfect when a constant frequency is set.But when i change the channels during the run time i encounter packet loss.I use master slave system in which initially at the channel 0 master transmits signal first and then slave transmit the signal at channel 0 and chage to the next channels in a common list and then the master transmits the signal at the next channel and the link is maintained is there anything wrong about the implementation any help would be appreciated.
void setChannel (INT8U ch) {
//{0, 8, 16, 24};
CHANNR = 0;
SCAL();
}
INT8U code HoppingChannels[4]= {0,8,16, 24};
void main()
{
while(nolink)
{
channel=0;
setChannel(HoppingChannels[channel]);
//code to perform tx
{}
}
if(link)
{
if(master
{
//change channel send packet
setChannel(HoppingChannels[channel]);
channel++;
if(channel>3)
{
channel=0;
}
{code for tx}
}else
{
//slave
{code for tx}
setChannel(HoppingChannels[channel]);
channel++;
if(channel>3)
{
channel=0;
}
}
}
}