<?xml version="1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>m8ta fun</title>
<link type="text/css" rel="stylesheet" href="normal.css" />
<script type="text/javascript" src="fun.js"></script>
</head>
<body>
<table>
<tr> 
	<td><img src="m8talogo2.png"/></td>
	<td>
		<font size = "46" color="blue">m</font><font size="44" color="orange">8</font><font size = "46" color="blue">ta</font>
		<br/>a web-document tool
		<br/>you are not logged in, <a href="login.pl">login</a>.  

		<a href="javascript:retrievePost(-1,0,'-1')">new entry</a>
	</td>
	<td>
		<table>
				<tr>
				<form method="get" action="index.pl">
				<td><font color="gray" face="monospace">text: </font><input type="text" name="search" size = "25" /></td>
				<td><input type="Submit" value="search"/></td>
				</form>
				</tr>
			<form method="get" action="index.pl">
				<tr>
				<td><font color="gray" face="monospace">tags:</font> <input type="text" name="ptags" size = "25" /></td>
				<td><input type="Submit" value="search"/></td>
				</tr>
			</form>
			<form method="get" action="index.pl">
				<tr>
				<td><font color="gray" face="monospace">type: </font><input type="text" name="ptype" size = "25" /></td>
				<td><input type="Submit" value="search"/></td>
				</tr>
			</form>
		</table>
	</td>
</tr>
</table>
<table><div id="-2" ></div>{578} is owned by tlh24.	<div id="584">
	    <div class="head">
		    <tr>
			    <td><i><font size="+1"><font color="orange">{<a href="index.pl?pid=584">584</a>}</font></font></i></td>
				<td>
				<div align="left">
				    <a href="javascript:hide(584,'584')">hide </a>/
				    <a href="javascript:retrievePost(584,4,'584')">edit[4] </a>/
				    <a href="index.pl?pid=584&amp;print=1">print</a>
				</div>
				</td>
			    <td>
			    <div align="left">
			    <font color="gray">type:</font> <a href="index.pl?ptype=notes">notes</a> 
			    <font color="gray">tags:</font> <a href="index.pl?ptags=IIR">IIR</a> <a href="index.pl?ptags=blackfin">blackfin</a> <a href="index.pl?ptags=filter">filter</a> <a href="index.pl?ptags=paper">paper</a> <a href="index.pl?ptags=Drutarovsky">Drutarovsky</a> 
			    <font color="gray">date:</font> 07-19-2008 17:20 gmt
			    <font color="gray">revision:</font>4
			     <font color="orange">[<a href="javascript:displayPost(584,3,'584');">3</a>] [<a href="javascript:displayPost(584,2,'584');">2</a>] [<a href="javascript:displayPost(584,1,'584');">1</a>] [<a href="javascript:displayPost(584,0,'584');">0</a>] <a href="javascript:displayPost(584,-1,'584');">[head]</a></font>
			    </div>
			</td>
		</tr>
	    </div>
	    <tr><td colspan="3"><a href="images/584_1.pdf">images/584_1.pdf</a> -- this is a highly useful paper, but is no longer available on the author's website.  For the good of all, i post it here. These may also have utility: 
<ul> 
<li> <a href="http://www.analog.com/static/imported-files/application_notes/359755652155613133108374EE197.pdf">EE-197</a> -- Multicycle instructions and Latencies for the Blackfin BF531/2/3 processors. (10 stage pipeline, I think this should also applicable to the BF534/6/7 processors)</li>
<ul> 
<li> Seems like they have the pipeline well forwarded/interlocked for most of the DSP-type operations that you might want to perform (this is not so surprising).  </li>
<li> However, you should be careful with 8-word aligning 64 bit instructions to prevent instruction fetch stalls, and spreading simultaneous data reads among different sub-blocks of the data L1/SRAM. </li>
<ul> 
<li> Data sub-blocks are 4096 bytes long (0x1000).  </li> 
</ul>
</ul>
<li> <a href="http://www.analog.com/static/imported-files/application_notes/51976396264892EE171.pdf">EE-171</a> -- Multicycle instructions and latencies for the Blackfin BF535 (8 stage pipeline)</li> 
</ul></td></tr>
	</div>
	<div id="583">
	    <div class="head">
		    <tr>
			    <td><i><font size="+1"><font color="orange">{<a href="index.pl?pid=583">583</a>}</font></font></i></td>
				<td>
				<div align="left">
				    <a href="javascript:hide(583,'583')">hide </a>/
				    <a href="javascript:retrievePost(583,1,'583')">edit[1] </a>/
				    <a href="index.pl?pid=583&amp;print=1">print</a>
				</div>
				</td>
			    <td>
			    <div align="left">
			    <font color="gray">type:</font> <a href="index.pl?ptype=notes">notes</a> 
			    <font color="gray">tags:</font> <a href="index.pl?ptags=usbmon">usbmon</a> <a href="index.pl?ptags=decode">decode</a> <a href="index.pl?ptags=chart">chart</a> <a href="index.pl?ptags=linux">linux</a> <a href="index.pl?ptags=debug">debug</a> 
			    <font color="gray">date:</font> 07-16-2008 04:59 gmt
			    <font color="gray">revision:</font>1
			     <font color="orange">[<a href="javascript:displayPost(583,0,'583');">0</a>] <a href="javascript:displayPost(583,-1,'583');">[head]</a></font>
			    </div>
			</td>
		</tr>
	    </div>
	    <tr><td colspan="3">From <a href="http://www.mjmwired.net/kernel/Documentation/usb/usbmon.txt">this</a> and the USB 2.0 spec, I made this quick and totally uncomprehensive key for understanding the output of commands like
<pre>sudo cat /sys/kernel/debug/usbmon/4u
</pre>
<img src="images/583_1.png"/> 
<br/><br/>To be used with the tables from the (free) USB 2.0 spec: 
<br/><br/><img src="images/583_4.png"/>
<br/><br/><img src="images/583_3.png"/></td></tr>
	</div>
	<div id="582">
	    <div class="head">
		    <tr>
			    <td><i><font size="+1"><font color="orange">{<a href="index.pl?pid=582">582</a>}</font></font></i></td>
				<td>
				<div align="left">
				    <a href="javascript:hide(582,'582')">hide </a>/
				    <a href="javascript:retrievePost(582,0,'582')">edit[0] </a>/
				    <a href="index.pl?pid=582&amp;print=1">print</a>
				</div>
				</td>
			    <td>
			    <div align="left">
			    <font color="gray">type:</font> <a href="index.pl?ptype=notes">notes</a> 
			    <font color="gray">tags:</font> <a href="index.pl?ptags=bjork">bjork</a> <a href="index.pl?ptags=music">music</a> <a href="index.pl?ptags=life">life</a> 
			    <font color="gray">date:</font> 07-12-2008 15:46 gmt
			    <font color="gray">revision:</font>0
			     <font color="orange"><a href="javascript:displayPost(582,-1,'582');">[head]</a></font>
			    </div>
			</td>
		</tr>
	    </div>
	    <tr><td colspan="3">Bjork has a special place in my heart - and not only because of stuff like this: <a href="http://www.youtube.com/watch?v=jX9y6AA5oOo">http://www.youtube.com/watch?v=jX9y6AA5oOo</a> ;) When I was in college - not so far back as Post, but before Selmasongs - we used to play a lot of pool.  Not so much that we didn't get any work done, but enough that we started getting good.  Near the end of that year we filmed a bunch of games &amp; made a music video set to Underworld's remix of "Human Behavior".  I don't know what happened to the actual end product, but I do clearly recall my mom complaining about the repetitive beats while I was cutting the shots so the ball collisions would align with snare/bass hits.  Sometime later that year I was blown away by the real deal, the "All is full of love" music video, projected on the side of the art museum at ~ 2am when the mind is labile...  Bjork &amp; her music pervaded that period for me.  
 
I've found that music can 'tag' periods of life for me, such that when I remember the music first then the events. This winter it was Interpol, last fall was Metric, spring 2007 was Arca (you *have* to hear them!).  When me and my brother went to Portugal for a few weeks we found two Pixies mix tapes in the tiny car that my friend generously let us use. Hence, Frank Black soaked our ears while the incredible Portuguese sun soaked our skin. </td></tr>
	</div>
	<div id="581">
	    <div class="head">
		    <tr>
			    <td><i><font size="+1"><font color="orange">{<a href="index.pl?pid=581">581</a>}</font></font></i></td>
				<td>
				<div align="left">
				    <a href="javascript:hide(581,'581')">hide </a>/
				    <a href="javascript:retrievePost(581,1,'581')">edit[1] </a>/
				    <a href="index.pl?pid=581&amp;print=1">print</a>
				</div>
				</td>
			    <td>
			    <div align="left">
			    <font color="gray">type:</font> <a href="index.pl?ptype=notes">notes</a> 
			    <font color="gray">tags:</font> <a href="index.pl?ptags=android">android</a> <a href="index.pl?ptags=google">google</a> 
			    <font color="gray">date:</font> 07-09-2008 03:33 gmt
			    <font color="gray">revision:</font>1
			     <font color="orange">[<a href="javascript:displayPost(581,0,'581');">0</a>] <a href="javascript:displayPost(581,-1,'581');">[head]</a></font>
			    </div>
			</td>
		</tr>
	    </div>
	    <tr><td colspan="3">brilliant!!  source: <a href="http://code.google.com/android/images/adc1r1_deck.pdf">android winners</a>
<br/><br/><img src="images/581_1.png"/></td></tr>
	</div>
	<div id="580">
	    <div class="head">
		    <tr>
			    <td><i><font size="+1"><font color="orange">{<a href="index.pl?pid=580">580</a>}</font></font></i></td>
				<td>
				<div align="left">
				    <a href="javascript:hide(580,'580')">hide </a>/
				    <a href="javascript:retrievePost(580,1,'580')">edit[1] </a>/
				    <a href="index.pl?pid=580&amp;print=1">print</a>
				</div>
				</td>
			    <td>
			    <div align="left">
			    <font color="gray">type:</font>  
			    <font color="gray">tags:</font> <a href="index.pl?ptags=Debian">Debian</a> <a href="index.pl?ptags=Godi">Godi</a> <a href="index.pl?ptags=install">install</a> <a href="index.pl?ptags=dependencies">dependencies</a> 
			    <font color="gray">date:</font> 07-02-2008 20:27 gmt
			    <font color="gray">revision:</font>1
			     <font color="orange">[<a href="javascript:displayPost(580,0,'580');">0</a>] <a href="javascript:displayPost(580,-1,'580');">[head]</a></font>
			    </div>
			</td>
		</tr>
	    </div>
	    <tr><td colspan="3">Notes from installing Ocaml via GODI on a Debian Lenny system (oh, dependencies!): 
<ol> 
<li> be sure to install <i>libpcre3-dev</i> before starting the bootstrap2 or godi_console</li>
<li> need <i>libatlas-sse2-dev</i> (on Intel) plus <i>liblapack-dev</i> for lacaml.</li>
<li> need <i>libglut3-dev</i> to install opengl packages ; NVIDIA does not provide GLUT or even glu.h.  </li>
<li> need <i>libxmu-dev</i> to install lablgl</li>
<li> need <i>libgtk2.0-dev</i> and <i>libgtkgl2.0-dev</i> to install lablgtk2.</li> 
</ol>
<br/><br/>Final list: 
<pre>apt-get install libpcre3-dev libatlas-sse2-dev liblapack-dev libglut3-dev libxmu-dev libgtk2.0-dev libgtkgl2.0-dev
</pre></td></tr>
	</div>
	<div id="579">
	    <div class="head">
		    <tr>
			    <td><i><font size="+1"><font color="orange">{<a href="index.pl?pid=579">579</a>}</font></font></i></td>
				<td>
				<div align="left">
				    <a href="javascript:hide(579,'579')">hide </a>/
				    <a href="javascript:retrievePost(579,3,'579')">edit[3] </a>/
				    <a href="index.pl?pid=579&amp;print=1">print</a>
				</div>
				</td>
			    <td>
			    <div align="left">
			    <font color="gray">type:</font> <a href="index.pl?ptype=notes">notes</a> 
			    <font color="gray">tags:</font> <a href="index.pl?ptags=software">software</a> <a href="index.pl?ptags=debian">debian</a> <a href="index.pl?ptags=xpaint">xpaint</a> <a href="index.pl?ptags=maxima">maxima</a> <a href="index.pl?ptags=math">math</a> <a href="index.pl?ptags=mathematica">mathematica</a> 
			    <font color="gray">date:</font> 07-02-2008 14:37 gmt
			    <font color="gray">revision:</font>3
			     <font color="orange">[<a href="javascript:displayPost(579,2,'579');">2</a>] [<a href="javascript:displayPost(579,1,'579');">1</a>] [<a href="javascript:displayPost(579,0,'579');">0</a>] <a href="javascript:displayPost(579,-1,'579');">[head]</a></font>
			    </div>
			</td>
		</tr>
	    </div>
	    <tr><td colspan="3">oldies but goodies: 
