Problem with SS TWR example

Dear Sir

I’m try to port your SS TWR example from trek1000 demo board to my board. I succesfully port the SS TWR INIT on one board that will act as ANCHOR but fail to port the SS TWR RISP on a second board that will act as TAG.

In specific my board receive correctly the init messagge but when try to send back the message can’t get the TXFRS bit on so the transmission fail.

I have this value on status reg

8400642 (100000000010111100000010) after the receive of the INIT message.

2150625919 (10000000001011111111001001111111) after the start of transmissione do by call the dwt_starttx(DWT_START_TX_DELAYED) function.

Have you any idea on what can be wrong?
I think that the modul econfiguration is OK because i receive the INIT message but after that something go wrong.

Please check if the delayed TX (on the responder) is succeeding, e.g. ret = dwt_starttx(DWT_START_TX_DELAYED); is ret == DWT_SUCCESS? If it is failing, then you need to adjust timings … your new board/micro etc is too slow… so you need longer inter-message delays/turnarounds.

Dear Zoran

I check and dwt_starttx return DWT_SUCCESS, any other idea?

you can poll/read the register 0x19 (see Debugging App note) to see that the device goes into TX state and then back to IDLE.

you can have a look at GPIOs 5 and 6 and output TX/RX states on initiator/responder and look on the scope to make sure one device is transmitting when the other has receiver enabled (also explained in Debugging app note APS022).

Hi Zoran

I make some other test and see that the problem is with the delayd tx, if i start the trasmission with DWT_START_TX_IMMEDIATE the transmission is ok, but on the receiver receive timestamp is high variable.

While if i use DWT_START_TX_DELAYED the transmission never start.

Any suggest?

Check the times make sense:

What is the delay TX time you program (in reg 0xA), if you read the system time before the DELAYED_TX command is issues what is it ?
Is it very close to the TX time you programmed?

Maybe you can explain in some more detail what you are trying to do e.g.:

  • tag sends a frame (immediate)
  • anchor receives it and replies (delayed), what is the delay,
    etc.