Defines

board_stkm16.h File Reference

AT86RF230 adapter board wired to STK500 with Atmega16(L). More...

Go to the source code of this file.

Defines

#define BOARD_NAME   "stkm16"
#define BOARD_STK_M16_H   (1)
#define BOARD_TYPE   (BOARD_STKM16)
#define DDR_KEY   DDRA
#define DDR_SPI   (DDRB)
#define DDR_TRX_RESET   DDRB
#define DDR_TRX_SLPTR   DDRB
#define DEFAULT_SPI_RATE   (SPI_RATE_1_2)
#define DI_TRX_IRQ()   {GICR &= (~(TRX_IRQ));}
#define EI_TRX_IRQ()   {GICR |= (TRX_IRQ);}
#define HIF_TYPE   HIF_UART_0
#define HWTIMER_REG   (TCNT1)
#define HWTIMER_TICK   ((1.0*HWTMR_PRESCALE)/F_CPU)
#define HWTIMER_TICK_NB   (1000UL)
#define HWTMR_PRESCALE   (8)
#define INVERSE_KEYS   (0)
#define LED_DDR   DDRA
#define LED_MASK   (0xf0)
#define LED_NUMBER   (4)
#define LED_PORT   PORTA
#define LED_SHIFT   (4)
#define LEDS_INVERSE   (1)
#define MASK_KEY   (0x0f)
#define MASK_TRX_RESET   (_BV(PB0))
#define MASK_TRX_SLPTR   (_BV(PB3))
#define MAX_PACKET_BUFFERS   (2)
#define PIN_KEY   PINA
#define PORT_KEY   PORTA
#define PORT_SPI   (PORTB)
#define PORT_TRX_RESET   PORTB
#define PORT_TRX_SLPTR   PORTB
#define RADIO_TYPE   (RADIO_AT86RF230)
#define SHIFT_KEY   (0x00)
#define SPI_DATA_REG   SPDR
#define SPI_MISO   _BV(PB6)
#define SPI_MOSI   _BV(PB5)
#define SPI_SCK   _BV(PB7)
#define SPI_SELN_HIGH()   PORT_SPI |= SPI_SS; SREG = sreg
#define SPI_SELN_LOW()   uint8_t sreg = SREG; cli(); PORT_SPI &=~SPI_SS
#define SPI_SS   _BV(PB4)
#define SPI_WAITFOR()   do { while((SPSR & _BV(SPIF)) == 0);} while(0)
#define TIMER_INIT()
#define TIMER_IRQ_vect   TIMER1_COMPA_vect
#define TIMER_POOL_SIZE   (4)
#define TIMER_TICK   (HWTIMER_TICK_NB * HWTIMER_TICK)
#define TRX_IRQ   _BV(INT2)
#define TRX_IRQ_INIT()
#define TRX_IRQ_vect   INT2_vect
#define TRX_RESET_HIGH()   PORT_TRX_RESET |= MASK_TRX_RESET
#define TRX_RESET_INIT()   DDR_TRX_RESET |= MASK_TRX_RESET
#define TRX_RESET_LOW()   PORT_TRX_RESET &= ~MASK_TRX_RESET
#define TRX_SLPTR_HIGH()   PORT_TRX_SLPTR |= MASK_TRX_SLPTR
#define TRX_SLPTR_INIT()   DDR_TRX_SLPTR |= MASK_TRX_SLPTR
#define TRX_SLPTR_LOW()   PORT_TRX_SLPTR &= ~MASK_TRX_SLPTR
#define TRX_TSTAMP_REG   TCNT1
#define UART_RXBUFSIZE   (32)
#define UART_TXBUFSIZE   (128)

Detailed Description

AT86RF230 adapter board wired to STK500 with Atmega16(L).

The wiring of the radio and the ATmega is shown below:

     AVR      RF230
     ---      -----
     PB0 -->  RSTN
     PB1 <--  MCLK
     PB2 <--  IRQ (INT2)
     PB3 -->  SLPTR
     PB4 -->  SS
     PB5 -->  MOSI
     PB6 <--  MISO
     PB7 -->  SCK
     PA0:3 --> KEY0:3
     PA4:7 --> LED0:3
Fuses/Locks:
     LF: 0xe4 - 8MHz internal RC Osc.
     HF: 0x11 - without boot loader
     HF: 0x10 - with boot loader
     LOCK: 0xef - protection of boot section
Bootloader:
     Start at byte=0x3800, address=0x1c0, size = 1024 instructions/2048 bytes
Build Options

Define Documentation

#define BOARD_NAME   "stkm16"

ID String for this hardware

#define BOARD_TYPE   (BOARD_STKM16)

Board Type

#define DI_TRX_IRQ (  )     {GICR &= (~(TRX_IRQ));}

rising edge triggers INT2

#define TIMER_INIT (  ) 
Value:
do{ \
        TCCR1B |= (_BV(CS11) | _BV(WGM12)); \
        TIMSK |= _BV(OCIE1A); \
        OCR1A = 1000; \
    }while(0)
#define TRX_IRQ_INIT (  ) 
Value:
do{\
                            MCUCSR  |= _BV(ISC2);\
                          } while(0)
#define TRX_TSTAMP_REG   TCNT1

timestamp register for RX_START event


This documentation for µracoli was generated on Tue Apr 9 2013 by  doxygen 1.7.1