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 1
1
# configure the terminal program
2
2
PORT_LINUX ?= /dev/ttyACM0
3
3
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
4
- BAUD ?= 9600
4
+ BAUD ?= 115200
5
5
include $(RIOTMAKE)/tools/serial.inc.mk
6
6
7
7
# 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.
11
11
### Flash the board
12
12
13
13
You 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:
15
28
16
29
```
17
30
make BOARD=atmega256rfr2-xpro -C examples/hello-world flash
Original file line number Diff line number Diff line change 26
26
extern "C" {
27
27
#endif
28
28
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
-
39
29
/**
40
30
* @brief Use the UART 1 for STDIO on this board
41
31
*/
@@ -44,13 +34,11 @@ extern "C" {
44
34
/**
45
35
* @name xtimer configuration values
46
36
*
47
- * Xtimer runs at 8MHz / 64 = 125kHz
37
+ * Xtimer runs at 16MHz / 64 = 250kHz
48
38
* @{
49
39
*/
50
- #define XTIMER_DEV (0)
51
- #define XTIMER_CHAN (0)
52
40
#define XTIMER_WIDTH (16)
53
- #define XTIMER_HZ (125000UL )
41
+ #define XTIMER_HZ (250000UL )
54
42
#define XTIMER_BACKOFF (40)
55
43
/** @} */
56
44
Original file line number Diff line number Diff line change 19
19
#ifndef PERIPH_CONF_H
20
20
#define PERIPH_CONF_H
21
21
22
+ #include "periph_conf_atmega_common.h"
23
+
22
24
#ifdef __cplusplus
23
25
extern "C" {
24
26
#endif
25
27
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
-
36
28
#ifdef __cplusplus
37
29
}
38
30
#endif
39
31
40
- #include "periph_conf_atmega_common.h"
41
-
42
32
#endif /* PERIPH_CONF_H */
Original file line number Diff line number Diff line change 10
10
from testrunner import run
11
11
12
12
13
+ # On slow platforms, like AVR, this test can take some time to complete.
14
+ TIMEOUT = 30
15
+
16
+
13
17
def testfunc (child ):
14
18
child .expect_exact ("GPIO peripheral driver test" )
15
19
child .expect_exact (">" )
@@ -33,4 +37,4 @@ def testfunc(child):
33
37
34
38
35
39
if __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 := \
7
7
arduino-leonardo \
8
8
arduino-mega2560 \
9
9
arduino-uno \
10
+ atmega256rfr2-xpro \
10
11
atmega328p \
11
12
waspmote-pro \
12
13
#
You can’t perform that action at this time.
0 commit comments