This is the quick start guide for the macscc_group , with step-by-step instructions on how to configure and use the driver for a specific use case.
The code examples can be used in the MAC stack to control super-frame timing or a generic application as a general pupose 32-bit timer/counter.
This use case will prepare the MACSC to trigger a interrupt when the timer overflows. The interrupt is handled by a customisable call back function.
We will setup the MACSC in this mode:
For the setup code of this use case to work, the following must be added to the project:
This use case will prepare the MACSC to trigger three independent interrupts when it reaches three different compare values. The three compare matches will be handled by three separate interrupts implemented in call back functions. Absolute compare mode of the MACSC is used. COMPARE_MODE in conf_example.h
We will setup the MACSC in this mode:
(interrupt based)
This use case will prepare the MACSC to use the backoff slot counter module interrupt implemented in call back function.
We will setup the MACSC in this mode:
based)
This use case will prepare the MACSC to use the relative compare mode to remain awake during the Contention Access Period(CAP) and required GTS of the superframe and sleep during the sleep period.All 3 compare modules are used along with Beacon Timestamp register. Ideally,Beacon Timestamp register is updated with SCCNT for every incoming IEEE802.15.4 frame. However,this application simulates the scenario by enable manual write of the Beacon Timestamp register to demonstrate relative compare. COMPARE_MODE in conf_example.h interrupts implemented in call back function.
We will setup the MACSC in this mode: