The interface between the microcontroller and the radio transceiver consists of a SPI interface (/SEL, MOSI, MISO, SCLK), the clock output pin (CLKM), the interrupt pins (IRQ/DIG2) and control pins (/RST, SLP_TR).
Microcontroller to AT86RF212 Interface
SPI stands for Serial Peripheral Interface and is a synchronous bidirectional serial data bus. Detailed information about the characteristics of this interface can be found in
section 4.2 (SPI Timing) and
section 4.3 (SPI Protocol) of the AT86RF212 datasheet. The microcontroller has to be configured as SPI master in order to control the radio transceiver with the following primitives:
The pin CLKM (TRX_PIN_CLKM) can provide a clock signal, which is derived from the radio transceiver clock. This signal can be used as clock source for a timer or as main clock for the microcontroller.
The IRQ pin (TRX_PIN_IRQ) is an output pin of the radio transceiver and can be used as an interrupt source for the microcontroller. Per default it changes from LOW to HIGH, if an asynchronous radio transceiver event occurs and it stays at HIGH level, until the interrupt cause is determined by reading the register
RG_IRQ_STATUS. The polarity of the interrupt pin can be configured as described in
IRQ Polarity Configuration.
The function of the SLP_TR pin depends on the radio transceiver state. It has to be configured as an output pin of the microcontroller (see function
trx_pinset_slptr()). The following effects occur when switching
TRX_PIN_SLP_TR:
| Transceiver Status | Transition | Description | Pin behavior |
| PLL_ON | L->H | Start a frame transmission | TRX_PIN_SLP_TR is only sensitive on the rising edge |
| TX_ARET_ON | L->H | Start a TX_ARET transaction | TRX_PIN_SLP_TR is only sensitive on the rising edge |
| TRX_OFF | L->H | Set the radio transceiver into state SLEEP and disable CLKM | only as long as the pin is logical high |
| RX_ON | L->H | Set the radio transceiver into state RX_ON_NOCLK and disable CLKM | only as long as the pin is logical high |
| RX_AACK_ON | L->H | Set the radio transceiver into state RX_AACK_ON_NOCLK and disables CLKM | only as long as the pin is logical high |
| SLEEP | H->L | Set the radio transceiver back into state TRX_OFF, level sensitive | TRX_PIN_SLP_TR is only sensitive on the falling edge |
| RX_ON_NOCLK | H->L | Set the radio transceiver into state RX_ON and enable CLKM | fall back into RX_ON with falling edge |
| RX_AACK_ON_NOCLK | H->L | Set the radio transceiver into state RX_AACK_ON and enable CLKM | fall back into RX_AACK_ON with falling edge |
The low active /RST pin is used to reset the radio transceiver and has to be configured as an output pin of the microcontroller (see
trx_pinset_reset).
- If TRX_PIN_RST = LOW, the radio transceiver is hold in reset.
- If TRX_PIN_RST = HIGH, the radio transceiver is released from reset.
During normal operation, this pin is set to HIGH.
The DIG2 pin has different functionalities depending on register settings: