File tree Expand file tree Collapse file tree 6 files changed +25
-29
lines changed
boards/atmega256rfr2-xpro Expand file tree Collapse file tree 6 files changed +25
-29
lines changed Original file line number Diff line number Diff line change 11# configure the terminal program
22PORT_LINUX ?= /dev/ttyACM0
33PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
4- BAUD ?= 9600
4+ BAUD ?= 115200
55include $(RIOTMAKE)/tools/serial.inc.mk
66
77# Use EDBG (xplainedpro) programmer with avrdude
Original file line number Diff line number Diff line change @@ -11,7 +11,20 @@ is an evaluation kit by Microchip for their ATmega256RFR2 microcontroller.
1111### Flash the board
1212
1313You can flash the board using the on-board EDBG programmer via JTAG. Avrdude has
14- support for programming an AVR via EDBG with its xplainedpro programmer:
14+ support for programming an AVR via EDBG with its xplainedpro programmer.
15+
16+ First, make sure the default fuse settings are correct. In particular, the low
17+ byte fuse are enabling the use of the on-board 16MHz external oscillator.<br/>
18+
19+ WARNING: setting the fuses incorrectly can brick your board!
20+ ```
21+ avrdude -p m256rfr2 -c xplainedpro -U efuse:w:0xFF:m
22+ avrdude -p m256rfr2 -c xplainedpro -U hfuse:w:0x1F:m
23+ avrdude -p m256rfr2 -c xplainedpro -U lfuse:w:0xFF:m
24+ ```
25+
26+ To flash the board, just call `make` from an application directory with the
27+ `flash` target:
1528
1629```
1730make BOARD=atmega256rfr2-xpro -C examples/hello-world flash
Original file line number Diff line number Diff line change 2626extern "C" {
2727#endif
2828
29- /**
30- * @name STDIO configuration
31- *
32- * As the CPU is too slow to handle 115200 baud, we set the default
33- * baudrate to 9600 for this board
34- * @{
35- */
36- #define STDIO_UART_BAUDRATE (9600U)
37- /** @} */
38-
3929/**
4030 * @brief Use the UART 1 for STDIO on this board
4131 */
@@ -44,13 +34,11 @@ extern "C" {
4434/**
4535 * @name xtimer configuration values
4636 *
47- * Xtimer runs at 8MHz / 64 = 125kHz
37+ * Xtimer runs at 16MHz / 64 = 250kHz
4838 * @{
4939 */
50- #define XTIMER_DEV (0)
51- #define XTIMER_CHAN (0)
5240#define XTIMER_WIDTH (16)
53- #define XTIMER_HZ (125000UL )
41+ #define XTIMER_HZ (250000UL )
5442#define XTIMER_BACKOFF (40)
5543/** @} */
5644
Original file line number Diff line number Diff line change 1919#ifndef PERIPH_CONF_H
2020#define PERIPH_CONF_H
2121
22+ #include "periph_conf_atmega_common.h"
23+
2224#ifdef __cplusplus
2325extern "C" {
2426#endif
2527
26- /**
27- * @name Clock configuration
28- * @{
29- */
30- #ifndef CLOCK_CORECLOCK
31- /* Using 8MHz internal oscillator as default clock source */
32- #define CLOCK_CORECLOCK (8000000UL)
33- #endif
34- /** @} */
35-
3628#ifdef __cplusplus
3729}
3830#endif
3931
40- #include "periph_conf_atmega_common.h"
41-
4232#endif /* PERIPH_CONF_H */
Original file line number Diff line number Diff line change 1010from testrunner import run
1111
1212
13+ # On slow platforms, like AVR, this test can take some time to complete.
14+ TIMEOUT = 30
15+
16+
1317def testfunc (child ):
1418 child .expect_exact ("GPIO peripheral driver test" )
1519 child .expect_exact (">" )
@@ -33,4 +37,4 @@ def testfunc(child):
3337
3438
3539if __name__ == "__main__" :
36- sys .exit (run (testfunc , timeout = 10 ))
40+ sys .exit (run (testfunc , timeout = TIMEOUT ))
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ BOARDS_TIMER_25kHz := \
77 arduino-leonardo \
88 arduino-mega2560 \
99 arduino-uno \
10+ atmega256rfr2-xpro \
1011 atmega328p \
1112 waspmote-pro \
1213 #
You can’t perform that action at this time.
0 commit comments