Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Problem with burst and transfer in progress error

Rank

Total Posts: 19

Joined 2013-04-03

PM

I am using an Ant 2571 module. The module operates as a slave and is interfaced to a microcontroller. The interface between the microcontroller and Ant module is asynchronous. I am trying to send messages in burst mode to a master. Currently I am just trying to send two messages using burst. The data is received by the master and parsed correctly but I am consistently getting a "Transfer In Progress" message at the slave side.

The sequence is this: 1) I build the first of the burst messages and send it to the module. The way I send it is to monitor the RTS line to make sure it is low before I send bytes over the USART. I then put the module to sleep. 2) The firmware then goes off to do other things 3) When the "Event Transfer Tx Start" message is received a flag is set indicating that the firmware should build the next burst message and send it to the Ant module (again checking the state of the RTS line to make sure the module is ready for the message). 4) The very next message back from the module is the "Transfer in Progress" message.

I feel confident that my sequence numbering is correct (when it wasn't I was getting weird behavior and burst failed errors). Clearly the message is getting through and the master is satisfied with what it is receiving. Any thoughts on this?

Thanks.

     
Rank

Total Posts: 19

Joined 2013-04-03

PM

Quick follow up: If I ignore the "Transfer in Progress" message (previously I had a breakpoint there to alert me when it occurred, the very next message is "Event Transfer Tx Completed". Getting the "Transfer in Progress" message does not seem like expected behavior and if I ignore it I am doing so at my own peril.      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

The TRANSFER_TX_START message is there to let you know you can continue sending packets for the same burst transfer in case you have issues with flow control, not to let you start a new burst transfer (i.e. start a new transfer beginning with a burst packet with sequence number 0).

You could be seeing a TRANSFER_IN_PROGRESS error if you have attempted to send a second burst transfer before having finished sending the first one, and as a result, your second transfer will not be transmitted over the air. Please wait until the TRANSFER_TX_COMPLETED or TRANSFER_TX_FAIL to start sending your new transfer. The application note AN04 Burst Transfers is a great resource if you are working on implementing bursts.

http://www.thisisant.com/developer/resources/downloads/#documents_tab

If you are able to generate a log of the serial communication between the host and your MCU, that would be greatly helpful to troubleshoot this issue. Are you attempting to send two one-packet bursts, or one two-packet burst?      
Rank

Total Posts: 19

Joined 2013-04-03

PM

I was able to track down my problem once I could connect a logic analyzer to the Ant module. Turns out I was calling my "Send message to Ant" function from a point in the program that I did not expect. I got around that issue and it appears to be working okay now.

On a related topic, how do I handle transmitting bursts of one message? Do I start with a sequence number of "100" or do I always have to send two messages (000, 101)? The way my firmware is structured it would be much easier to funnel everything through the burst message process.

Thanks.