Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Problem with Burst message in ANT

Rank

Total Posts: 9

Joined 2013-12-21

PM

We have following query regarding ANT burst mode transfer from ANT Slave to ANT Master.

We tested under following configuration.
1. ANT network is created using shared channel topology.
2. We have a one master and 3 slaves connected in shared channel network.

Communication between ANT Master and ANT Slave follows following sequence.

Master sends broadcast to address 0
--- all shared slaves receive it
Master sends broadcast to address 1
--- slave 1 receive it
Master sends broadcast to address 1
--- slave 1 receive it
Master sends broadcast to address 0
--- all shared slaves receive it
Master sends broadcast to address 2
--- slave 2 receive it
Master sends broadcast to address 2
--- slave 2 receive it
Master sends broadcast to address 0
--- all shared slaves receive it
Master sends broadcast to address 3
--- slave 3 receive it
Master sends broadcast to address 3
--- slave 3 receive it
Master sends broadcast to address 0
--- all shared slaves receive it
Master sends broadcast to address 1
--- slave 1 receive it
Master sends broadcast to address 1
--- slave 1 receive it ....................

Here any slave can send a burst message to Master whenever it receives shared addressed message as shown below.
Here Slave 1 send burst message to Master and its transfer successfully. Please note here that after successfully
message transfer to master slave broadcast a dummy message with its shared address for Internal ANT stack.

Master sends broadcast to address 0
--- all shared slaves receive it
Master sends broadcast to address 1
--- slave 1 sends burst transfer; burst is queued
Master sends broadcast to address 1
--- Burst transfer for slave 1 is transmitted over the air and received by master
Master sends broadcast to address 0
--- all shared slaves receive it
Master sends broadcast to address 2
--- slave 2 receive it
Master sends broadcast to address 2
--- slave 2 receive it
Master sends broadcast to address 0
--- all shared slaves receive it
Master sends broadcast to address 3
--- slave 3 receive it
Master sends broadcast to address 3
--- slave 3 receive it ..................

Problem arise here whenever slave 1 send burst message immediate on its next turn from master then it fails.

Master sends broadcast to address 0
--- all shared slaves receive it
Master sends broadcast to address 1
--- slave 1 sends burst transfer; burst is queued
Master sends broadcast to address 1
--- Burst transfer for slave 1 is transmitted over the air and received by master
Master sends broadcast to address 0
--- all shared slaves receive it
Master sends broadcast to address 2
--- slave 2 receive it
Master sends broadcast to address 2
--- slave 2 receive it
Master sends broadcast to address 0
--- all shared slaves receive it
Master sends broadcast to address 3
--- slave 3 receive it
Master sends broadcast to address 3
--- slave 3 receive it
Master sends broadcast to address 0
--- all shared slaves receive it
Master sends broadcast to address 1
--- slave 1 sends burst transfer; burst is queued
Master sends broadcast to address 1
--- Burst transfer for slave 1 is fail here..........

But If slave 1 send burst message after skipping one turn then then it gets success. I don't understand this behavior. Please help me.

Thanks      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

That is not expected behaviour.

Do you have any logs of the ANT messaging on slave #1?
Do you get any errors when you attempt to queue the burst, and what error do you get when the burst fails (e.g. is it a TRANSFER_TX_FAIL, how many packets does it manage to transmit?)      
Rank

Total Posts: 9

Joined 2013-12-21

PM

Thanks alejandra,

When i try to send burst again in case of burst failure or to repeat on immediate next turn of slave from master, i get a stack level error 0x4020. TRANSFER_TX_FAIL event i get when burst transfer fails. But i get error here. I am transmitting total 5 packets of 8 bytes.

     
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

Can you please provide more details in the sequence of messages that you are using before producing the error.
Which call produces the error?

Are you doing other activities like accessing flash at the same time?      
Rank

Total Posts: 9

Joined 2013-12-21

PM

I am not doing any activity related to flash during burst transfer. After successful burst message transfer on its turn, slave1 try to send burst message on immediate next turn of it. here i am sending 5 block of 8 bytes each. During second transfer, in following sequence it gets fail.

Sequence 1 : Transfer of first 8 byte block Burst send start using BURST_SEGMENT_START index
err_code =
sd_ant_burst_handler_request(CHANNEL_0, 8 , &gu8ar;_AntBurstTxBuffer[0], BURST_SEGMENT_START);
APP_ERROR_CHECK(err_code);

Sequence 2 : on receive of EVENT_TRANSFER_NEXT_DATA_BLOCK event when i send next block using

err_code =
sd_ant_burst_handler_request(CHANNEL_0, 8 , &gu8ar;_AntBurstTxBuffer[8], BURST_SEGMENT_CONTINUE);
APP_ERROR_CHECK(err_code);

Here I get error 0x4020 and my controller gets reset as i put reset on any failure.

     
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

The error code 0x4020 is defined in ant_error.h, and corresponds to TRANSFER_SEQUENCE_NUMBER_ERROR

Typically, this error appears due to timing problems - e.g., too long delay in between sending the first and second packets of the burst, which would cause the burst to fail.

Since the burst is small, you can send the full 5 packets to ANT without waiting for the BURST_SEGMENT_START; you can refer to the ant_message_types example in th N5 SDK for example code.      
Rank

Total Posts: 9

Joined 2013-12-21

PM

there is no delay in sending burst message package as I quick send next packet after reception of EVENT_TRANSFER_NEXT_DATA_BLOCK event.      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

The particular error message does point to a timing problem - processing of events may be taking too long, some interrupt in the system may be causing the second packet to not be sent right away...
Have you tried removing the wait for this event and just sending the set of packets as in the ant_message_types demo? That would let you know if there is something that is causing the processing of events to be delayed.