Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
AT86RFx Driver

Common driver for the AT86RF family transceivers.

This layer provides Transceiver Abstraction Layer(TAL) for the application across AT86RF family.

Modules

 APIs to access RF module
 

Macros

#define CCA_MODE_DEFAULT   (0x01)
 Default value of CCA mode. More...
 
#define CLEAR_TRX_IRQ()
 Clear the transceiver interrupts. More...
 
#define DISABLE_TRX_IRQ()
 Disable the transceiver interrupts. More...
 
#define ENABLE_TRX_IRQ()
 Enables the transceiver interrupts. More...
 
#define FCS_LEN   (2)
 Length (in octets) of FCS. More...
 
#define FUNC_PTR   void *
 Definition of a function pointer. More...
 
#define LARGE_BUFFER_SIZE   (130)
 Size of the buffer allocated for transceiver reception. More...
 
#define LENGTH_FIELD_LEN   (1)
 Size of the length parameter. More...
 
#define MAX_CSMA_BACKOFFS_DEFAULT   (0x04)
 Default value of maximum csma ca backoffs. More...
 
#define MAXBE_DEFAULT   (0x05)
 Default value of maximum backoff exponent used while performing csma ca. More...
 
#define MINBE_DEFAULT   (0x03)
 Default value of minimum backoff exponent used while performing csma ca. More...
 
#define P_ON_TO_CLKM_ATTEMPTS
 Ratio between max time to transceiver poll delay. More...
 
#define PHY_MAX_LENGTH   (127)
 Maximum length of a phy packet. More...
 
#define PLL_LOCK_ATTEMPTS   (3)
 Value used for checking proper locking of PLL during switch from TRX_PFF to PLL_ON. More...
 
#define READ_ACCESS_COMMAND   (0x80)
 Read access command to the transceiver. More...
 
#define RST_HIGH()
 Reset pin high. More...
 
#define RST_LOW()
 Reset pin low. More...
 
#define SLEEP_TO_TRX_OFF_ATTEMPTS
 Ratio between max time to transceiver poll delay. More...
 
#define SLP_TR_HIGH()
 Sleep pin high. More...
 
#define SLP_TR_LOW()
 Sleep pin low. More...
 
#define TRX_CMD_FR   (0x20)
 Frame read command of transceiver. More...
 
#define TRX_CMD_FW   (0x60)
 Frame write command of transceiver. More...
 
#define TRX_CMD_SR   (0x00)
 SRAM read command of transceiver. More...
 
#define TRX_CMD_SW   (0x40)
 SRAM write command of transceiver. More...
 
#define TRX_IRQ_DEFAULT   TRX_IRQ_TRX_END
 Default interrupt configuration for transceiver. More...
 
#define TRX_POLL_WAIT_TIME_US   (100)
 Value in us used for delay between poll attempts for transceiver access. More...
 
#define WRITE_ACCESS_COMMAND   (0xC0)
 Write access command of the transceiver. More...
 

Typedefs

typedef enum at86rfx_retval_tag at86rfx_retval_t
 These are the return values of the RF API. More...
 

Enumerations

enum  at86rfx_retval_tag {
  AT86RFX_SUCCESS = 0x00,
  AT86RFX_FAILURE = 0x01,
  AT86RFX_CHANNEL_ACCESS_FAILURE = 0x02
}
 These are the return values of the RF API. More...
 

Variables

uint8_t at86rfx_rx_buffer []
 Static receive buffer that can be used to upload a frame from the trx. More...
 

#define CCA_MODE_DEFAULT   (0x01)

Default value of CCA mode.

Referenced by tal_init().

#define CLEAR_TRX_IRQ ( )
Value:
do { \
}while(0)
#define EXT_INT
Definition: conf_at86rfx.h:68
void gpio_clear_pin_interrupt_flag(uint32_t pin)
Clears the interrupt flag of a pin.
Definition: gpio.c:784

Clear the transceiver interrupts.

Referenced by ISR(), and switch_pll_on().

#define DISABLE_TRX_IRQ ( )
Value:
do { \
}while(0)
#define EXT_INT
Definition: conf_at86rfx.h:68
void gpio_disable_pin_interrupt(uint32_t pin)
Disables the interrupt of a pin.
Definition: gpio.c:760

Disable the transceiver interrupts.

Referenced by at86rfx_tx_frame(), and switch_pll_on().

#define ENABLE_TRX_IRQ ( )
Value:
do { \
}while(0)
#define EXT_INT
Definition: conf_at86rfx.h:68
uint32_t gpio_enable_pin_interrupt(uint32_t pin, uint32_t mode)
Enables the interrupt of a pin with the specified settings.
Definition: gpio.c:738
#define GPIO_RISING_EDGE
Interrupt triggered upon rising edge.
Definition: gpio.h:61

Enables the transceiver interrupts.

Referenced by at86rfx_init(), and at86rfx_tx_frame().

#define FCS_LEN   (2)

Length (in octets) of FCS.

Referenced by app_task(), at86rfx_tal_rx_frame_cb(), and at86rfx_tal_tx_status_cb().

#define FUNC_PTR   void *

Definition of a function pointer.

#define LARGE_BUFFER_SIZE   (130)

Size of the buffer allocated for transceiver reception.

#define LENGTH_FIELD_LEN   (1)

Size of the length parameter.

Referenced by at86rfx_tx_frame(), and handle_received_frame_irq().

#define MAX_CSMA_BACKOFFS_DEFAULT   (0x04)

Default value of maximum csma ca backoffs.

#define MAXBE_DEFAULT   (0x05)

Default value of maximum backoff exponent used while performing csma ca.

#define MINBE_DEFAULT   (0x03)

Default value of minimum backoff exponent used while performing csma ca.

Referenced by tal_init().

#define P_ON_TO_CLKM_ATTEMPTS
Value:
((uint8_t) \
(P_ON_TO_CLKM_AVAILABLE_MAX_US \
#define TRX_POLL_WAIT_TIME_US
Value in us used for delay between poll attempts for transceiver access.
Definition: at86rfx_driver.h:77

Ratio between max time to transceiver poll delay.

#define PHY_MAX_LENGTH   (127)

Maximum length of a phy packet.

Referenced by app_task(), and handle_received_frame_irq().

#define PLL_LOCK_ATTEMPTS   (3)

Value used for checking proper locking of PLL during switch from TRX_PFF to PLL_ON.

#define READ_ACCESS_COMMAND   (0x80)

Read access command to the transceiver.

Referenced by pal_trx_reg_read().

#define RST_HIGH ( )
Value:
do { \
} while (0);
#define TRX_RST
RESET pin of transceiver.
Definition: conf_at86rfx.h:73
void gpio_set_pin_high(uint32_t pin)
Drives a GPIO pin to 1.
Definition: gpio.c:509

Reset pin high.

Referenced by trx_init(), and trx_reset().

#define RST_LOW ( )
Value:
do { \
} while (0);
#define TRX_RST
RESET pin of transceiver.
Definition: conf_at86rfx.h:73
void gpio_set_pin_low(uint32_t pin)
Drives a GPIO pin to 0.
Definition: gpio.c:536

Reset pin low.

Referenced by trx_init(), and trx_reset().

#define SLEEP_TO_TRX_OFF_ATTEMPTS
Value:
((uint8_t) \
(SLEEP_TO_TRX_OFF_MAX_US \
#define TRX_POLL_WAIT_TIME_US
Value in us used for delay between poll attempts for transceiver access.
Definition: at86rfx_driver.h:77

Ratio between max time to transceiver poll delay.

#define SLP_TR_HIGH ( )
Value:
do { \
} while (0);
#define SLP_TR
Sleep Transceiver pin.
Definition: conf_at86rfx.h:75
void gpio_set_pin_high(uint32_t pin)
Drives a GPIO pin to 1.
Definition: gpio.c:509

Sleep pin high.

Referenced by tx_frame_config().

#define SLP_TR_LOW ( )
Value:
do { \
} while (0);
#define SLP_TR
Sleep Transceiver pin.
Definition: conf_at86rfx.h:75
void gpio_set_pin_low(uint32_t pin)
Drives a GPIO pin to 0.
Definition: gpio.c:536

Sleep pin low.

Referenced by trx_init(), trx_reset(), and tx_frame_config().

#define TRX_CMD_FR   (0x20)

Frame read command of transceiver.

Referenced by pal_trx_frame_read().

#define TRX_CMD_FW   (0x60)

Frame write command of transceiver.

Referenced by pal_trx_frame_write().

#define TRX_CMD_SR   (0x00)

SRAM read command of transceiver.

#define TRX_CMD_SW   (0x40)

SRAM write command of transceiver.

#define TRX_IRQ_DEFAULT   TRX_IRQ_TRX_END

Default interrupt configuration for transceiver.

Referenced by switch_pll_on(), and trx_config().

#define TRX_POLL_WAIT_TIME_US   (100)

Value in us used for delay between poll attempts for transceiver access.

#define WRITE_ACCESS_COMMAND   (0xC0)

Write access command of the transceiver.

Referenced by pal_trx_reg_write().

These are the return values of the RF API.

These are the return values of the RF API.

Enumerator
AT86RFX_SUCCESS 
AT86RFX_FAILURE 
AT86RFX_CHANNEL_ACCESS_FAILURE 

uint8_t at86rfx_rx_buffer[]

Static receive buffer that can be used to upload a frame from the trx.

Referenced by at86rfx_task(), and handle_received_frame_irq().