Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 30 additions & 9 deletions boards/mega-xplained/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,49 @@ is an evaluation kit by Atmel (now Microchip) for their ATmega1284P microcontrol

### Flash the board

1. The board may be flashed through JTAG or using a SPI ISP programmer. If
the Buspirate is being used, then `make flash` can be used to flash the
board:
```
make BOARD=mega-xplained -C examples/hello-world flash
```
You can change the fuses and flash the board using an SPI ISP programmer such
as the Bus Pirate, or using a JTAG programmer such as the Atmel-ICE with a
JTAG adapter.

If using the Atmel-ICE as a JTAG programmer, connect the adapter with the
square pin on the adapter connecting with the square pin on the board.

1. First, make sure the default fuse settings are correct.<br/>

WARNING: setting the fuses incorrectly can brick your board!

2. The default fuse settings must also be changed.<br/>
If using the Buspirate:
```
avrdude -p m1284p -c buspirate -P /dev/ttyUSB0 -U efuse:w:0xFF:m
avrdude -p m1284p -c buspirate -P /dev/ttyUSB0 -U hfuse:w:0x99:m
avrdude -p m1284p -c buspirate -P /dev/ttyUSB0 -U lfuse:w:0xE2:m
```
WARNING: setting the fuses incorrectly can brick your board!

If using the Atmel-ICE:
```
avrdude -p m1284p -c atmelice -U efuse:w:0xFF:m
avrdude -p m1284p -c atmelice -U hfuse:w:0x99:m
avrdude -p m1284p -c atmelice -U lfuse:w:0xE2:m
Comment thread
danpetry marked this conversation as resolved.
```

2. After the fuses are set, flash the application.

If using the Buspirate:
```
BOARD=mega-xplained make -C examples/hello-world flash
```

If using the Atmel-ICE:
```
BOARD=mega-xplained PROGRAMMER=atmelice make -C examples/hello-world flash
```

### Accessing STDIO via UART

STDIO can be accessed through the USB connector. The on-board UART-USB
adapter is not affected by flashing. It shows up as /dev/ttyACM0 on Linux.
It will be used automatically with `make term`:
```
make BOARD=mega-xplained -C examples/hello-world term
BOARD=mega-xplained make -C examples/hello-world term
```
*/