Created
October 13, 2016 08:44
-
-
Save raidoz/9e9fe7cd01fe895505d5118540f7904b to your computer and use it in GitHub Desktop.
Programm RFR2 controller with brown-out at 1.8V
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ ($# -eq 2) ]]; then | |
echo "$0 $@" | |
else | |
echo "Specify IMAGE PROGRAMMER" | |
echo "$0 main.srec mote_0101_ABCD" | |
exit 1 | |
fi | |
IMAGE=$1 | |
PROGRAMMER=$2 | |
# -OCDEN, +JTAG, +SPI, +WDTON, -EESAVE, 4K, +BOOTRST | |
HFUSE=0x88 | |
# BOD 1.8V | |
EFUSE=0xFE | |
LOCK=0xFC | |
exec avrdude -c$PROGRAMMER -pm256rfr2 -U efuse:w:$EFUSE:m -U hfuse:w:$HFUSE:m -U flash:w:$IMAGE:a -U lock:w:$LOCK:m |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment