board.h File Reference

Board specific definitions for the Jiminy Mega 256rfr2 board. More...

Detailed Description

Board specific definitions for the Jiminy Mega 256rfr2 board.

Author
Josua Arndt jarnd.nosp@m.t@ia.nosp@m.s.rwt.nosp@m.h-aa.nosp@m.chen..nosp@m.de
Steffen Robertz steff.nosp@m.en.r.nosp@m.obert.nosp@m.z@rw.nosp@m.th-aa.nosp@m.chen.nosp@m..de

Definition in file board.h.

#include "cpu.h"
+ Include dependency graph for board.h:

Go to the source code of this file.

Functions

void board_init (void)
 Initialize board specific hardware, including clock, LEDs and std-IO.
 

Baudrate for STDIO terminal

The standard configuration for STDIO in spu/atmega_comman/periph/uart.c is to use double speed.

For 8MHz F_CPU following Baudrate have good error rates 76923 38400

Matches this with BAUD in Board/Makefile.include

#define STDIO_UART_BAUDRATE   (38400U)
 Sets Baudrate for e.g. More...
 

LED pin definitions and handlers

#define LED_PORT   PORTB
 
#define LED_PORT_DDR   DDRB
 
#define LED0_PIN   GPIO_PIN(1, 5)
 
#define LED1_PIN   GPIO_PIN(1, 6)
 
#define LED2_PIN   GPIO_PIN(1, 7)
 
#define LED0_MASK   (1 << DDB5)
 
#define LED1_MASK   (1 << DDB6)
 
#define LED2_MASK   (1 << DDB7)
 
#define LED0_ON   (LED_PORT |= LED0_MASK)
 
#define LED0_OFF   (LED_PORT &= ~LED0_MASK)
 
#define LED0_TOGGLE   (LED_PORT ^= LED0_MASK)
 
#define LED1_ON   (LED_PORT |= LED1_MASK)
 
#define LED1_OFF   (LED_PORT &= ~LED1_MASK)
 
#define LED1_TOGGLE   (LED_PORT ^= LED1_MASK)
 
#define LED2_ON   (LED_PORT |= LED2_MASK)
 
#define LED2_OFF   (LED_PORT &= ~LED2_MASK)
 
#define LED2_TOGGLE   (LED_PORT ^= LED2_MASK)
 

White LED light is used to signal ERROR.

#define LED_PANIC   (LED_PORT |= LED2_MASK | LED1_MASK | LED0_MASK)
 

xtimer configuration values

#define XTIMER_DEV   TIMER_DEV(0)
 
#define XTIMER_CHAN   (0)
 
#define XTIMER_WIDTH   (16)
 
#define XTIMER_HZ   (125000UL)
 

Indicate Watchdog cleared in bootloader an

AVR CPUs need to reset the Watchdog as fast as possible.

This flag indicates that the watchdog is reseted in the bootloader and that the MCUSR value is stored in register 2 (r2)

#define BOOTLOADER_CLEARS_WATCHDOG_AND_PASSES_MCUSR   1
 
#define BOOTLOADER_CLEARS_WATCHDOG_AND_PASSES_MCUSR   1
 

CPU clock scale for jiminy-megarfr256rfr2

The CPU can not be used with the external xtal oscillator if the core should be put in sleep while the transceiver is in rx mode.

It seems the as teh peripheral clock divider is set to 1 and this all clocks of the timer, etc run with 16MHz increasing power consumption.

#define CPU_ATMEGA_CLK_SCALE_INIT   CPU_ATMEGA_CLK_SCALE_DIV1
 

TPS6274x Stepdown config

#define TPS6274X_PARAMS
 

Macro Definition Documentation

◆ STDIO_UART_BAUDRATE

#define STDIO_UART_BAUDRATE   (38400U)

Sets Baudrate for e.g.

Shell

Definition at line 44 of file board.h.

◆ TPS6274X_PARAMS

#define TPS6274X_PARAMS
Value:
{ .vsel = { GPIO_PIN(PORT_D, 6), \
GPIO_PIN(PORT_D, 7), \
GPIO_PIN(PORT_G, 0), \
GPIO_PIN(PORT_G, 2), \
}, \
.ctrl_pin = GPIO_PIN(PORT_G, 5) \
}
port D
Definition: periph_cpu.h:39
port G
Definition: periph_cpu.h:42
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition: periph_cpu.h:35

Definition at line 131 of file board.h.