Ranging doesnt start on example 5a and 5b

Hi,
I am trying to make example 5a and 5b work. Although spi read/write works correctly.

neither dsTwrInit( line 231 ) nor dsTwrResp(line 232) supply if condition. It goes to else condition.

Do you have opinion, what can be the reason?
thank you

Hello alican

This is expected to happen. These examples use SPI polling, since initially no frame is received the status register will not have the SYS_STATUS_RXFCG flag enabled. If a transmitter is active, after a couple of iterations the flag should become set and the frame can be received.

I suggest moving your breakpoints into the condition block, e.g on lines 237 and 236 for the responder and initiator respectively. Checking if an error flag is set could also be beneficial.

If this does not solve your issue, your devices might not hear each other. Make sure the devices are in range, the antenna is connected properly and the devices are not placed in a metal enclosure.