Contiki-NG
Loading...
Searching...
No Matches
at86rf215-arch.h File Reference

Header file for the at86rf215-arch.c - architecture dependent code. More...

#include <stdint.h>

Go to the source code of this file.

Functions

void at86rf215_arch_init (void)
 Initialize the radio's I/O periphery.
 
void at86rf215_arch_set_RSTN (void)
 Reset the radio.
 
void at86rf215_arch_clear_RSTN (void)
 Release the radio from the reset mode.
 
void at86rf215_arch_enable_EXTI (void)
 Enable the radio's IRQ line.
 
void at86rf215_arch_disable_EXTI (void)
 Disable the radio's IRQ line.
 
void at86rf215_arch_spi_select (void)
 Select the radio's SPI chip select.
 
void at86rf215_arch_spi_deselect (void)
 Deselect the radio's SPI chip select.
 
uint8_t at86rf215_arch_spi_txrx (uint8_t b)
 Transfer and receive a single byte over SPI.
 
void at86rf215_isr (void)
 Interrupt routine.
 

Detailed Description

Header file for the at86rf215-arch.c - architecture dependent code.

Author
Grega Morano grega.nosp@m..mor.nosp@m.ano@i.nosp@m.js.s.nosp@m.i

Definition in file at86rf215-arch.h.

Function Documentation

◆ at86rf215_arch_init()

void at86rf215_arch_init ( void )

Initialize the radio's I/O periphery.

The function has to accomplish the following tasks:

  • Configure RST pin
  • Configure IRQ pin and setup the interrupt
  • Configure CSn pin
  • Enable and configure SPI

Definition at line 118 of file at86rf215-arch.c.

References at86rf215_arch_clear_RSTN(), GPIO_CLR_PIN, GPIO_DETECT_EDGE, GPIO_DETECT_FALLING, gpio_hal_register_handler(), GPIO_SET_INPUT, GPIO_SET_OUTPUT, GPIO_SET_PIN, GPIO_SOFTWARE_CONTROL, GPIO_TRIGGER_SINGLE_EDGE, GPT1A_IRQn, IOC_OVERRIDE_PUE, ioc_set_over(), SMT_IRQn, spix_cs_init(), spix_init(), spix_set_clock_freq(), spix_set_mode(), SSI0_BASE, SSI0_IRQn, SSI_CR0_FRF_MOTOROLA, and SSI_IM.

◆ at86rf215_arch_set_RSTN()

void at86rf215_arch_set_RSTN ( void )

Reset the radio.

The radio Reset is triggered by pulling the pin RSTN to low, keeping it low for 625ns and than release it to high.

Definition at line 84 of file at86rf215-arch.c.

References GPIO_CLR_PIN.

◆ at86rf215_arch_spi_txrx()

uint8_t at86rf215_arch_spi_txrx ( uint8_t b)

Transfer and receive a single byte over SPI.

Parameters
bByte to be sent
Returns
Byte received

Definition at line 108 of file at86rf215-arch.c.

Referenced by burstRead(), burstWrite(), regRead(), and regWrite().

◆ at86rf215_isr()

void at86rf215_isr ( void )

Interrupt routine.

To be called by the hardware interrupt handler - part of at86rf215-arch.c

Interrupt routine.

This function is called by the GPIO interrupt handler. The interrupt can be triggered by the radio (RF) or the baseband part (BBC). Depending on the predefined frequency band, correct register addresses are used to read the interrupt states. The states are then used to set the corresponding flags. To clear the IRQ line, all 4 interrupts registers must be read.

Definition at line 811 of file at86rf215.c.

References flags, process_poll(), regRead(), RTIMER_NOW, and rx_frame.