RIOT icon indicating copy to clipboard operation
RIOT copied to clipboard

net/ieee802154/submac: calculate aUnitbackoffPeriod at runtime

Open jeandudey opened this issue 4 years ago • 5 comments

Contribution description

Now aUnitBackoffPeriod is calculated at runtime from the current symbol duration and the value of the aTurnaroundTime and aCcaTime constants. This allows to add other PHYs that don't have fixed values for this constant and depend on the PHY configuration (symbol duration mostly).

Transceivers using the submac should work as usual since nrf52 and cc2538 use the same back-off period (320 us) and the added functions yield the same results. For other transceivers such as AT86RF212B (when ported to the HAL) may get a back-off period of either 320 us or 800 us depending on the band used.

Testing procedure

  • make -C tests/ieee802154_submac BOARD=<board> term

And send the constants command.

Issues/PRs references

N/A

jeandudey avatar May 15 '21 09:05 jeandudey

nice one!

jia200x avatar May 17 '21 08:05 jia200x

I haven't performed tests of the impact of the ACK and backoff calculations, but maybe they could be cached when some PHY parameter is changed as they are used each time a packet is transmitted. Any thoughts on this? It could add as much 4 bytes in total for both values on the ieee802154_submac_t structure (and deleting the symbol_duration one I added of course)

jeandudey avatar May 21 '21 13:05 jeandudey

Stored them as fields on the submac structure, on https://github.com/RIOT-OS/RIOT/pull/16475/commits/e4df8c122ee80ac3e747d3abf5d1c3dadcf2c1fe and https://github.com/RIOT-OS/RIOT/pull/16475/commits/96a745f2859cb899c15dac9a80795cc16ce30d4b respectively.

jeandudey avatar Jun 02 '21 15:06 jeandudey

@jeandudey, can you rebase please? @jia200x, @benpicco, any one up for an ACK upon a rebase?

OlegHahm avatar Mar 09 '22 13:03 OlegHahm

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions.

stale[bot] avatar Sep 21 '22 05:09 stale[bot]

Uh we still need this - want to give this a rebase?

benpicco avatar Nov 22 '22 02:11 benpicco