1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #12649 from aabadie/pr/boards/atmega256rfr2-xpro_fixes

boards/atmega256rfr2-xpro: update clock configuration/stdio baudrate + a test timeout
This commit is contained in:
Marian Buschsieweke 2019-11-06 15:21:32 +01:00 committed by GitHub
commit cd298b9c4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 25 additions and 29 deletions

View File

@ -1,7 +1,7 @@
# configure the terminal program
PORT_LINUX ?= /dev/ttyACM0
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
BAUD ?= 9600
BAUD ?= 115200
include $(RIOTMAKE)/tools/serial.inc.mk
# Use EDBG (xplainedpro) programmer with avrdude

View File

@ -11,7 +11,20 @@ is an evaluation kit by Microchip for their ATmega256RFR2 microcontroller.
### Flash the board
You can flash the board using the on-board EDBG programmer via JTAG. Avrdude has
support for programming an AVR via EDBG with its xplainedpro programmer:
support for programming an AVR via EDBG with its xplainedpro programmer.
First, make sure the default fuse settings are correct. In particular, the low
byte fuse are enabling the use of the on-board 16MHz external oscillator.<br/>
WARNING: setting the fuses incorrectly can brick your board!
```
avrdude -p m256rfr2 -c xplainedpro -U efuse:w:0xFF:m
avrdude -p m256rfr2 -c xplainedpro -U hfuse:w:0x1F:m
avrdude -p m256rfr2 -c xplainedpro -U lfuse:w:0xFF:m
```
To flash the board, just call `make` from an application directory with the
`flash` target:
```
make BOARD=atmega256rfr2-xpro -C examples/hello-world flash

View File

@ -26,16 +26,6 @@
extern "C" {
#endif
/**
* @name STDIO configuration
*
* As the CPU is too slow to handle 115200 baud, we set the default
* baudrate to 9600 for this board
* @{
*/
#define STDIO_UART_BAUDRATE (9600U)
/** @} */
/**
* @brief Use the UART 1 for STDIO on this board
*/
@ -44,13 +34,11 @@ extern "C" {
/**
* @name xtimer configuration values
*
* Xtimer runs at 8MHz / 64 = 125kHz
* Xtimer runs at 16MHz / 64 = 250kHz
* @{
*/
#define XTIMER_DEV (0)
#define XTIMER_CHAN (0)
#define XTIMER_WIDTH (16)
#define XTIMER_HZ (125000UL)
#define XTIMER_HZ (250000UL)
#define XTIMER_BACKOFF (40)
/** @} */

View File

@ -19,24 +19,14 @@
#ifndef PERIPH_CONF_H
#define PERIPH_CONF_H
#include "periph_conf_atmega_common.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @name Clock configuration
* @{
*/
#ifndef CLOCK_CORECLOCK
/* Using 8MHz internal oscillator as default clock source */
#define CLOCK_CORECLOCK (8000000UL)
#endif
/** @} */
#ifdef __cplusplus
}
#endif
#include "periph_conf_atmega_common.h"
#endif /* PERIPH_CONF_H */

View File

@ -10,6 +10,10 @@ import sys
from testrunner import run
# On slow platforms, like AVR, this test can take some time to complete.
TIMEOUT = 30
def testfunc(child):
child.expect_exact("GPIO peripheral driver test")
child.expect_exact(">")
@ -33,4 +37,4 @@ def testfunc(child):
if __name__ == "__main__":
sys.exit(run(testfunc, timeout=10))
sys.exit(run(testfunc, timeout=TIMEOUT))

View File

@ -7,6 +7,7 @@ BOARDS_TIMER_25kHz := \
arduino-leonardo \
arduino-mega2560 \
arduino-uno \
atmega256rfr2-xpro \
atmega328p \
waspmote-pro \
#