Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Slave Always Goes to RX Timeout

Rank

Total Posts: 5

Joined 2012-11-15

PM

Hi,
I have been trying to communicate with a master and slave communication between two AP2 Single Channel devices. I have MSP430G2553 MCU for host. I set following configurations.

For Master:
ANT_ChannelNumber = 0;
ANT_ChannelType = 0x10;
ANT_Network = 1;
ANT_RadioFrequency = 57;
ANT_TXType = 3;
ANT_DeviceType = 100;
ANT_DeviceID = 87;
ANT_Period = 1024;

For Slave:
ANT_ChannelNumber = 0;
ANT_ChannelType = 0x00;
ANT_Network = 1;
ANT_RadioFrequency = 57;
ANT_TXType = 0;
ANT_DeviceType = 100;
ANT_DeviceID = 0;
ANT_Period = 1024;

On Master side, I am calling following function and I am transmitting data successfully.
ANT_AssignChannel
ANT_SetChannelId
ANT_SetChannelRFFrequency
ANT_SetChannelPeriod
ANT_SetChannelSearchTimeout
ANT_OpenChannel_byDefinedSettings
... Broadcast Data

On Slave Side I am calling following functions and I can't get any packet from Master. Moreover, after the timeout interval I go directly to RX Search Timeout and Channel Closes.
ANT_AssignChannel
ANT_SetChannelId
ANT_SetChannelRFFrequency
ANT_SetChannelPeriod
ANT_SetChannelSearchTimeout
ANT_OpenChannel_byDefinedSettings

Here is Slave side channel logs

A4 01 6F 20 EA
A4 03 40 00 42 00 A5
A4 03 40 00 51 00 B6
A4 03 40 00 45 00 A2
A4 03 40 00 43 00 A4
A4 03 40 00 44 00 A3
A4 03 40 00 4B 00 AC
A4 03 40 00 01 01 E7
A4 03 40 00 01 07 E1

Can anyone help to figure it out why I can't get data from Slave? I have been trying to figure out alot and I read the Message Protocol pdf.

Thank you in advance,      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Hi,

From first glance nothing is wrong, could you provide your source code or your complete logs on both the master and slave side from when you configure the channels? Can you receive from your master with ANTware II?

Cheers      
Rank

Total Posts: 5

Joined 2012-11-15

PM

Thank you for reply, Harrison.

For master side, as I wrote before, I called previous functions. These are with following order:
ANT_AssignChannel
ANT_SetChannelId
ANT_SetChannelRFFrequency
ANT_SetChannelPeriod
ANT_SetChannelSearchTimeout
ANT_OpenChannel

I am debugging step by step and I am geting positive feedback for each of them (Successful Channel Event). Then, master channel start sending packages. For each package, it gets successful transmission event code. I dont see any other channel event code on the UART channel.

We are using our custom boards. Since everything is working pretty much straight forward, then I tough to try Sparkfun's AP1 breakout board on SLAVE side, where master side is again our AP2 custom boards. Actually, without any package lost I have received all packages I sent.

Yesterday, while I am trying our AP2 custom boards, I accidentally receive one package from master. Then I figure out maybe I have a problem on channel synchronization. Then, it seems to be look like hardware problem. Today, I checked all components again. Everything looks ok, except, 16MHz Crystal. We used following crystal for 16 MHz one. (http://www.farnell.com/datasheets/1520537.pdf) with following features:

CRYSTAL, FA-238, 16MHZ, 50PPM, 12.5PF
Frequency: 16MHz
Frequency Tolerance: ± 50ppm
Load Capacitance: 12.5PF
Frequency Stability: ± 30ppm
Operating Temperature Range: -40 ° C to +85 ° C
Crystal Mounting Type: SMD
Crystal Case Type: 3.2mm x 2.5mm
No. of Pins: 4
SVHC: No SVHC (18-Jun-2012)
Output Frequency: 16MHz
Series: FA-238
Temperature Stabilty: ± 50ppm


On AP2 datasheet, it is written 9pf crystal to use with AP2. Can it be the source of the problem? Moreover, when I try to connect our AP2 custom board to ANT enabled Sony phones, we get some receive error event message on mobile phone, where our AP2 board is master and mobile phone is slave.

Can be reason of problem crystal that we used? That's how I come up. Do you have any suggestion?
Thank you for your time and afford.      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Hi,

A timing diagram of the serial interfacing between your MSP430 and AP2 would be most helpful including actual logs of the bytes being passed, I need to see what bytes are being sent and the exact responses just to confirm that's working properly.

Additional load capacitance can increase the start up time of the crystal and increase current consumption but I wouldn't expect it to harm channel timings significantly. I would still recommend following Nordic's guidelines for a crystal with at most 9pF or lower though.

Cheers      
Rank

Total Posts: 5

Joined 2012-11-15

PM

Ok smile It was very very very bad engineering problem smile Our custom board's coupling capacitors were not soldered well.. So we were not receiving properly, after that, we are alright smile Thank you for helping and sorry to take your time.

All the best,
Deniz