<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:default="http://www.w3.org/1999/xhtml">
  <title xmlns="http://www.w3.org/2005/Atom">Dobrica Pavlinušić's random unstructured stuff: Parallella</title>
  <id xmlns="http://www.w3.org/2005/Atom">https://saturn.ffzg.hr/rot13/</id>
  <link xmlns="http://www.w3.org/2005/Atom" type="text/html" rel="alternate" href="https://saturn.ffzg.hr/rot13/index.cgi?parallella"/>
  <link xmlns="http://www.w3.org/2005/Atom" type="application/atom+xml" rel="self" href="https://saturn.ffzg.hr%2C%20saturn.ffzg.hr:443/feed/workspace/rot13?page=parallella;type=Atom"/>
  <updated xmlns="http://www.w3.org/2005/Atom">2014-09-20T15:15:34Z</updated>
  <entry xmlns="http://www.w3.org/2005/Atom" xmlns:default="http://www.w3.org/1999/xhtml">
    <title xmlns="http://www.w3.org/2005/Atom">Parallella</title>
    <link xmlns="http://www.w3.org/2005/Atom" type="text/html" rel="alternate" href="https://saturn.ffzg.hr/rot13/index.cgi?parallella"/>
    <content xmlns="http://www.w3.org/2005/Atom" xmlns:default="http://www.w3.org/1999/xhtml" type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><div>Creator: Dobrica Pavlinušić</div><hr/><div>Tags: howto</div><hr/><div class="wiki">