<ul> 
<li> <a href="http://maxima.sourceforge.net/">Maxima</a> a computer algebra system, almost like a free version of Mathematica! </li>
<ul> 
<li> be sure to install maxima-emacs to get LaTeX prettyprinting. </li> 
</ul>
<li> [xpaint] Has a cool spring-mass-friction system where the length of the spring (the distance between cursor and paint brush) controls the width of the paint brush.  see below!</li> 
</ul>
<img src="images/579_1.png"/>
<br/><br/>Both are in Debian of course :)</td></tr>
	</div>
	<div id="502">
	    <div class="head">
		    <tr>
			    <td><i><font size="+1"><font color="orange">{<a href="index.pl?pid=502">502</a>}</font></font></i></td>
				<td>
				<div align="left">
				    <a href="javascript:hide(502,'502')">hide </a>/
				    <a href="javascript:retrievePost(502,7,'502')">edit[7] </a>/
				    <a href="index.pl?pid=502&amp;print=1">print</a>
				</div>
				</td>
			    <td>
			    <div align="left">
			    <font color="gray">type:</font> <a href="index.pl?ptype=notes">notes</a> 
			    <font color="gray">tags:</font> <a href="index.pl?ptags=nordic">nordic</a> <a href="index.pl?ptags=nrf24L01">nrf24L01</a> <a href="index.pl?ptags=state">state</a> <a href="index.pl?ptags=diagram">diagram</a> <a href="index.pl?ptags=flowchart">flowchart</a> <a href="index.pl?ptags=SPI">SPI</a> <a href="index.pl?ptags=blackfin">blackfin</a> 
			    <font color="gray">date:</font> 06-25-2008 02:44 gmt
			    <font color="gray">revision:</font>7
			     <font color="orange">[<a href="javascript:displayPost(502,6,'502');">6</a>] [<a href="javascript:displayPost(502,5,'502');">5</a>] [<a href="javascript:displayPost(502,4,'502');">4</a>] [<a href="javascript:displayPost(502,3,'502');">3</a>] [<a href="javascript:displayPost(502,2,'502');">2</a>] [<a href="javascript:displayPost(502,1,'502');">1</a>] <a href="javascript:displayPost(502,-1,'502');">[head]</a></font>
			    </div>
			</td>
		</tr>
	    </div>
	    <tr><td colspan="3"><img src="images/502_3.png"/>
