Greetings,
I’m currently working on implementing a beacon-enabled IEEE 802.15.4 stack and trying to figure out how much advance notice is required when issuing a delayed send or receive command.
In beacon-enabled mode, the strict timing requirements specified by the beacon frame must be followed. Therefore, I believe it’s best to rely on delayed send or receive commands to achieve the required precision.
As I understand it, the minimal time between a receive and transmit process (or vice versa) is the Short Interframe Spacing (SIFS), which the standard specifies as 12 preamble symbols—equivalent to around 12 µs. This time is intended for the system to transition between states.
Now, imagine having two Guaranteed Time Slots (GTS) dedicated to the system, with only the time of one SIFS in between to transition to the appropriate state. If the first GTS is for Tx, one could use the Tx-and-wait-for-response feature of the DW3000, which may result in receiving slightly longer than necessary, but this shouldn’t cause issues. However, if the Rx GTS comes first, you would need to issue the transmission for the following GTS within the time of one SIFS, i.e., 12 µs.
To test if this is feasible, I wrote the following code using a host controller running at 64 MHz and SPI communication with the DW3000 at 8 MHz, which is relatively low:
volatile int32_t success = -2;
volatile uint32_t sys_time;
__disable_irq();
write_to_tx_buffer();
dwt_write_reg(0x001C, 0); // clear SYS_TIME latch
sys_time = dwt_readsystimestamphi32();
dwt_setdelayedtrxtime(sys_time + offset);
success = dwt_starttx(DWT_START_TX_DELAYED);
__enable_irq();
I found that the smallest offset value I could successfully use was 87,000, which corresponds to about 345 µs—significantly longer than the SIFS duration. Even after estimating and subtracting the time taken for SPI communication and CPU processing, I couldn’t reduce this delay to zero.
Additionally, I read in the DW3000 Errata that a delayed send must be issued at least (preamble length + SFD length + 20 µs) in advance. For my configuration, this results in a minimum of 60 µs, which is already more than the SIFS duration.
So, my question is: how can one achieve transmission in a GTS that follows an Rx GTS, where the device only has one SIFS time in between? Or is this scenario simply not feasible?
I’m relatively new to this topic, so I’d appreciate any corrections, ideas or clarifications.
Cheers!