Tag - Tag TWR example

Hi, I’m new to UWB.

I’ve been working from the ss_twr_init_int and ss_twr_resp example applications; trying to combine the two into one application with little success.

Is there example code available that demonstrates how to implement a TWR application where two or more devices can both initiate and respond to ranging requests? I want to design a system where all devices communicate tag-to-tag and are capable of switching between an ‘initiate’ mode and ‘responder’ mode depending on interrupt values.

Henry

… Or perhaps it would be more useful to share my issue

I use the ISR as in the example code but for some reason, it can only squeeze in one SPI read - any following SPI transaction will return zeros so I’m very limited in what I can do with the ISR. I can successfully read the status register once which I can use to call the callback functions that set the global volatile interrupt flags, but that’s pretty much all.

I was hoping to beef out the ISR body by adding checks to determine whether a received message is a poll/initiate or a response message, then to differentiate between the two different types of rx events and use them to control program flow.

Does this issue sound familiar to anyone? Or perhaps does anyone have a suggestion for a better way to implement the system? Also, as above, is there example code I can follow?

Thanks everyone - this forum has been very useful already!