when the DWM1000 module is powered on, it goes to receiving mode forever using interrupts, and process received frames
periodically, when a user defined timeout is triggered, the DWM1000 will send out a frame.
I have made individual receiving and transmission working, but not quite clear what are necessary steps to coordinate the receiving and transmission. Do I need to turn off RX before transmission, and what is the APIs to do so?
Thanks Hans,
I have made some progress after I posted the message. The logic is quite similar to yours: before transmitting, I called dwt_forcetrxoff() to turn off receiving mode, after transmit complete, I turned on receiving mode by calling dwt_rxenable(0). This seems to be working for the transmission part. However, there is one potential problem on the receiving side: If the interrupt happens while WDM1000 is in middle of processing received frames, the transmission will break the receiving frame processing logic. I wonder how I can develop a logic similar to mutex, so that when transmit interrupt fires, I could wait until the receiving process finish before transmitting a frame.