<br/><br/>Outline: 
<br/><br/>The goal is to use a nRF24L01 to make an asymmetrical, bidirectional link.  The outgoing bandwidth should be maximized, ~1.5mbps, and the incoming bandwidth can be much smaller, ~17kbps, though on both channels we want guaranteed latency, &lt; 4ms for the outgoing data, and &lt; 10ms for the incoming data.  Furthermore, the processor that is being used to run this, a blackfin BF532, does not seem to play well when both SPI DMA is enabled and most CPU time is being spent in SPORT ISR reading samples &amp; processing them.  Fortunately, the SPI port and SPORT can be run synchronously (provided the SPI port is clocked fast enough), allowing the processor to run one 'thread' e.g. no interrupts.  It seem that with high-priority interrupts, the DMA engine is not able to service the SPI perfectly, and without DMA, data comes out of the SPI in drips and drabs, and cannot keep the radio's fifo full.  Hence, must program a synchronous radio controller, where states are stored in variables and not in the program counter (PC register, saved upon interrupt, etc). 
<br/><br/>As in other postings on the nRF24L01, the plan is to keep the transmit fifo full for most of the 4ms allowed by the free-running pll, then transition back into either standby-I mode, or send a status packet.  The status packet is always acknowledged by the primary receiver with a command packet, and this allows both synchronization and incoming bandwidth.  Therefore, there are 4 classes of transfers: 
<ol> 
<li> just a status packet.  After uploading, wait for TX_DS IRQ, transition to RX mode, wait for RX_DR irq, clear ce, read in the packet, and set back to TX mode. </li>
<li> one data packet + status packet.  There are timeouts on both the transmission of data packets and status packets; in this case, both have been exceeded. Here TX data state  is entered, the packet is uploaded, CE is asserted, send the status packet, wait for IRQ from both packets. This requires a transition from tx data CE high state to tx status CSN low state.</li>
<li> many data packets and one status packet.  This is the same as above, only the data transmission was triggered by a full threshold in the outgoing packet queue (in processor ram).  In this case, two packets are uploaded to the radio before waiting for a TX_DS IRQ, and, at the end of the process, we have to wait for two TX_DS IRQs after uploading the data packet. </li>
<li> many data packets.  This is straightforward - upload 2 packets, wait for 1 TX_DS IRQ, {upload another, wait for  IRQ}(until packets are gone), wait for final IRQ, set CE low. </li> 
</ol>
<br/><br/>screenshot of the derived code working (yea, my USB logic analyzer only runs on windows..yeck): 
<a href="images/502_4.png"><img src="images/502_4_thumb_33.png"/></a>
<br/><br/>old versions: 
<br/><br/><a href="images/502_1.png"><img src="images/502_1_thumb_33.png"/></a> <a href="images/502_2.png"><img src="images/502_2_thumb_33.png"/></a></td></tr>
	</div>
	<div id="577">
	    <div class="head">
		    <tr>
			    <td><i><font size="+1"><font color="orange">{<a href="index.pl?pid=577">577</a>}</font></font></i></td>
				<td>
				<div align="left">
				    <a href="javascript:hide(577,'577')">hide </a>/
				    <a href="javascript:retrievePost(577,0,'577')">edit[0] </a>/
				    <a href="index.pl?pid=577&amp;print=1">print</a>
				</div>
				</td>
			    <td>
			    <div align="left">
			    <font color="gray">type:</font> <a href="index.pl?ptype=notes">notes</a> 
			    <font color="gray">tags:</font> <a href="index.pl?ptags=grain">grain</a> <a href="index.pl?ptags=protein">protein</a> <a href="index.pl?ptags=growing">growing</a> <a href="index.pl?ptags=framing">framing</a> <a href="index.pl?ptags=feed">feed</a> <a href="index.pl?ptags=oats">oats</a> <a href="index.pl?ptags=alfalfa">alfalfa</a> <a href="index.pl?ptags=barley">barley</a> <a href="index.pl?ptags=corn">corn</a> <a href="index.pl?ptags=wheat">wheat</a> 
			    <font color="gray">date:</font> 06-18-2008 15:14 gmt
			    <font color="gray">revision:</font>0
			     <font color="orange"><a href="javascript:displayPost(577,-1,'577');">[head]</a></font>
			    </div>
			</td>
		</tr>
	    </div>
	    <tr><td colspan="3">I found this on my computer tucked away into a dusty corner.  Such fascinating information should not be left hidden - 
<br/><br/><img src="images/577_1.png"/></td></tr>
	</div>
	<div id="511">
	    <div class="head">
		    <tr>
			    <td><i><font size="+1"><font color="orange">{<a href="index.pl?pid=511">511</a>}</font></font></i></td>
				<td>
				<div align="left">
				    <a href="javascript:hide(511,'511')">hide </a>/
				    <a href="javascript:retrievePost(511,2,'511')">edit[2] </a>/
				    <a href="index.pl?pid=511&amp;print=1">print</a>
				</div>
				</td>
			    <td>
			    <div align="left">
			    <font color="gray">type:</font> <a href="index.pl?ptype=notes">notes</a> 
			    <font color="gray">tags:</font> <a href="index.pl?ptags=linux">linux</a> <a href="index.pl?ptags=rsync">rsync</a> 
			    <font color="gray">date:</font> 06-17-2008 17:36 gmt
			    <font color="gray">revision:</font>2
			     <font color="orange">[<a href="javascript:displayPost(511,1,'511');">1</a>] [<a href="javascript:displayPost(511,0,'511');">0</a>] <a href="javascript:displayPost(511,-1,'511');">[head]</a></font>
			    </div>
			</td>
		</tr>
	    </div>
	    <tr><td colspan="3">simple backups to an external usb disk: 
<pre>rsync --verbose --progress --stats --recursive --times --perms --links --del --ignore-errors /home/tlh24/ /media/usb0/
</pre>note: 
<ul> 
<li> the --del flag tells rsync to delete files in the target prior to writing them, not to delete the source files. </li>
<li> --times tells rsync to preserve file modification times. </li>
<li> for the --ignore-errors, see: <a href="http://lists.samba.org/archive/rsync/2004-June/009891.html">http://lists.samba.org/archive/rsync/2004-June/009891.html</a> - I was getting an IO error when trying to copy ~/.dbus etc. </li>
<li> otherwise, it's just rsync &lt;options&gt; &lt;source&gt; &lt;dest&gt; or so. </li> 
</ul>
</td></tr>
	</div>
</table></body></html>
