aboutsummaryrefslogblamecommitdiff
path: root/sw/configure-fpga.sh
blob: 7ebfb6ba769410e49862485848b91d3a3c9d1cf7 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13












                                                             
#!/bin/sh -
bitfile="${1-novena_eim.bit}"
echo "Setting export of reset pin"
echo 135 > /sys/class/gpio/export
echo "setting reset pin to out"
echo out > /sys/class/gpio/gpio135/direction
echo "flipping reset"                       
echo 0 > /sys/class/gpio/gpio135/value
echo 1 > /sys/class/gpio/gpio135/value
echo "configuring FPGA"               
dd if=${bitfile} of=/dev/spidev2.0 bs=128
echo "turning on clock to FPGA"                              
devmem3 0x020c8160 w 0x00000D2B