I am trying to connect two CC1110 via a two way audio link ,my packet size is 80 Bytes audio data and the total packet size transmitted is 113 Bytes.I sample at 8khz rate and the TX frequency is 100 Hz.I am using a Realtek chip as the audio codec via I2S interface .I have a problem of syncing the Master and Slave devices. I have read the "Application Note AN082" and still i can't figure out what is wrong with my setup.When I manually correct the frametime using hardware buttons activating both I2SCLKF1 = 0x57 and I2SCLKF1 = 0x59 respectively it works perfectly fine .
Using the working examples of the two way audio link code i got these lines of code ;
if ((frametime > 0x80) && (frametime < 0x9C)) // if in the so called 'bad zone'
{I2SCLKF1 = 0x57; // speed up the I2S bit clock}
if ((frametime > 0x10) && (frametime < 0x5F)) // if in the so called 'good zone'
{I2SCLKF1 = 0x59;}
How will I be able to find the values of the "frametime " for my specific packet size and data rate is there any mathematical formula for generating the values and i'm using the same master slave architecture as the Two way audio link example code that you provide .Any help will be greatly appreciated please help me..