From 485bfc45da633c2dca92833b0159d75077eeb9a7 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Wed, 6 Nov 2019 07:29:32 +0100 Subject: [PATCH] boards/atmega256rfr2-xpro: document how to configure the fuses This is important for a correct configuration of the external 16MHz oscillator --- boards/atmega256rfr2-xpro/doc.txt | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/boards/atmega256rfr2-xpro/doc.txt b/boards/atmega256rfr2-xpro/doc.txt index 1c7d677cad..1ac5d747a4 100644 --- a/boards/atmega256rfr2-xpro/doc.txt +++ b/boards/atmega256rfr2-xpro/doc.txt @@ -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.
+ +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