<div class="nlw_phrase"><table class="wafl_container">
  <tr>
    <td>
      <div class="wafl_box">
        
          <div class="wafl_titlebox">
            <div class="wafl_title">
              
                Contents: [Dobrica Pavlinušić's random unstructured stuff]
              
            </div>
          </div>
          <div class="wafl_items">
            
              <div class="wiki">
<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#power">Dobrica Pavlinušić's random unstructured stuff (power)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] power} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#update_boot_flash">Dobrica Pavlinušić's random unstructured stuff (Update boot flash)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Update boot flash} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#gpio">Dobrica Pavlinušić's random unstructured stuff (GPIO)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] GPIO} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#fpga">Dobrica Pavlinušić's random unstructured stuff (FPGA)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] FPGA} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#headless_stream">Dobrica Pavlinušić's random unstructured stuff (headless stream)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] headless stream} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#serial">Dobrica Pavlinušić's random unstructured stuff (serial)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] serial} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#hardware">Dobrica Pavlinušić's random unstructured stuff (hardware)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] hardware} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#software">Dobrica Pavlinušić's random unstructured stuff (software)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] software} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#device_tree">Dobrica Pavlinušić's random unstructured stuff (device tree)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] device tree} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#dev">Dobrica Pavlinušić's random unstructured stuff (/dev)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] /dev} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#debian">Dobrica Pavlinušić's random unstructured stuff (Debian)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Debian} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#epiphany">Dobrica Pavlinušić's random unstructured stuff (Epiphany)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Epiphany} --></span></li>
</ul></ul>
</div>

            
            
          </div>
        
      </div>
    </td>
  </tr>
</table>
<!-- wiki: {toc: }
--></div><br/><br/><h1 id="power">power</h1>
<ul>
<li>what about power it by USB <a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?f=12&amp;t=1128">http://forums.parallella.org/viewtopic.php?f=12&amp;t=1128</a></li>
<li>2A to micro-usb connector next to the rj45 Ethernet <a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?f=50&amp;t=1081">http://forums.parallella.org/viewtopic.php?f=50&amp;t=1081</a></li>
<li>How to minimize Epiphany standby power? <a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?uid=590&amp;f=10&amp;t=1069&amp;start=0">http://forums.parallella.org/viewtopic.php?uid=590&amp;f=10&amp;t=1069&amp;start=0</a></li>
</ul>
<ul>
<li>Critical issue with non-conforming USB powered hubs. <a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?f=10&amp;t=841">http://forums.parallella.org/viewtopic.php?f=10&amp;t=841</a></li>
<li>USB port change <a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?f=10&amp;t=1072">http://forums.parallella.org/viewtopic.php?f=10&amp;t=1072</a></li>
<li>USB power fix <a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?f=50&amp;t=1510">http://forums.parallella.org/viewtopic.php?f=50&amp;t=1510</a></li>
</ul>
<ul>
<li>Where can I draw 5V for a fan ? <a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?f=23&amp;t=1049&amp;start=10">http://forums.parallella.org/viewtopic.php?f=23&amp;t=1049&amp;start=10</a></li>
</ul>
<h1 id="update_boot_flash">Update boot flash</h1>
<p>
This is required to get CR10 led working</p>
<ul>
<li><a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?f=49&amp;t=983">http://forums.parallella.org/viewtopic.php?f=49&amp;t=983</a></li>
<li><a target="_blank" title="(external link)" href="https://github.com/parallella/parallella-hw/tree/master/boards/parallella-I/firmware">https://github.com/parallella/parallella-hw/tree/master/boards/parallella-I/firmware</a></li>
</ul>
<p>
enviroment before u-boot update:</p>
<pre>
zynq-uboot&gt; env print
baudrate=115200
bitstream_image=parallella.bit.bin
bootcmd=run modeboot
bootdelay=0
devicetree_image=devicetree.dtb
devicetree_size=0x20000
ethact=zynq_gem
ethaddr=04:4f:8b:00:10:13
fdt_high=0x20000000
initrd_high=0x20000000
ipaddr=192.168.0.99
kernel_image=uImage
kernel_size=0x500000
modeboot=run qspiboot
qspiboot=echo Configuring PL and Booting Linux...;mmcinfo;fatload mmc 0 0x4000000 ${bitstream_image};fpga load 0 0x4000000 0x3dbafc;fatload mmc 0 0x3000000 ${kernel_image};fatload mmc 0 0x2A00000 ${devicetree_image};bootm 0x3000000 - 0x2A00000
serverip=192.168.0.101
stderr=serial
stdin=serial
stdout=serial

Environment size: 655/131068 bytes
</pre>
<br/><p>
flasing output:</p>
<pre>
zynq-uboot&gt; mmcinfo
Device: SDHCI
Manufacturer ID: 3
OEM: 5344
Name: SU08G 
Tran Speed: 50000000
Rd Block Len: 512
SD version 2.0
High Capacity: Yes
Capacity: 7.4 GiB
Bus Width: 4-bit
zynq-uboot&gt; fatload mmc 0 0x4000000 parallella.7020.flash.bin
reading parallella.7020.flash.bin

4351800 bytes read
zynq-uboot&gt; sf probe 0 0 0
SF: Detected N25Q128 with page size 64 KiB, total 16 MiB
zynq-uboot&gt; sf erase 0 0x1000000
SF: Successfully erased 16777216 bytes @ 0x0
zynq-uboot&gt; sf write 0x4000000 0 0x$filesize
SF: program success 4351800 bytes @ 0x0

# I skipped set ethaddr because it was already set correctly

zynq-uboot&gt; set AdaptevaSKU SKUA101040
zynq-uboot&gt; saveenv
Saving Environment to SPI Flash...
SF: Detected N25Q128 with page size 64 KiB, total 16 MiB
Erasing SPI flash...SF: Successfully erased 131072 bytes @ 0x4e0000
Writing to SPI flash...SF: program success 131072 bytes @ 0x4e0000
done


</pre>
<br/><h1 id="gpio">GPIO</h1>
<pre>
dpavlin@parallella:~/parallella-utils$ make gpiotest
gcc -o gpiotest gpiotest.c para_morse.c para_gpio.c -Wall -lrt

dpavlin@parallella:~/parallella-utils$ sudo ./gpiotest 
[sudo] password for dpavlin: 
GPIOTEST - Basic test of para_gpio

Initializing...
Success, pausing 5 seconds
Setting direction (forces output to 0!)...
Pausing 5 seconds
Reading multiple times
&gt; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
Toggling pin 100000 times...
Took 1.432 seconds, 69818 updates/sec
Write / Read test, 100000 times...
Took 2.618 seconds, 76384 ops/sec
Setting output to 0
Verifying level... OK
Disabling output and monitoring input
Gave up waiting for the input to transition
Setting output to 1
Verifying level... OK
Disabling output and monitoring input
Input flipped after 0 cycles
Closing



</pre>
<br/><h1 id="fpga">FPGA</h1>
<ul>
<li>Zynq documentation <a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?f=51&amp;t=1114">http://forums.parallella.org/viewtopic.php?f=51&amp;t=1114</a></li>
</ul>
<ul>
<li>Command-line programming <a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?uid=590&amp;f=51&amp;t=1161&amp;start=0">http://forums.parallella.org/viewtopic.php?uid=590&amp;f=51&amp;t=1161&amp;start=0</a></li>
</ul>
<pre>
sudo mknod /dev/xdevcfg c 250 0
sudo -s
cat parallella.bit.bin &gt; /dev/xdevcfg
exit

# programming time
cat /sys/devices/amba.1/f8007000.devcfg/prog_done
</pre>
<br/><ul>
<li>Routing additional Zynq hard block I/O to PEC_FPGA <a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?f=51&amp;t=1154">http://forums.parallella.org/viewtopic.php?f=51&amp;t=1154</a></li>
</ul>
<ul>
<li>Source <a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?uid=590&amp;f=10&amp;t=1069&amp;start=0">http://forums.parallella.org/viewtopic.php?uid=590&amp;f=10&amp;t=1069&amp;start=0</a></li>
</ul>
<ul>
<li>does the board contains thermal sensor(s) ? <a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?f=23&amp;t=930">http://forums.parallella.org/viewtopic.php?f=23&amp;t=930</a></li>
</ul>
<pre>
/sys/bus/iio/devices/iio:device0/in_temp0_raw
/sys/bus/iio/devices/iio:device0/in_temp0_offset
/sys/bus/iio/devices/iio:device0/in_temp0_scale

T = ((in_temp0_raw + in_temp0_offset) * in_temp0_scale) / 1000)
</pre>
<br/><p>
script:</p>
<pre>
#!/bin/bash
raw=`cat /sys/bus/iio/devices/iio:device0/in_temp0_raw`
offset=`cat /sys/bus/iio/devices/iio:device0/in_temp0_offset`
scale=`cat /sys/bus/iio/devices/iio:device0/in_temp0_scale`

c_temp=`echo "scale=1;(($raw + $offset) * $scale) / 1000" | bc`
f_temp=`echo "scale=1;(($c_temp * 9) / 5) + 32" | bc`

echo
echo "Zynq Temp: $c_temp C / $f_temp F"
echo
</pre>
<br/><p>
Modified to display temperature in loop: <span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/temp.sh?action=attachments_download;page_name=parallella;id=20140525101716-0-25570">temp.sh</a><!-- wiki: {file: temp.sh} --></span></p>
<h2 id="headless_stream">headless stream</h2>
<p>
<a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?f=48&amp;t=1213">http://forums.parallella.org/viewtopic.php?f=48&amp;t=1213</a></p>
<p>
removed html traces from device tree</p>
<h1 id="serial">serial</h1>
<ul>
<li>serial port <a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?f=10&amp;t=845">http://forums.parallella.org/viewtopic.php?f=10&amp;t=845</a></li>
</ul>
<h1 id="hardware">hardware</h1>
<ul>
<li>Eagle library available <a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?f=11&amp;t=559">http://forums.parallella.org/viewtopic.php?f=11&amp;t=559</a></li>
<li>KiCad daughter card template <a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?f=11&amp;t=1204">http://forums.parallella.org/viewtopic.php?f=11&amp;t=1204</a> <a target="_blank" title="(external link)" href="https://github.com/TiZed/Parallella_Template">https://github.com/TiZed/Parallella_Template</a></li>
<li>Parallella Case With 12V Fan <a target="_blank" title="(external link)" href="http://www.thingiverse.com/thing:273701">http://www.thingiverse.com/thing:273701</a></li>
<li>Parallella clip case <a target="_blank" title="(external link)" href="https://github.com/kyllikki/designs/tree/master/Parallella">https://github.com/kyllikki/designs/tree/master/Parallella</a></li>
<li>ARM JTAG <a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?f=10&amp;t=167">http://forums.parallella.org/viewtopic.php?f=10&amp;t=167</a></li>
<li>uboot network problems <a target="_blank" title="(external link)" href="http://forums.parallella.org/viewtopic.php?f=48&amp;t=1667&amp;p=10416&amp;hilit=devicetree#p10416">http://forums.parallella.org/viewtopic.php?f=48&amp;t=1667&amp;p=10416&amp;hilit=devicetree#p10416</a></li>
</ul>
<h1 id="software">software</h1>
<h2 id="device_tree">device tree</h2>
<pre>
sudo apt-get install device-tree-compiler

# Compiling a device tree blob from source (.dts--&gt;.dtb):
dtc -I dts -O dtb -o devicetree.dtb zynq-parallella1-headless.dts

# To get source from compiled device tree (.dtb--&gt;.dts):
dtc -I dtb -O dts -o devicetree.dts devicetree.dtb

</pre>
<br/><h2 id="dev">/dev</h2>
<p>
see how to modify devicetree at <a target="_blank" title="(external link)" href="http://elinux.org/Parallella_Speed_Up_Ubuntu">http://elinux.org/Parallella_Speed_Up_Ubuntu</a></p>
<h2 id="debian">Debian</h2>
<p>
<a target="_blank" title="(external link)" href="http://elinux.org/Parallella_Debian">http://elinux.org/Parallella_Debian</a></p>
<h2 id="epiphany">Epiphany</h2>
<ul>
<li>cgminer <a target="_blank" title="(external link)" href="https://github.com/LordRafa/cgminer">https://github.com/LordRafa/cgminer</a></li>
</ul>
</div>
<hr/><div>Attachments: temp.sh</div></div>
    </content>
    <id xmlns="http://www.w3.org/2005/Atom">https://saturn.ffzg.hr/rot13/index.cgi?parallella</id>
    <author xmlns="http://www.w3.org/2005/Atom">
      <name xmlns="http://www.w3.org/2005/Atom">Dobrica Pavlinušić</name>
    </author>
    <updated xmlns="http://www.w3.org/2005/Atom">2014-09-20T15:15:34Z</updated>
    <category xmlns="http://www.w3.org/2005/Atom" term="howto" label="howto"/>
  </entry>
</feed>
