<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://elinux.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://elinux.org/api.php?action=feedcontributions&amp;user=Richarsm&amp;feedformat=atom</id>
		<title>eLinux.org - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://elinux.org/api.php?action=feedcontributions&amp;user=Richarsm&amp;feedformat=atom"/>
		<link rel="alternate" type="text/html" href="http://elinux.org/Special:Contributions/Richarsm"/>
		<updated>2013-05-18T06:22:30Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.21alpha</generator>

	<entry>
		<id>http://elinux.org/Ti_AM33XX_PRUSSv2</id>
		<title>Ti AM33XX PRUSSv2</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/Ti_AM33XX_PRUSSv2"/>
				<updated>2013-05-16T23:45:33Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: /* Resources */ typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The PRUSS (Programmable Real-time Unit Sub System) consists of two 32-bit 200MHz real-time cores, each with 8KB of program memory and direct access to general I/O.&lt;br /&gt;
These cores are connected to various data memories, peripheral modules and an interrupt controller for access to the entire system-on-a-chip via a 32-bit interconnect bus.&lt;br /&gt;
&lt;br /&gt;
PRUs are programmed in [http://en.wikipedia.org/wiki/Assembly_language Assembly], with most commands executing in a single cycle with no caching or pipe-lining, allowing for 100% predictable timings. At 200MHz, a single cycle most operations will take 5ns (nanoseconds) with exception of accessing memory external to PRU to execute.&lt;br /&gt;
&lt;br /&gt;
====This is a Work In Progress====&lt;br /&gt;
&lt;br /&gt;
== Available PRU Resources ==&lt;br /&gt;
[[File:PRUSS.png|AM335x PRUSS]]&lt;br /&gt;
&lt;br /&gt;
[[PRUSSv2 Memory Map|Click here for a full list of register mappings.]]&lt;br /&gt;
&lt;br /&gt;
=== Per PRU ===&lt;br /&gt;
; 8KB program memory&lt;br /&gt;
: Memory used to store instructions and static data AKA Instruction Memory (IRAM). This is the memory in which PRU programs are loaded.&lt;br /&gt;
&lt;br /&gt;
; Enhanced GPIO (EGPIO)&lt;br /&gt;
: High-speed direct access to 16 general purpose output and 17 general purpose input pins for each PRU.&lt;br /&gt;
:; PRU0&lt;br /&gt;
:: ''pr1_pru_0_pru_r30[15:0]'' (PRU0 Register R30 Outputs)&lt;br /&gt;
:: ''pr1_pru_0_pru_r31[16:0]'' (PRU0 Register R31 Inputs)&lt;br /&gt;
:; PRU1&lt;br /&gt;
:: ''pr1_pru_1_pru_r30[15:0]'' (PRU1 Register R30 Outputs)&lt;br /&gt;
:: ''pr1_pru_1_pru_r31[16:0]'' (PRU1 Register R31 Inputs)&lt;br /&gt;
:; Hardware capture modes&lt;br /&gt;
:: Serial 28-bit shift in and out.&lt;br /&gt;
:: Parallel 16-bit capture on clock.&lt;br /&gt;
:: [http://en.wikipedia.org/wiki/Media_Independent_Interface| MII] standardised capture mode, used for implementing media independent Fast Ethernet (100Mbps - 25MHz 4-bit).&lt;br /&gt;
&lt;br /&gt;
; A 32-bit multiply and accumulate unit (MAC)&lt;br /&gt;
: Enables single-cycle integer multiplications with a 64-bit overflow (useful for decimal results).&lt;br /&gt;
&lt;br /&gt;
; 8KB data memory&lt;br /&gt;
: Memory used to store dynamic data. Is accessed over the 32-bit bus and so not single-cycle.&lt;br /&gt;
: One PRU may access the memory of another for passing information but it is recommend to use scratch pad or shared memory, see below.&lt;br /&gt;
&lt;br /&gt;
; [http://en.wikipedia.org/wiki/Open_Core_Protocol| Open Core Protocol] (OCP) master port&lt;br /&gt;
: Access to the data bus that interconnects all peripherals on the SoC, including the ARM Cortex-A8, used for data transfer directly to and from the PRU in Level 3 (L3) memory space.&lt;br /&gt;
&lt;br /&gt;
=== Shared Between PRUs ===&lt;br /&gt;
; Scratch pad&lt;br /&gt;
: 3 banks of 30 32-bit registers (total 90 32-bit registers).&lt;br /&gt;
: Single-cycle access, can be accessed from either PRU for data sharing and signalling or for individual use.&lt;br /&gt;
&lt;br /&gt;
; 12KB data memory&lt;br /&gt;
: Accessed over the 32-but bus, not single-cycle.&lt;br /&gt;
&lt;br /&gt;
=== Local Peripherals ===&lt;br /&gt;
Local peripherals are those present within the PRUSS and not those belonging to the entire SoC. Peripherals are accessed from PRUs over the Switched Central Resource (SCR) 32-bit bus within the PRUSS.&lt;br /&gt;
&lt;br /&gt;
Attached to the SCR bus is also an OCP slave, enabling OCP masters from outside of the PRUSS to access these local peripherals in Level 4 (L4) memory space.&lt;br /&gt;
&lt;br /&gt;
; Enhanced Capture Model (eCAP)&lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
; Industrial Ethernet Peripheral (IEP)&lt;br /&gt;
&lt;br /&gt;
; Universal Asynchronous Receiver/Transmitter (UART0)&lt;br /&gt;
: Used to perform serial data transmission to the TL16C550 industry standard.&lt;br /&gt;
: 16-bit FIFO receive and transmit buffers + per byte error status.&lt;br /&gt;
: Can generate Interrupt requests for the PRUSS Interrupt Controller.&lt;br /&gt;
: Can generate DMA requests for the EDMA SoC DMA controller.&lt;br /&gt;
: Maximum transmission speed of 192MHz (192Mbps - 24MB/s).&lt;br /&gt;
&lt;br /&gt;
== Communication ==&lt;br /&gt;
Communication between various elements of the PRUSS or the wider SoC may take place either directly, over a bus, via interrupts or via DMA.&lt;br /&gt;
&lt;br /&gt;
The following lists will expose all possible communication approaches for each likely scenario.&lt;br /&gt;
&lt;br /&gt;
For communication via interrupts, please first read the section on the [[PRUSSv2 Interrupt Controller]].&lt;br /&gt;
&lt;br /&gt;
[[PRUSSv2 Interrupts| Click here for a full list of PRUSS Interrupts.]]&lt;br /&gt;
&lt;br /&gt;
The current [https://github.com/beagleboard/am335x_pru_package/blob/master/pru_sw/app_loader/interface/prussdrv.c example PRU loader] uses [http://arago-project.org/git/projects/?p=linux-am33x.git;a=commit;h=f1a304e7941cc76353363a139cbb6a4b1ca7c737 UIO], but this ideally should be replaced with [http://omappedia.org/wiki/Category:RPMsg remoteproc] rather than poking at the registers from userspace. In the mean time, according to [https://groups.google.com/d/msg/beagleboard/gqCjxh4uZi0/_uIUD8ZF88QJ this discussion:] we can use the included script and load the uio_pruss userspace driver.&lt;br /&gt;
&lt;br /&gt;
=== PRU to Host (PRU to ARM Cortex-A8) ===&lt;br /&gt;
Include the uio_pruss kernel driver by using '''modprobe uio_pruss''' or the steps outlined above, if that does not work.&lt;br /&gt;
Then in a project include the header files for the am335x_pru_package.&lt;br /&gt;
&lt;br /&gt;
    #define PRU_NUM0	  0&lt;br /&gt;
    // Driver header file&lt;br /&gt;
    #include &amp;lt;prussdrv.h&amp;gt;&lt;br /&gt;
    #include &amp;lt;pruss_intc_mapping.h&amp;gt;	 &lt;br /&gt;
&lt;br /&gt;
/* Then, initialize the interrupt controller data */&lt;br /&gt;
    tpruss_intc_initdata pruss_intc_initdata = PRUSS_INTC_INITDATA;&lt;br /&gt;
/* Initialize the PRU */&lt;br /&gt;
    prussdrv_init ();&lt;br /&gt;
/* Get the interrupt initialized */&lt;br /&gt;
    prussdrv_pruintc_init(&amp;amp;pruss_intc_initdata)&lt;br /&gt;
&lt;br /&gt;
/* Execute example on PRU0 where first argument is the PRU# and second is the assembly to execute*/&lt;br /&gt;
    prussdrv_exec_program (PRU_NUM0, &amp;quot;./example.bin&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
/* Wait until PRU0 sends the interrupt*/&lt;br /&gt;
    prussdrv_pru_wait_event (PRU_EVTOUT_0);&lt;br /&gt;
/* Clear the interrupt*/&lt;br /&gt;
    prussdrv_pru_clear_event (PRU0_ARM_INTERRUPT);&lt;br /&gt;
&lt;br /&gt;
The PRU (in this case 0) will have the following in the example.bin file to trigger the interrupt:&lt;br /&gt;
    #define PRU0_ARM_INTERRUPT      19&lt;br /&gt;
    MOV       r31.b0, PRU0_ARM_INTERRUPT+16&lt;br /&gt;
&lt;br /&gt;
Register 31 allows for control of the INTC for the PRU.&lt;br /&gt;
&lt;br /&gt;
=== Host to PRU (ARM Cortex-A8 to PRU) ===&lt;br /&gt;
==== Interrupts ====&lt;br /&gt;
Each PRU has access to host interrupt channels Host-0 and Host-1 through register R31 bit 30 and bit 31 respectively.&lt;br /&gt;
By probing these registers, a PRU can determine if an interrupt is currently present on each host channel.&lt;br /&gt;
&lt;br /&gt;
To configure &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PRU to external peripherals ===&lt;br /&gt;
=== External peripherals to PRU ===&lt;br /&gt;
=== PRU to internal peripherals ===&lt;br /&gt;
=== Internal peripherals to PRU ===&lt;br /&gt;
&lt;br /&gt;
== Loading a PRU Program ==&lt;br /&gt;
&lt;br /&gt;
==Beaglebone PRU connections and modes==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|'''PRU #'''&lt;br /&gt;
|'''R30(input) bit'''&lt;br /&gt;
|'''Pinmux Mode'''&lt;br /&gt;
|'''R31(output) bit'''&lt;br /&gt;
|'''Pinmux Mode'''&lt;br /&gt;
|'''BB Header'''&lt;br /&gt;
|'''BB Pin Name'''&lt;br /&gt;
|'''ZCZ BallName'''&lt;br /&gt;
|'''Offset Reg'''&lt;br /&gt;
|'''DT Offset'''&lt;br /&gt;
|'''Input Mode'''&lt;br /&gt;
|'''Output Mode'''&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|0&lt;br /&gt;
|Mode_6&lt;br /&gt;
|0&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_31&lt;br /&gt;
|SPI1_SCLK&lt;br /&gt;
|mcasp0_aclkx&lt;br /&gt;
|990h&lt;br /&gt;
|0x190&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|1&lt;br /&gt;
|Mode_6&lt;br /&gt;
|1&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_31&lt;br /&gt;
|SPI1_D0&lt;br /&gt;
|mcasp0_fsx&lt;br /&gt;
|994h&lt;br /&gt;
|0x194&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|2&lt;br /&gt;
|Mode_6&lt;br /&gt;
|2&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_30&lt;br /&gt;
|SPI1_D1&lt;br /&gt;
|mcasp0_axr0&lt;br /&gt;
|998h&lt;br /&gt;
|0x198&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|3&lt;br /&gt;
|Mode_6&lt;br /&gt;
|3&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_28&lt;br /&gt;
|SPI1_CS0&lt;br /&gt;
|mcasp0_ahclkr&lt;br /&gt;
|99Ch&lt;br /&gt;
|0x19C&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|4&lt;br /&gt;
|Mode_6&lt;br /&gt;
|4&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_42&lt;br /&gt;
|&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;(*note1)&amp;lt;/span&amp;gt;&lt;br /&gt;
|mcasp0_aclkr&lt;br /&gt;
|9A0h&lt;br /&gt;
|0x1A0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|5&lt;br /&gt;
|Mode_6&lt;br /&gt;
|5&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_27&lt;br /&gt;
|GPIO3_19&lt;br /&gt;
|mcasp0_fsr&lt;br /&gt;
|9A4h&lt;br /&gt;
|0x1A4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|6&lt;br /&gt;
|Mode_6&lt;br /&gt;
|6&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_41&lt;br /&gt;
|&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;(*note2)&amp;lt;/span&amp;gt;&lt;br /&gt;
|mcasp0_axr1&lt;br /&gt;
|9A8h&lt;br /&gt;
|0x1A8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|7&lt;br /&gt;
|Mode_6&lt;br /&gt;
|7&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_25&lt;br /&gt;
|GPIO3_21&lt;br /&gt;
|mcasp0_ahclkx&lt;br /&gt;
|9ACh&lt;br /&gt;
|0x1AC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|14&lt;br /&gt;
|Mode_6&lt;br /&gt;
|P8_12&lt;br /&gt;
|GPIO1_12&lt;br /&gt;
|gpmc_ad12&lt;br /&gt;
|830h&lt;br /&gt;
|0x030&lt;br /&gt;
|NA&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|15&lt;br /&gt;
|Mode_6&lt;br /&gt;
|P8_11&lt;br /&gt;
|GPIO1_13&lt;br /&gt;
|gpmc_ad9&lt;br /&gt;
|824h&lt;br /&gt;
|0x024&lt;br /&gt;
|NA&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|14&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P8_16&lt;br /&gt;
|GPIO1_14&lt;br /&gt;
|gpmc_ad14&lt;br /&gt;
|838h&lt;br /&gt;
|0x038&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|15&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P8_15&lt;br /&gt;
|GPIO1_15&lt;br /&gt;
|gpmc_ad15&lt;br /&gt;
|83Ch&lt;br /&gt;
|0x03C&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|16&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P9_24&lt;br /&gt;
|UART1_TXD&lt;br /&gt;
|uart1_txd&lt;br /&gt;
|984h&lt;br /&gt;
|0x184&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|0&lt;br /&gt;
|Mode_6&lt;br /&gt;
|0&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_45&lt;br /&gt;
|GPIO2_6&lt;br /&gt;
|lcd_data0&lt;br /&gt;
|8A0h&lt;br /&gt;
|0x0A0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|1&lt;br /&gt;
|Mode_6&lt;br /&gt;
|1&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_46&lt;br /&gt;
|GPIO2_7&lt;br /&gt;
|lcd_data1&lt;br /&gt;
|8A4h&lt;br /&gt;
|0x0A4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|2&lt;br /&gt;
|Mode_6&lt;br /&gt;
|2&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_43&lt;br /&gt;
|GPIO2_8&lt;br /&gt;
|lcd_data2&lt;br /&gt;
|8A8h&lt;br /&gt;
|0x0A8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|3&lt;br /&gt;
|Mode_6&lt;br /&gt;
|3&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_44&lt;br /&gt;
|GPIO2_9&lt;br /&gt;
|lcd_data3&lt;br /&gt;
|8ACh&lt;br /&gt;
|0x0AC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|4&lt;br /&gt;
|Mode_6&lt;br /&gt;
|4&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_41&lt;br /&gt;
|GPIO2_10&lt;br /&gt;
|lcd_data4&lt;br /&gt;
|8B0h&lt;br /&gt;
|0x0B0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|5&lt;br /&gt;
|Mode_6&lt;br /&gt;
|5&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_42&lt;br /&gt;
|GPIO2_11&lt;br /&gt;
|lcd_data5&lt;br /&gt;
|8B4h&lt;br /&gt;
|0x0B4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|6&lt;br /&gt;
|Mode_6&lt;br /&gt;
|6&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_39&lt;br /&gt;
|GPIO2_12&lt;br /&gt;
|lcd_data6&lt;br /&gt;
|8B8h&lt;br /&gt;
|0x0B8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|7&lt;br /&gt;
|Mode_6&lt;br /&gt;
|7&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_40&lt;br /&gt;
|GPIO2_13&lt;br /&gt;
|lcd_data7&lt;br /&gt;
|8BCh&lt;br /&gt;
|0x0BC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|8&lt;br /&gt;
|Mode_6&lt;br /&gt;
|8&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_27&lt;br /&gt;
|GPIO2_22&lt;br /&gt;
|lcd_vsync&lt;br /&gt;
|8E0h&lt;br /&gt;
|0x0EO&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|9&lt;br /&gt;
|Mode_6&lt;br /&gt;
|9&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_29&lt;br /&gt;
|GPIO2_23&lt;br /&gt;
|lcd_hsync&lt;br /&gt;
|8E4h&lt;br /&gt;
|0x0E4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|10&lt;br /&gt;
|Mode_6&lt;br /&gt;
|10&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_28&lt;br /&gt;
|GPIO2_24&lt;br /&gt;
|lcd_pclk&lt;br /&gt;
|8E8h&lt;br /&gt;
|0x0E8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|11&lt;br /&gt;
|Mode_6&lt;br /&gt;
|11&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_30&lt;br /&gt;
|GPIO2_25&lt;br /&gt;
|lcd_ac_bias_en&lt;br /&gt;
|8ECh&lt;br /&gt;
|0x0EC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|12&lt;br /&gt;
|Mode_6&lt;br /&gt;
|12&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_21&lt;br /&gt;
|GPIO1_30&lt;br /&gt;
|gpmc_csn1&lt;br /&gt;
|880h&lt;br /&gt;
|0x080&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|13&lt;br /&gt;
|Mode_6&lt;br /&gt;
|13&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_20&lt;br /&gt;
|GPIO1_31&lt;br /&gt;
|gpmc_csn2&lt;br /&gt;
|884h&lt;br /&gt;
|0x084&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|16&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P9_26&lt;br /&gt;
|UART1_RXD&lt;br /&gt;
|uart1_rxd&lt;br /&gt;
|980h&lt;br /&gt;
|0x180&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: red&amp;quot;&amp;gt;&lt;br /&gt;
*Note1: The PRU0 Registers{30,31} Bit 4 (GPIO3_18) is routed to P9_42-GPIO0_7 pin.  You MUST set GPIO0_7 to input mode in pinmuxing.&lt;br /&gt;
&lt;br /&gt;
*Note2: The PRU0 Registers{30,31} Bit 6 (GPIO3_20) is routed to P9_41-GPIO0_20(CLKOUT2). You must set GPIO0_20 to input mode in pinmuxing.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Assembly ==&lt;br /&gt;
The complete list of PRU assembly instructions can be found [http://processors.wiki.ti.com/index.php/PRU_Assembly_Instructions at TI]. &lt;br /&gt;
=== Four instruction classes ===&lt;br /&gt;
* Arithmetic&lt;br /&gt;
* Logical&lt;br /&gt;
* Flow Control&lt;br /&gt;
* Register Load/Store&lt;br /&gt;
&lt;br /&gt;
=== Instruction Syntax ===&lt;br /&gt;
* Mnemonic, followed by comma separated parameter list&lt;br /&gt;
* Parameters can be a register, label, immediate value, or constant table entry&lt;br /&gt;
* Example&lt;br /&gt;
** SUB r3, r4, 10 &lt;br /&gt;
** Subtracts immediate value 10 (decimal) from the value in r4 and then places the result in r3 (or r3 = r4 - 10)&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
* [https://github.com/beagleboard/am335x_pru_package AM335x PRU support package on Github]&lt;br /&gt;
* [https://github.com/beagleboard/am335x_pru_package/blob/master/am335xPruReferenceGuide.pdf?raw=true AM335x PRU-ICSS Reference Guide]&lt;br /&gt;
The documentation on the subsystem is  [[media:spruh73c.pdf|here]].  TI does not support this subsystem and all questions/inquires/problems should be directed to the community.&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/sagedevices/ti-pruv2-assembly-textmate-bundle PRU assembly syntax highlighting for TextMate, Sublime Text, etc.]&lt;br /&gt;
&lt;br /&gt;
* A userspace [https://docs.google.com/file/d/0B80aJokrBccAV1paMTU0bjM1OXc/edit?usp=sharing debugging utility] with credit to PRU_EVTOUT_2 from the #beagle IRC channel.&lt;br /&gt;
* ncurses based debugger work has started at [https://github.com/wz2b/prude here].&lt;br /&gt;
* For using the Open Core Protocol to [http://nomel.org/post/30006622413/beaglebone-tutorial-accessing-main-memory-from-the-pru access external memory] from the PRU.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
* [[BeagleBone_6502_RemoteProc_cape]]&lt;br /&gt;
* [https://github.com/mranostay/beagle-nixie BeagleBone Nixie Cape PRU App]&lt;br /&gt;
* [http://processors.wiki.ti.com/index.php/Soft-UART_Implementation_on_AM335X_PRU_-_Software_Users_Guide PRU Soft UART Driver]&lt;br /&gt;
&lt;br /&gt;
[[Category:ECE497 | PRU]]&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/Ti_AM33XX_PRUSSv2</id>
		<title>Ti AM33XX PRUSSv2</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/Ti_AM33XX_PRUSSv2"/>
				<updated>2013-05-16T23:45:07Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: /* Resources */ Added link to nomel.org for OCP&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The PRUSS (Programmable Real-time Unit Sub System) consists of two 32-bit 200MHz real-time cores, each with 8KB of program memory and direct access to general I/O.&lt;br /&gt;
These cores are connected to various data memories, peripheral modules and an interrupt controller for access to the entire system-on-a-chip via a 32-bit interconnect bus.&lt;br /&gt;
&lt;br /&gt;
PRUs are programmed in [http://en.wikipedia.org/wiki/Assembly_language Assembly], with most commands executing in a single cycle with no caching or pipe-lining, allowing for 100% predictable timings. At 200MHz, a single cycle most operations will take 5ns (nanoseconds) with exception of accessing memory external to PRU to execute.&lt;br /&gt;
&lt;br /&gt;
====This is a Work In Progress====&lt;br /&gt;
&lt;br /&gt;
== Available PRU Resources ==&lt;br /&gt;
[[File:PRUSS.png|AM335x PRUSS]]&lt;br /&gt;
&lt;br /&gt;
[[PRUSSv2 Memory Map|Click here for a full list of register mappings.]]&lt;br /&gt;
&lt;br /&gt;
=== Per PRU ===&lt;br /&gt;
; 8KB program memory&lt;br /&gt;
: Memory used to store instructions and static data AKA Instruction Memory (IRAM). This is the memory in which PRU programs are loaded.&lt;br /&gt;
&lt;br /&gt;
; Enhanced GPIO (EGPIO)&lt;br /&gt;
: High-speed direct access to 16 general purpose output and 17 general purpose input pins for each PRU.&lt;br /&gt;
:; PRU0&lt;br /&gt;
:: ''pr1_pru_0_pru_r30[15:0]'' (PRU0 Register R30 Outputs)&lt;br /&gt;
:: ''pr1_pru_0_pru_r31[16:0]'' (PRU0 Register R31 Inputs)&lt;br /&gt;
:; PRU1&lt;br /&gt;
:: ''pr1_pru_1_pru_r30[15:0]'' (PRU1 Register R30 Outputs)&lt;br /&gt;
:: ''pr1_pru_1_pru_r31[16:0]'' (PRU1 Register R31 Inputs)&lt;br /&gt;
:; Hardware capture modes&lt;br /&gt;
:: Serial 28-bit shift in and out.&lt;br /&gt;
:: Parallel 16-bit capture on clock.&lt;br /&gt;
:: [http://en.wikipedia.org/wiki/Media_Independent_Interface| MII] standardised capture mode, used for implementing media independent Fast Ethernet (100Mbps - 25MHz 4-bit).&lt;br /&gt;
&lt;br /&gt;
; A 32-bit multiply and accumulate unit (MAC)&lt;br /&gt;
: Enables single-cycle integer multiplications with a 64-bit overflow (useful for decimal results).&lt;br /&gt;
&lt;br /&gt;
; 8KB data memory&lt;br /&gt;
: Memory used to store dynamic data. Is accessed over the 32-bit bus and so not single-cycle.&lt;br /&gt;
: One PRU may access the memory of another for passing information but it is recommend to use scratch pad or shared memory, see below.&lt;br /&gt;
&lt;br /&gt;
; [http://en.wikipedia.org/wiki/Open_Core_Protocol| Open Core Protocol] (OCP) master port&lt;br /&gt;
: Access to the data bus that interconnects all peripherals on the SoC, including the ARM Cortex-A8, used for data transfer directly to and from the PRU in Level 3 (L3) memory space.&lt;br /&gt;
&lt;br /&gt;
=== Shared Between PRUs ===&lt;br /&gt;
; Scratch pad&lt;br /&gt;
: 3 banks of 30 32-bit registers (total 90 32-bit registers).&lt;br /&gt;
: Single-cycle access, can be accessed from either PRU for data sharing and signalling or for individual use.&lt;br /&gt;
&lt;br /&gt;
; 12KB data memory&lt;br /&gt;
: Accessed over the 32-but bus, not single-cycle.&lt;br /&gt;
&lt;br /&gt;
=== Local Peripherals ===&lt;br /&gt;
Local peripherals are those present within the PRUSS and not those belonging to the entire SoC. Peripherals are accessed from PRUs over the Switched Central Resource (SCR) 32-bit bus within the PRUSS.&lt;br /&gt;
&lt;br /&gt;
Attached to the SCR bus is also an OCP slave, enabling OCP masters from outside of the PRUSS to access these local peripherals in Level 4 (L4) memory space.&lt;br /&gt;
&lt;br /&gt;
; Enhanced Capture Model (eCAP)&lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
; Industrial Ethernet Peripheral (IEP)&lt;br /&gt;
&lt;br /&gt;
; Universal Asynchronous Receiver/Transmitter (UART0)&lt;br /&gt;
: Used to perform serial data transmission to the TL16C550 industry standard.&lt;br /&gt;
: 16-bit FIFO receive and transmit buffers + per byte error status.&lt;br /&gt;
: Can generate Interrupt requests for the PRUSS Interrupt Controller.&lt;br /&gt;
: Can generate DMA requests for the EDMA SoC DMA controller.&lt;br /&gt;
: Maximum transmission speed of 192MHz (192Mbps - 24MB/s).&lt;br /&gt;
&lt;br /&gt;
== Communication ==&lt;br /&gt;
Communication between various elements of the PRUSS or the wider SoC may take place either directly, over a bus, via interrupts or via DMA.&lt;br /&gt;
&lt;br /&gt;
The following lists will expose all possible communication approaches for each likely scenario.&lt;br /&gt;
&lt;br /&gt;
For communication via interrupts, please first read the section on the [[PRUSSv2 Interrupt Controller]].&lt;br /&gt;
&lt;br /&gt;
[[PRUSSv2 Interrupts| Click here for a full list of PRUSS Interrupts.]]&lt;br /&gt;
&lt;br /&gt;
The current [https://github.com/beagleboard/am335x_pru_package/blob/master/pru_sw/app_loader/interface/prussdrv.c example PRU loader] uses [http://arago-project.org/git/projects/?p=linux-am33x.git;a=commit;h=f1a304e7941cc76353363a139cbb6a4b1ca7c737 UIO], but this ideally should be replaced with [http://omappedia.org/wiki/Category:RPMsg remoteproc] rather than poking at the registers from userspace. In the mean time, according to [https://groups.google.com/d/msg/beagleboard/gqCjxh4uZi0/_uIUD8ZF88QJ this discussion:] we can use the included script and load the uio_pruss userspace driver.&lt;br /&gt;
&lt;br /&gt;
=== PRU to Host (PRU to ARM Cortex-A8) ===&lt;br /&gt;
Include the uio_pruss kernel driver by using '''modprobe uio_pruss''' or the steps outlined above, if that does not work.&lt;br /&gt;
Then in a project include the header files for the am335x_pru_package.&lt;br /&gt;
&lt;br /&gt;
    #define PRU_NUM0	  0&lt;br /&gt;
    // Driver header file&lt;br /&gt;
    #include &amp;lt;prussdrv.h&amp;gt;&lt;br /&gt;
    #include &amp;lt;pruss_intc_mapping.h&amp;gt;	 &lt;br /&gt;
&lt;br /&gt;
/* Then, initialize the interrupt controller data */&lt;br /&gt;
    tpruss_intc_initdata pruss_intc_initdata = PRUSS_INTC_INITDATA;&lt;br /&gt;
/* Initialize the PRU */&lt;br /&gt;
    prussdrv_init ();&lt;br /&gt;
/* Get the interrupt initialized */&lt;br /&gt;
    prussdrv_pruintc_init(&amp;amp;pruss_intc_initdata)&lt;br /&gt;
&lt;br /&gt;
/* Execute example on PRU0 where first argument is the PRU# and second is the assembly to execute*/&lt;br /&gt;
    prussdrv_exec_program (PRU_NUM0, &amp;quot;./example.bin&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
/* Wait until PRU0 sends the interrupt*/&lt;br /&gt;
    prussdrv_pru_wait_event (PRU_EVTOUT_0);&lt;br /&gt;
/* Clear the interrupt*/&lt;br /&gt;
    prussdrv_pru_clear_event (PRU0_ARM_INTERRUPT);&lt;br /&gt;
&lt;br /&gt;
The PRU (in this case 0) will have the following in the example.bin file to trigger the interrupt:&lt;br /&gt;
    #define PRU0_ARM_INTERRUPT      19&lt;br /&gt;
    MOV       r31.b0, PRU0_ARM_INTERRUPT+16&lt;br /&gt;
&lt;br /&gt;
Register 31 allows for control of the INTC for the PRU.&lt;br /&gt;
&lt;br /&gt;
=== Host to PRU (ARM Cortex-A8 to PRU) ===&lt;br /&gt;
==== Interrupts ====&lt;br /&gt;
Each PRU has access to host interrupt channels Host-0 and Host-1 through register R31 bit 30 and bit 31 respectively.&lt;br /&gt;
By probing these registers, a PRU can determine if an interrupt is currently present on each host channel.&lt;br /&gt;
&lt;br /&gt;
To configure &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PRU to external peripherals ===&lt;br /&gt;
=== External peripherals to PRU ===&lt;br /&gt;
=== PRU to internal peripherals ===&lt;br /&gt;
=== Internal peripherals to PRU ===&lt;br /&gt;
&lt;br /&gt;
== Loading a PRU Program ==&lt;br /&gt;
&lt;br /&gt;
==Beaglebone PRU connections and modes==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|'''PRU #'''&lt;br /&gt;
|'''R30(input) bit'''&lt;br /&gt;
|'''Pinmux Mode'''&lt;br /&gt;
|'''R31(output) bit'''&lt;br /&gt;
|'''Pinmux Mode'''&lt;br /&gt;
|'''BB Header'''&lt;br /&gt;
|'''BB Pin Name'''&lt;br /&gt;
|'''ZCZ BallName'''&lt;br /&gt;
|'''Offset Reg'''&lt;br /&gt;
|'''DT Offset'''&lt;br /&gt;
|'''Input Mode'''&lt;br /&gt;
|'''Output Mode'''&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|0&lt;br /&gt;
|Mode_6&lt;br /&gt;
|0&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_31&lt;br /&gt;
|SPI1_SCLK&lt;br /&gt;
|mcasp0_aclkx&lt;br /&gt;
|990h&lt;br /&gt;
|0x190&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|1&lt;br /&gt;
|Mode_6&lt;br /&gt;
|1&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_31&lt;br /&gt;
|SPI1_D0&lt;br /&gt;
|mcasp0_fsx&lt;br /&gt;
|994h&lt;br /&gt;
|0x194&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|2&lt;br /&gt;
|Mode_6&lt;br /&gt;
|2&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_30&lt;br /&gt;
|SPI1_D1&lt;br /&gt;
|mcasp0_axr0&lt;br /&gt;
|998h&lt;br /&gt;
|0x198&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|3&lt;br /&gt;
|Mode_6&lt;br /&gt;
|3&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_28&lt;br /&gt;
|SPI1_CS0&lt;br /&gt;
|mcasp0_ahclkr&lt;br /&gt;
|99Ch&lt;br /&gt;
|0x19C&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|4&lt;br /&gt;
|Mode_6&lt;br /&gt;
|4&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_42&lt;br /&gt;
|&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;(*note1)&amp;lt;/span&amp;gt;&lt;br /&gt;
|mcasp0_aclkr&lt;br /&gt;
|9A0h&lt;br /&gt;
|0x1A0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|5&lt;br /&gt;
|Mode_6&lt;br /&gt;
|5&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_27&lt;br /&gt;
|GPIO3_19&lt;br /&gt;
|mcasp0_fsr&lt;br /&gt;
|9A4h&lt;br /&gt;
|0x1A4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|6&lt;br /&gt;
|Mode_6&lt;br /&gt;
|6&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_41&lt;br /&gt;
|&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;(*note2)&amp;lt;/span&amp;gt;&lt;br /&gt;
|mcasp0_axr1&lt;br /&gt;
|9A8h&lt;br /&gt;
|0x1A8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|7&lt;br /&gt;
|Mode_6&lt;br /&gt;
|7&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_25&lt;br /&gt;
|GPIO3_21&lt;br /&gt;
|mcasp0_ahclkx&lt;br /&gt;
|9ACh&lt;br /&gt;
|0x1AC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|14&lt;br /&gt;
|Mode_6&lt;br /&gt;
|P8_12&lt;br /&gt;
|GPIO1_12&lt;br /&gt;
|gpmc_ad12&lt;br /&gt;
|830h&lt;br /&gt;
|0x030&lt;br /&gt;
|NA&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|15&lt;br /&gt;
|Mode_6&lt;br /&gt;
|P8_11&lt;br /&gt;
|GPIO1_13&lt;br /&gt;
|gpmc_ad9&lt;br /&gt;
|824h&lt;br /&gt;
|0x024&lt;br /&gt;
|NA&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|14&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P8_16&lt;br /&gt;
|GPIO1_14&lt;br /&gt;
|gpmc_ad14&lt;br /&gt;
|838h&lt;br /&gt;
|0x038&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|15&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P8_15&lt;br /&gt;
|GPIO1_15&lt;br /&gt;
|gpmc_ad15&lt;br /&gt;
|83Ch&lt;br /&gt;
|0x03C&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|16&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P9_24&lt;br /&gt;
|UART1_TXD&lt;br /&gt;
|uart1_txd&lt;br /&gt;
|984h&lt;br /&gt;
|0x184&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|0&lt;br /&gt;
|Mode_6&lt;br /&gt;
|0&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_45&lt;br /&gt;
|GPIO2_6&lt;br /&gt;
|lcd_data0&lt;br /&gt;
|8A0h&lt;br /&gt;
|0x0A0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|1&lt;br /&gt;
|Mode_6&lt;br /&gt;
|1&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_46&lt;br /&gt;
|GPIO2_7&lt;br /&gt;
|lcd_data1&lt;br /&gt;
|8A4h&lt;br /&gt;
|0x0A4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|2&lt;br /&gt;
|Mode_6&lt;br /&gt;
|2&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_43&lt;br /&gt;
|GPIO2_8&lt;br /&gt;
|lcd_data2&lt;br /&gt;
|8A8h&lt;br /&gt;
|0x0A8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|3&lt;br /&gt;
|Mode_6&lt;br /&gt;
|3&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_44&lt;br /&gt;
|GPIO2_9&lt;br /&gt;
|lcd_data3&lt;br /&gt;
|8ACh&lt;br /&gt;
|0x0AC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|4&lt;br /&gt;
|Mode_6&lt;br /&gt;
|4&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_41&lt;br /&gt;
|GPIO2_10&lt;br /&gt;
|lcd_data4&lt;br /&gt;
|8B0h&lt;br /&gt;
|0x0B0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|5&lt;br /&gt;
|Mode_6&lt;br /&gt;
|5&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_42&lt;br /&gt;
|GPIO2_11&lt;br /&gt;
|lcd_data5&lt;br /&gt;
|8B4h&lt;br /&gt;
|0x0B4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|6&lt;br /&gt;
|Mode_6&lt;br /&gt;
|6&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_39&lt;br /&gt;
|GPIO2_12&lt;br /&gt;
|lcd_data6&lt;br /&gt;
|8B8h&lt;br /&gt;
|0x0B8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|7&lt;br /&gt;
|Mode_6&lt;br /&gt;
|7&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_40&lt;br /&gt;
|GPIO2_13&lt;br /&gt;
|lcd_data7&lt;br /&gt;
|8BCh&lt;br /&gt;
|0x0BC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|8&lt;br /&gt;
|Mode_6&lt;br /&gt;
|8&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_27&lt;br /&gt;
|GPIO2_22&lt;br /&gt;
|lcd_vsync&lt;br /&gt;
|8E0h&lt;br /&gt;
|0x0EO&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|9&lt;br /&gt;
|Mode_6&lt;br /&gt;
|9&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_29&lt;br /&gt;
|GPIO2_23&lt;br /&gt;
|lcd_hsync&lt;br /&gt;
|8E4h&lt;br /&gt;
|0x0E4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|10&lt;br /&gt;
|Mode_6&lt;br /&gt;
|10&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_28&lt;br /&gt;
|GPIO2_24&lt;br /&gt;
|lcd_pclk&lt;br /&gt;
|8E8h&lt;br /&gt;
|0x0E8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|11&lt;br /&gt;
|Mode_6&lt;br /&gt;
|11&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_30&lt;br /&gt;
|GPIO2_25&lt;br /&gt;
|lcd_ac_bias_en&lt;br /&gt;
|8ECh&lt;br /&gt;
|0x0EC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|12&lt;br /&gt;
|Mode_6&lt;br /&gt;
|12&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_21&lt;br /&gt;
|GPIO1_30&lt;br /&gt;
|gpmc_csn1&lt;br /&gt;
|880h&lt;br /&gt;
|0x080&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|13&lt;br /&gt;
|Mode_6&lt;br /&gt;
|13&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_20&lt;br /&gt;
|GPIO1_31&lt;br /&gt;
|gpmc_csn2&lt;br /&gt;
|884h&lt;br /&gt;
|0x084&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|16&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P9_26&lt;br /&gt;
|UART1_RXD&lt;br /&gt;
|uart1_rxd&lt;br /&gt;
|980h&lt;br /&gt;
|0x180&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: red&amp;quot;&amp;gt;&lt;br /&gt;
*Note1: The PRU0 Registers{30,31} Bit 4 (GPIO3_18) is routed to P9_42-GPIO0_7 pin.  You MUST set GPIO0_7 to input mode in pinmuxing.&lt;br /&gt;
&lt;br /&gt;
*Note2: The PRU0 Registers{30,31} Bit 6 (GPIO3_20) is routed to P9_41-GPIO0_20(CLKOUT2). You must set GPIO0_20 to input mode in pinmuxing.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Assembly ==&lt;br /&gt;
The complete list of PRU assembly instructions can be found [http://processors.wiki.ti.com/index.php/PRU_Assembly_Instructions at TI]. &lt;br /&gt;
=== Four instruction classes ===&lt;br /&gt;
* Arithmetic&lt;br /&gt;
* Logical&lt;br /&gt;
* Flow Control&lt;br /&gt;
* Register Load/Store&lt;br /&gt;
&lt;br /&gt;
=== Instruction Syntax ===&lt;br /&gt;
* Mnemonic, followed by comma separated parameter list&lt;br /&gt;
* Parameters can be a register, label, immediate value, or constant table entry&lt;br /&gt;
* Example&lt;br /&gt;
** SUB r3, r4, 10 &lt;br /&gt;
** Subtracts immediate value 10 (decimal) from the value in r4 and then places the result in r3 (or r3 = r4 - 10)&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
* [https://github.com/beagleboard/am335x_pru_package AM335x PRU support package on Github]&lt;br /&gt;
* [https://github.com/beagleboard/am335x_pru_package/blob/master/am335xPruReferenceGuide.pdf?raw=true AM335x PRU-ICSS Reference Guide]&lt;br /&gt;
The documentation on the subsystem is  [[media:spruh73c.pdf|here]].  TI does not support this subsystem and all questions/inquires/problems should be directed to the community.&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/sagedevices/ti-pruv2-assembly-textmate-bundle PRU assembly syntax highlighting for TextMate, Sublime Text, etc.]&lt;br /&gt;
&lt;br /&gt;
* A userspace [https://docs.google.com/file/d/0B80aJokrBccAV1paMTU0bjM1OXc/edit?usp=sharing debugging utility] with credit to PRU_EVTOUT_2 from the #beagle IRC channel.&lt;br /&gt;
* ncurses based debugger work has started at [https://github.com/wz2b/prude here].&lt;br /&gt;
* For using the Open Connect Protocol to [http://nomel.org/post/30006622413/beaglebone-tutorial-accessing-main-memory-from-the-pru access external memory] from the PRU.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
* [[BeagleBone_6502_RemoteProc_cape]]&lt;br /&gt;
* [https://github.com/mranostay/beagle-nixie BeagleBone Nixie Cape PRU App]&lt;br /&gt;
* [http://processors.wiki.ti.com/index.php/Soft-UART_Implementation_on_AM335X_PRU_-_Software_Users_Guide PRU Soft UART Driver]&lt;br /&gt;
&lt;br /&gt;
[[Category:ECE497 | PRU]]&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/Ti_AM33XX_PRUSSv2</id>
		<title>Ti AM33XX PRUSSv2</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/Ti_AM33XX_PRUSSv2"/>
				<updated>2013-05-16T15:49:51Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: /* PRU to Host (PRU to ARM Cortex-A8) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The PRUSS (Programmable Real-time Unit Sub System) consists of two 32-bit 200MHz real-time cores, each with 8KB of program memory and direct access to general I/O.&lt;br /&gt;
These cores are connected to various data memories, peripheral modules and an interrupt controller for access to the entire system-on-a-chip via a 32-bit interconnect bus.&lt;br /&gt;
&lt;br /&gt;
PRUs are programmed in [http://en.wikipedia.org/wiki/Assembly_language Assembly], with most commands executing in a single cycle with no caching or pipe-lining, allowing for 100% predictable timings. At 200MHz, a single cycle most operations will take 5ns (nanoseconds) with exception of accessing memory external to PRU to execute.&lt;br /&gt;
&lt;br /&gt;
====This is a Work In Progress====&lt;br /&gt;
&lt;br /&gt;
== Available PRU Resources ==&lt;br /&gt;
[[File:PRUSS.png|AM335x PRUSS]]&lt;br /&gt;
&lt;br /&gt;
[[PRUSSv2 Memory Map|Click here for a full list of register mappings.]]&lt;br /&gt;
&lt;br /&gt;
=== Per PRU ===&lt;br /&gt;
; 8KB program memory&lt;br /&gt;
: Memory used to store instructions and static data AKA Instruction Memory (IRAM). This is the memory in which PRU programs are loaded.&lt;br /&gt;
&lt;br /&gt;
; Enhanced GPIO (EGPIO)&lt;br /&gt;
: High-speed direct access to 16 general purpose output and 17 general purpose input pins for each PRU.&lt;br /&gt;
:; PRU0&lt;br /&gt;
:: ''pr1_pru_0_pru_r30[15:0]'' (PRU0 Register R30 Outputs)&lt;br /&gt;
:: ''pr1_pru_0_pru_r31[16:0]'' (PRU0 Register R31 Inputs)&lt;br /&gt;
:; PRU1&lt;br /&gt;
:: ''pr1_pru_1_pru_r30[15:0]'' (PRU1 Register R30 Outputs)&lt;br /&gt;
:: ''pr1_pru_1_pru_r31[16:0]'' (PRU1 Register R31 Inputs)&lt;br /&gt;
:; Hardware capture modes&lt;br /&gt;
:: Serial 28-bit shift in and out.&lt;br /&gt;
:: Parallel 16-bit capture on clock.&lt;br /&gt;
:: [http://en.wikipedia.org/wiki/Media_Independent_Interface| MII] standardised capture mode, used for implementing media independent Fast Ethernet (100Mbps - 25MHz 4-bit).&lt;br /&gt;
&lt;br /&gt;
; A 32-bit multiply and accumulate unit (MAC)&lt;br /&gt;
: Enables single-cycle integer multiplications with a 64-bit overflow (useful for decimal results).&lt;br /&gt;
&lt;br /&gt;
; 8KB data memory&lt;br /&gt;
: Memory used to store dynamic data. Is accessed over the 32-bit bus and so not single-cycle.&lt;br /&gt;
: One PRU may access the memory of another for passing information but it is recommend to use scratch pad or shared memory, see below.&lt;br /&gt;
&lt;br /&gt;
; [http://en.wikipedia.org/wiki/Open_Core_Protocol| Open Core Protocol] (OCP) master port&lt;br /&gt;
: Access to the data bus that interconnects all peripherals on the SoC, including the ARM Cortex-A8, used for data transfer directly to and from the PRU in Level 3 (L3) memory space.&lt;br /&gt;
&lt;br /&gt;
=== Shared Between PRUs ===&lt;br /&gt;
; Scratch pad&lt;br /&gt;
: 3 banks of 30 32-bit registers (total 90 32-bit registers).&lt;br /&gt;
: Single-cycle access, can be accessed from either PRU for data sharing and signalling or for individual use.&lt;br /&gt;
&lt;br /&gt;
; 12KB data memory&lt;br /&gt;
: Accessed over the 32-but bus, not single-cycle.&lt;br /&gt;
&lt;br /&gt;
=== Local Peripherals ===&lt;br /&gt;
Local peripherals are those present within the PRUSS and not those belonging to the entire SoC. Peripherals are accessed from PRUs over the Switched Central Resource (SCR) 32-bit bus within the PRUSS.&lt;br /&gt;
&lt;br /&gt;
Attached to the SCR bus is also an OCP slave, enabling OCP masters from outside of the PRUSS to access these local peripherals in Level 4 (L4) memory space.&lt;br /&gt;
&lt;br /&gt;
; Enhanced Capture Model (eCAP)&lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
; Industrial Ethernet Peripheral (IEP)&lt;br /&gt;
&lt;br /&gt;
; Universal Asynchronous Receiver/Transmitter (UART0)&lt;br /&gt;
: Used to perform serial data transmission to the TL16C550 industry standard.&lt;br /&gt;
: 16-bit FIFO receive and transmit buffers + per byte error status.&lt;br /&gt;
: Can generate Interrupt requests for the PRUSS Interrupt Controller.&lt;br /&gt;
: Can generate DMA requests for the EDMA SoC DMA controller.&lt;br /&gt;
: Maximum transmission speed of 192MHz (192Mbps - 24MB/s).&lt;br /&gt;
&lt;br /&gt;
== Communication ==&lt;br /&gt;
Communication between various elements of the PRUSS or the wider SoC may take place either directly, over a bus, via interrupts or via DMA.&lt;br /&gt;
&lt;br /&gt;
The following lists will expose all possible communication approaches for each likely scenario.&lt;br /&gt;
&lt;br /&gt;
For communication via interrupts, please first read the section on the [[PRUSSv2 Interrupt Controller]].&lt;br /&gt;
&lt;br /&gt;
[[PRUSSv2 Interrupts| Click here for a full list of PRUSS Interrupts.]]&lt;br /&gt;
&lt;br /&gt;
The current [https://github.com/beagleboard/am335x_pru_package/blob/master/pru_sw/app_loader/interface/prussdrv.c example PRU loader] uses [http://arago-project.org/git/projects/?p=linux-am33x.git;a=commit;h=f1a304e7941cc76353363a139cbb6a4b1ca7c737 UIO], but this ideally should be replaced with [http://omappedia.org/wiki/Category:RPMsg remoteproc] rather than poking at the registers from userspace. In the mean time, according to [https://groups.google.com/d/msg/beagleboard/gqCjxh4uZi0/_uIUD8ZF88QJ this discussion:] we can use the included script and load the uio_pruss userspace driver.&lt;br /&gt;
&lt;br /&gt;
=== PRU to Host (PRU to ARM Cortex-A8) ===&lt;br /&gt;
Include the uio_pruss kernel driver by using '''modprobe uio_pruss''' or the steps outlined above, if that does not work.&lt;br /&gt;
Then in a project include the header files for the am335x_pru_package.&lt;br /&gt;
&lt;br /&gt;
    #define PRU_NUM0	  0&lt;br /&gt;
    // Driver header file&lt;br /&gt;
    #include &amp;lt;prussdrv.h&amp;gt;&lt;br /&gt;
    #include &amp;lt;pruss_intc_mapping.h&amp;gt;	 &lt;br /&gt;
&lt;br /&gt;
/* Then, initialize the interrupt controller data */&lt;br /&gt;
    tpruss_intc_initdata pruss_intc_initdata = PRUSS_INTC_INITDATA;&lt;br /&gt;
/* Initialize the PRU */&lt;br /&gt;
    prussdrv_init ();&lt;br /&gt;
/* Get the interrupt initialized */&lt;br /&gt;
    prussdrv_pruintc_init(&amp;amp;pruss_intc_initdata)&lt;br /&gt;
&lt;br /&gt;
/* Execute example on PRU0 where first argument is the PRU# and second is the assembly to execute*/&lt;br /&gt;
    prussdrv_exec_program (PRU_NUM0, &amp;quot;./example.bin&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
/* Wait until PRU0 sends the interrupt*/&lt;br /&gt;
    prussdrv_pru_wait_event (PRU_EVTOUT_0);&lt;br /&gt;
/* Clear the interrupt*/&lt;br /&gt;
    prussdrv_pru_clear_event (PRU0_ARM_INTERRUPT);&lt;br /&gt;
&lt;br /&gt;
The PRU (in this case 0) will have the following in the example.bin file to trigger the interrupt:&lt;br /&gt;
    #define PRU0_ARM_INTERRUPT      19&lt;br /&gt;
    MOV       r31.b0, PRU0_ARM_INTERRUPT+16&lt;br /&gt;
&lt;br /&gt;
Register 31 allows for control of the INTC for the PRU.&lt;br /&gt;
&lt;br /&gt;
=== Host to PRU (ARM Cortex-A8 to PRU) ===&lt;br /&gt;
==== Interrupts ====&lt;br /&gt;
Each PRU has access to host interrupt channels Host-0 and Host-1 through register R31 bit 30 and bit 31 respectively.&lt;br /&gt;
By probing these registers, a PRU can determine if an interrupt is currently present on each host channel.&lt;br /&gt;
&lt;br /&gt;
To configure &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PRU to external peripherals ===&lt;br /&gt;
=== External peripherals to PRU ===&lt;br /&gt;
=== PRU to internal peripherals ===&lt;br /&gt;
=== Internal peripherals to PRU ===&lt;br /&gt;
&lt;br /&gt;
== Loading a PRU Program ==&lt;br /&gt;
&lt;br /&gt;
==Beaglebone PRU connections and modes==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|'''PRU #'''&lt;br /&gt;
|'''R30(input) bit'''&lt;br /&gt;
|'''Pinmux Mode'''&lt;br /&gt;
|'''R31(output) bit'''&lt;br /&gt;
|'''Pinmux Mode'''&lt;br /&gt;
|'''BB Header'''&lt;br /&gt;
|'''BB Pin Name'''&lt;br /&gt;
|'''ZCZ BallName'''&lt;br /&gt;
|'''Offset Reg'''&lt;br /&gt;
|'''DT Offset'''&lt;br /&gt;
|'''Input Mode'''&lt;br /&gt;
|'''Output Mode'''&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|0&lt;br /&gt;
|Mode_6&lt;br /&gt;
|0&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_31&lt;br /&gt;
|SPI1_SCLK&lt;br /&gt;
|mcasp0_aclkx&lt;br /&gt;
|990h&lt;br /&gt;
|0x190&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|1&lt;br /&gt;
|Mode_6&lt;br /&gt;
|1&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_31&lt;br /&gt;
|SPI1_D0&lt;br /&gt;
|mcasp0_fsx&lt;br /&gt;
|994h&lt;br /&gt;
|0x194&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|2&lt;br /&gt;
|Mode_6&lt;br /&gt;
|2&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_30&lt;br /&gt;
|SPI1_D1&lt;br /&gt;
|mcasp0_axr0&lt;br /&gt;
|998h&lt;br /&gt;
|0x198&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|3&lt;br /&gt;
|Mode_6&lt;br /&gt;
|3&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_28&lt;br /&gt;
|SPI1_CS0&lt;br /&gt;
|mcasp0_ahclkr&lt;br /&gt;
|99Ch&lt;br /&gt;
|0x19C&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|4&lt;br /&gt;
|Mode_6&lt;br /&gt;
|4&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_42&lt;br /&gt;
|&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;(*note1)&amp;lt;/span&amp;gt;&lt;br /&gt;
|mcasp0_aclkr&lt;br /&gt;
|9A0h&lt;br /&gt;
|0x1A0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|5&lt;br /&gt;
|Mode_6&lt;br /&gt;
|5&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_27&lt;br /&gt;
|GPIO3_19&lt;br /&gt;
|mcasp0_fsr&lt;br /&gt;
|9A4h&lt;br /&gt;
|0x1A4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|6&lt;br /&gt;
|Mode_6&lt;br /&gt;
|6&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_41&lt;br /&gt;
|&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;(*note2)&amp;lt;/span&amp;gt;&lt;br /&gt;
|mcasp0_axr1&lt;br /&gt;
|9A8h&lt;br /&gt;
|0x1A8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|7&lt;br /&gt;
|Mode_6&lt;br /&gt;
|7&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_25&lt;br /&gt;
|GPIO3_21&lt;br /&gt;
|mcasp0_ahclkx&lt;br /&gt;
|9ACh&lt;br /&gt;
|0x1AC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|14&lt;br /&gt;
|Mode_6&lt;br /&gt;
|P8_12&lt;br /&gt;
|GPIO1_12&lt;br /&gt;
|gpmc_ad12&lt;br /&gt;
|830h&lt;br /&gt;
|0x030&lt;br /&gt;
|NA&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|15&lt;br /&gt;
|Mode_6&lt;br /&gt;
|P8_11&lt;br /&gt;
|GPIO1_13&lt;br /&gt;
|gpmc_ad9&lt;br /&gt;
|824h&lt;br /&gt;
|0x024&lt;br /&gt;
|NA&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|14&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P8_16&lt;br /&gt;
|GPIO1_14&lt;br /&gt;
|gpmc_ad14&lt;br /&gt;
|838h&lt;br /&gt;
|0x038&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|15&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P8_15&lt;br /&gt;
|GPIO1_15&lt;br /&gt;
|gpmc_ad15&lt;br /&gt;
|83Ch&lt;br /&gt;
|0x03C&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|16&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P9_24&lt;br /&gt;
|UART1_TXD&lt;br /&gt;
|uart1_txd&lt;br /&gt;
|984h&lt;br /&gt;
|0x184&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|0&lt;br /&gt;
|Mode_6&lt;br /&gt;
|0&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_45&lt;br /&gt;
|GPIO2_6&lt;br /&gt;
|lcd_data0&lt;br /&gt;
|8A0h&lt;br /&gt;
|0x0A0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|1&lt;br /&gt;
|Mode_6&lt;br /&gt;
|1&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_46&lt;br /&gt;
|GPIO2_7&lt;br /&gt;
|lcd_data1&lt;br /&gt;
|8A4h&lt;br /&gt;
|0x0A4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|2&lt;br /&gt;
|Mode_6&lt;br /&gt;
|2&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_43&lt;br /&gt;
|GPIO2_8&lt;br /&gt;
|lcd_data2&lt;br /&gt;
|8A8h&lt;br /&gt;
|0x0A8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|3&lt;br /&gt;
|Mode_6&lt;br /&gt;
|3&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_44&lt;br /&gt;
|GPIO2_9&lt;br /&gt;
|lcd_data3&lt;br /&gt;
|8ACh&lt;br /&gt;
|0x0AC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|4&lt;br /&gt;
|Mode_6&lt;br /&gt;
|4&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_41&lt;br /&gt;
|GPIO2_10&lt;br /&gt;
|lcd_data4&lt;br /&gt;
|8B0h&lt;br /&gt;
|0x0B0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|5&lt;br /&gt;
|Mode_6&lt;br /&gt;
|5&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_42&lt;br /&gt;
|GPIO2_11&lt;br /&gt;
|lcd_data5&lt;br /&gt;
|8B4h&lt;br /&gt;
|0x0B4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|6&lt;br /&gt;
|Mode_6&lt;br /&gt;
|6&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_39&lt;br /&gt;
|GPIO2_12&lt;br /&gt;
|lcd_data6&lt;br /&gt;
|8B8h&lt;br /&gt;
|0x0B8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|7&lt;br /&gt;
|Mode_6&lt;br /&gt;
|7&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_40&lt;br /&gt;
|GPIO2_13&lt;br /&gt;
|lcd_data7&lt;br /&gt;
|8BCh&lt;br /&gt;
|0x0BC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|8&lt;br /&gt;
|Mode_6&lt;br /&gt;
|8&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_27&lt;br /&gt;
|GPIO2_22&lt;br /&gt;
|lcd_vsync&lt;br /&gt;
|8E0h&lt;br /&gt;
|0x0EO&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|9&lt;br /&gt;
|Mode_6&lt;br /&gt;
|9&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_29&lt;br /&gt;
|GPIO2_23&lt;br /&gt;
|lcd_hsync&lt;br /&gt;
|8E4h&lt;br /&gt;
|0x0E4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|10&lt;br /&gt;
|Mode_6&lt;br /&gt;
|10&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_28&lt;br /&gt;
|GPIO2_24&lt;br /&gt;
|lcd_pclk&lt;br /&gt;
|8E8h&lt;br /&gt;
|0x0E8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|11&lt;br /&gt;
|Mode_6&lt;br /&gt;
|11&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_30&lt;br /&gt;
|GPIO2_25&lt;br /&gt;
|lcd_ac_bias_en&lt;br /&gt;
|8ECh&lt;br /&gt;
|0x0EC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|12&lt;br /&gt;
|Mode_6&lt;br /&gt;
|12&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_21&lt;br /&gt;
|GPIO1_30&lt;br /&gt;
|gpmc_csn1&lt;br /&gt;
|880h&lt;br /&gt;
|0x080&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|13&lt;br /&gt;
|Mode_6&lt;br /&gt;
|13&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_20&lt;br /&gt;
|GPIO1_31&lt;br /&gt;
|gpmc_csn2&lt;br /&gt;
|884h&lt;br /&gt;
|0x084&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|16&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P9_26&lt;br /&gt;
|UART1_RXD&lt;br /&gt;
|uart1_rxd&lt;br /&gt;
|980h&lt;br /&gt;
|0x180&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: red&amp;quot;&amp;gt;&lt;br /&gt;
*Note1: The PRU0 Registers{30,31} Bit 4 (GPIO3_18) is routed to P9_42-GPIO0_7 pin.  You MUST set GPIO0_7 to input mode in pinmuxing.&lt;br /&gt;
&lt;br /&gt;
*Note2: The PRU0 Registers{30,31} Bit 6 (GPIO3_20) is routed to P9_41-GPIO0_20(CLKOUT2). You must set GPIO0_20 to input mode in pinmuxing.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Assembly ==&lt;br /&gt;
The complete list of PRU assembly instructions can be found [http://processors.wiki.ti.com/index.php/PRU_Assembly_Instructions at TI]. &lt;br /&gt;
=== Four instruction classes ===&lt;br /&gt;
* Arithmetic&lt;br /&gt;
* Logical&lt;br /&gt;
* Flow Control&lt;br /&gt;
* Register Load/Store&lt;br /&gt;
&lt;br /&gt;
=== Instruction Syntax ===&lt;br /&gt;
* Mnemonic, followed by comma separated parameter list&lt;br /&gt;
* Parameters can be a register, label, immediate value, or constant table entry&lt;br /&gt;
* Example&lt;br /&gt;
** SUB r3, r4, 10 &lt;br /&gt;
** Subtracts immediate value 10 (decimal) from the value in r4 and then places the result in r3 (or r3 = r4 - 10)&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
* [https://github.com/beagleboard/am335x_pru_package AM335x PRU support package on Github]&lt;br /&gt;
* [https://github.com/beagleboard/am335x_pru_package/blob/master/am335xPruReferenceGuide.pdf?raw=true AM335x PRU-ICSS Reference Guide]&lt;br /&gt;
The documentation on the subsystem is  [[media:spruh73c.pdf|here]].  TI does not support this subsystem and all questions/inquires/problems should be directed to the community.&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/sagedevices/ti-pruv2-assembly-textmate-bundle PRU assembly syntax highlighting for TextMate, Sublime Text, etc.]&lt;br /&gt;
&lt;br /&gt;
* A userspace [https://docs.google.com/file/d/0B80aJokrBccAV1paMTU0bjM1OXc/edit?usp=sharing debugging utility] with credit to PRU_EVTOUT_2 from the #beagle IRC channel.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
* [[BeagleBone_6502_RemoteProc_cape]]&lt;br /&gt;
* [https://github.com/mranostay/beagle-nixie BeagleBone Nixie Cape PRU App]&lt;br /&gt;
* [http://processors.wiki.ti.com/index.php/Soft-UART_Implementation_on_AM335X_PRU_-_Software_Users_Guide PRU Soft UART Driver]&lt;br /&gt;
&lt;br /&gt;
[[Category:ECE497 | PRU]]&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/Ti_AM33XX_PRUSSv2</id>
		<title>Ti AM33XX PRUSSv2</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/Ti_AM33XX_PRUSSv2"/>
				<updated>2013-05-16T15:48:05Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: PRU to Host (PRU to ARM Cortex-A8) Added basic interrupt control from the PRU to the ARM processors&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The PRUSS (Programmable Real-time Unit Sub System) consists of two 32-bit 200MHz real-time cores, each with 8KB of program memory and direct access to general I/O.&lt;br /&gt;
These cores are connected to various data memories, peripheral modules and an interrupt controller for access to the entire system-on-a-chip via a 32-bit interconnect bus.&lt;br /&gt;
&lt;br /&gt;
PRUs are programmed in [http://en.wikipedia.org/wiki/Assembly_language Assembly], with most commands executing in a single cycle with no caching or pipe-lining, allowing for 100% predictable timings. At 200MHz, a single cycle most operations will take 5ns (nanoseconds) with exception of accessing memory external to PRU to execute.&lt;br /&gt;
&lt;br /&gt;
====This is a Work In Progress====&lt;br /&gt;
&lt;br /&gt;
== Available PRU Resources ==&lt;br /&gt;
[[File:PRUSS.png|AM335x PRUSS]]&lt;br /&gt;
&lt;br /&gt;
[[PRUSSv2 Memory Map|Click here for a full list of register mappings.]]&lt;br /&gt;
&lt;br /&gt;
=== Per PRU ===&lt;br /&gt;
; 8KB program memory&lt;br /&gt;
: Memory used to store instructions and static data AKA Instruction Memory (IRAM). This is the memory in which PRU programs are loaded.&lt;br /&gt;
&lt;br /&gt;
; Enhanced GPIO (EGPIO)&lt;br /&gt;
: High-speed direct access to 16 general purpose output and 17 general purpose input pins for each PRU.&lt;br /&gt;
:; PRU0&lt;br /&gt;
:: ''pr1_pru_0_pru_r30[15:0]'' (PRU0 Register R30 Outputs)&lt;br /&gt;
:: ''pr1_pru_0_pru_r31[16:0]'' (PRU0 Register R31 Inputs)&lt;br /&gt;
:; PRU1&lt;br /&gt;
:: ''pr1_pru_1_pru_r30[15:0]'' (PRU1 Register R30 Outputs)&lt;br /&gt;
:: ''pr1_pru_1_pru_r31[16:0]'' (PRU1 Register R31 Inputs)&lt;br /&gt;
:; Hardware capture modes&lt;br /&gt;
:: Serial 28-bit shift in and out.&lt;br /&gt;
:: Parallel 16-bit capture on clock.&lt;br /&gt;
:: [http://en.wikipedia.org/wiki/Media_Independent_Interface| MII] standardised capture mode, used for implementing media independent Fast Ethernet (100Mbps - 25MHz 4-bit).&lt;br /&gt;
&lt;br /&gt;
; A 32-bit multiply and accumulate unit (MAC)&lt;br /&gt;
: Enables single-cycle integer multiplications with a 64-bit overflow (useful for decimal results).&lt;br /&gt;
&lt;br /&gt;
; 8KB data memory&lt;br /&gt;
: Memory used to store dynamic data. Is accessed over the 32-bit bus and so not single-cycle.&lt;br /&gt;
: One PRU may access the memory of another for passing information but it is recommend to use scratch pad or shared memory, see below.&lt;br /&gt;
&lt;br /&gt;
; [http://en.wikipedia.org/wiki/Open_Core_Protocol| Open Core Protocol] (OCP) master port&lt;br /&gt;
: Access to the data bus that interconnects all peripherals on the SoC, including the ARM Cortex-A8, used for data transfer directly to and from the PRU in Level 3 (L3) memory space.&lt;br /&gt;
&lt;br /&gt;
=== Shared Between PRUs ===&lt;br /&gt;
; Scratch pad&lt;br /&gt;
: 3 banks of 30 32-bit registers (total 90 32-bit registers).&lt;br /&gt;
: Single-cycle access, can be accessed from either PRU for data sharing and signalling or for individual use.&lt;br /&gt;
&lt;br /&gt;
; 12KB data memory&lt;br /&gt;
: Accessed over the 32-but bus, not single-cycle.&lt;br /&gt;
&lt;br /&gt;
=== Local Peripherals ===&lt;br /&gt;
Local peripherals are those present within the PRUSS and not those belonging to the entire SoC. Peripherals are accessed from PRUs over the Switched Central Resource (SCR) 32-bit bus within the PRUSS.&lt;br /&gt;
&lt;br /&gt;
Attached to the SCR bus is also an OCP slave, enabling OCP masters from outside of the PRUSS to access these local peripherals in Level 4 (L4) memory space.&lt;br /&gt;
&lt;br /&gt;
; Enhanced Capture Model (eCAP)&lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
; Industrial Ethernet Peripheral (IEP)&lt;br /&gt;
&lt;br /&gt;
; Universal Asynchronous Receiver/Transmitter (UART0)&lt;br /&gt;
: Used to perform serial data transmission to the TL16C550 industry standard.&lt;br /&gt;
: 16-bit FIFO receive and transmit buffers + per byte error status.&lt;br /&gt;
: Can generate Interrupt requests for the PRUSS Interrupt Controller.&lt;br /&gt;
: Can generate DMA requests for the EDMA SoC DMA controller.&lt;br /&gt;
: Maximum transmission speed of 192MHz (192Mbps - 24MB/s).&lt;br /&gt;
&lt;br /&gt;
== Communication ==&lt;br /&gt;
Communication between various elements of the PRUSS or the wider SoC may take place either directly, over a bus, via interrupts or via DMA.&lt;br /&gt;
&lt;br /&gt;
The following lists will expose all possible communication approaches for each likely scenario.&lt;br /&gt;
&lt;br /&gt;
For communication via interrupts, please first read the section on the [[PRUSSv2 Interrupt Controller]].&lt;br /&gt;
&lt;br /&gt;
[[PRUSSv2 Interrupts| Click here for a full list of PRUSS Interrupts.]]&lt;br /&gt;
&lt;br /&gt;
The current [https://github.com/beagleboard/am335x_pru_package/blob/master/pru_sw/app_loader/interface/prussdrv.c example PRU loader] uses [http://arago-project.org/git/projects/?p=linux-am33x.git;a=commit;h=f1a304e7941cc76353363a139cbb6a4b1ca7c737 UIO], but this ideally should be replaced with [http://omappedia.org/wiki/Category:RPMsg remoteproc] rather than poking at the registers from userspace. In the mean time, according to [https://groups.google.com/d/msg/beagleboard/gqCjxh4uZi0/_uIUD8ZF88QJ this discussion:] we can use the included script and load the uio_pruss userspace driver.&lt;br /&gt;
&lt;br /&gt;
=== PRU to Host (PRU to ARM Cortex-A8) ===&lt;br /&gt;
Include the uio_pruss kernel driver by using '''modprobe uio_pruss''' or the steps outlined above, if that does not work.&lt;br /&gt;
Then in a project include the header files for the am335x_pru_package.&lt;br /&gt;
&lt;br /&gt;
    #define PRU_NUM0	  0&lt;br /&gt;
&lt;br /&gt;
/* Then, initialize the interrupt controller data */&lt;br /&gt;
    tpruss_intc_initdata pruss_intc_initdata = PRUSS_INTC_INITDATA;&lt;br /&gt;
/* Initialize the PRU */&lt;br /&gt;
    prussdrv_init ();&lt;br /&gt;
/* Get the interrupt initialized */&lt;br /&gt;
    prussdrv_pruintc_init(&amp;amp;pruss_intc_initdata)&lt;br /&gt;
&lt;br /&gt;
/* Execute example on PRU0 where first argument is the PRU# and second is the assembly to execute*/&lt;br /&gt;
    prussdrv_exec_program (PRU_NUM0, &amp;quot;./example.bin&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
/* Wait until PRU0 sends the interrupt*/&lt;br /&gt;
    prussdrv_pru_wait_event (PRU_EVTOUT_0);&lt;br /&gt;
/* Clear the interrupt*/&lt;br /&gt;
    prussdrv_pru_clear_event (PRU0_ARM_INTERRUPT);&lt;br /&gt;
&lt;br /&gt;
The PRU (in this case 0) will have the following in the example.bin file to trigger the interrupt:&lt;br /&gt;
    #define PRU0_ARM_INTERRUPT      19&lt;br /&gt;
    MOV       r31.b0, PRU0_ARM_INTERRUPT+16&lt;br /&gt;
&lt;br /&gt;
Register 31 allows for control of the INTC for the PRU.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Host to PRU (ARM Cortex-A8 to PRU) ===&lt;br /&gt;
==== Interrupts ====&lt;br /&gt;
Each PRU has access to host interrupt channels Host-0 and Host-1 through register R31 bit 30 and bit 31 respectively.&lt;br /&gt;
By probing these registers, a PRU can determine if an interrupt is currently present on each host channel.&lt;br /&gt;
&lt;br /&gt;
To configure &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PRU to external peripherals ===&lt;br /&gt;
=== External peripherals to PRU ===&lt;br /&gt;
=== PRU to internal peripherals ===&lt;br /&gt;
=== Internal peripherals to PRU ===&lt;br /&gt;
&lt;br /&gt;
== Loading a PRU Program ==&lt;br /&gt;
&lt;br /&gt;
==Beaglebone PRU connections and modes==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|'''PRU #'''&lt;br /&gt;
|'''R30(input) bit'''&lt;br /&gt;
|'''Pinmux Mode'''&lt;br /&gt;
|'''R31(output) bit'''&lt;br /&gt;
|'''Pinmux Mode'''&lt;br /&gt;
|'''BB Header'''&lt;br /&gt;
|'''BB Pin Name'''&lt;br /&gt;
|'''ZCZ BallName'''&lt;br /&gt;
|'''Offset Reg'''&lt;br /&gt;
|'''DT Offset'''&lt;br /&gt;
|'''Input Mode'''&lt;br /&gt;
|'''Output Mode'''&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|0&lt;br /&gt;
|Mode_6&lt;br /&gt;
|0&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_31&lt;br /&gt;
|SPI1_SCLK&lt;br /&gt;
|mcasp0_aclkx&lt;br /&gt;
|990h&lt;br /&gt;
|0x190&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|1&lt;br /&gt;
|Mode_6&lt;br /&gt;
|1&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_31&lt;br /&gt;
|SPI1_D0&lt;br /&gt;
|mcasp0_fsx&lt;br /&gt;
|994h&lt;br /&gt;
|0x194&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|2&lt;br /&gt;
|Mode_6&lt;br /&gt;
|2&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_30&lt;br /&gt;
|SPI1_D1&lt;br /&gt;
|mcasp0_axr0&lt;br /&gt;
|998h&lt;br /&gt;
|0x198&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|3&lt;br /&gt;
|Mode_6&lt;br /&gt;
|3&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_28&lt;br /&gt;
|SPI1_CS0&lt;br /&gt;
|mcasp0_ahclkr&lt;br /&gt;
|99Ch&lt;br /&gt;
|0x19C&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|4&lt;br /&gt;
|Mode_6&lt;br /&gt;
|4&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_42&lt;br /&gt;
|&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;(*note1)&amp;lt;/span&amp;gt;&lt;br /&gt;
|mcasp0_aclkr&lt;br /&gt;
|9A0h&lt;br /&gt;
|0x1A0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|5&lt;br /&gt;
|Mode_6&lt;br /&gt;
|5&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_27&lt;br /&gt;
|GPIO3_19&lt;br /&gt;
|mcasp0_fsr&lt;br /&gt;
|9A4h&lt;br /&gt;
|0x1A4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|6&lt;br /&gt;
|Mode_6&lt;br /&gt;
|6&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_41&lt;br /&gt;
|&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;(*note2)&amp;lt;/span&amp;gt;&lt;br /&gt;
|mcasp0_axr1&lt;br /&gt;
|9A8h&lt;br /&gt;
|0x1A8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|7&lt;br /&gt;
|Mode_6&lt;br /&gt;
|7&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_25&lt;br /&gt;
|GPIO3_21&lt;br /&gt;
|mcasp0_ahclkx&lt;br /&gt;
|9ACh&lt;br /&gt;
|0x1AC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|14&lt;br /&gt;
|Mode_6&lt;br /&gt;
|P8_12&lt;br /&gt;
|GPIO1_12&lt;br /&gt;
|gpmc_ad12&lt;br /&gt;
|830h&lt;br /&gt;
|0x030&lt;br /&gt;
|NA&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|15&lt;br /&gt;
|Mode_6&lt;br /&gt;
|P8_11&lt;br /&gt;
|GPIO1_13&lt;br /&gt;
|gpmc_ad9&lt;br /&gt;
|824h&lt;br /&gt;
|0x024&lt;br /&gt;
|NA&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|14&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P8_16&lt;br /&gt;
|GPIO1_14&lt;br /&gt;
|gpmc_ad14&lt;br /&gt;
|838h&lt;br /&gt;
|0x038&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|15&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P8_15&lt;br /&gt;
|GPIO1_15&lt;br /&gt;
|gpmc_ad15&lt;br /&gt;
|83Ch&lt;br /&gt;
|0x03C&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|16&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P9_24&lt;br /&gt;
|UART1_TXD&lt;br /&gt;
|uart1_txd&lt;br /&gt;
|984h&lt;br /&gt;
|0x184&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|0&lt;br /&gt;
|Mode_6&lt;br /&gt;
|0&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_45&lt;br /&gt;
|GPIO2_6&lt;br /&gt;
|lcd_data0&lt;br /&gt;
|8A0h&lt;br /&gt;
|0x0A0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|1&lt;br /&gt;
|Mode_6&lt;br /&gt;
|1&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_46&lt;br /&gt;
|GPIO2_7&lt;br /&gt;
|lcd_data1&lt;br /&gt;
|8A4h&lt;br /&gt;
|0x0A4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|2&lt;br /&gt;
|Mode_6&lt;br /&gt;
|2&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_43&lt;br /&gt;
|GPIO2_8&lt;br /&gt;
|lcd_data2&lt;br /&gt;
|8A8h&lt;br /&gt;
|0x0A8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|3&lt;br /&gt;
|Mode_6&lt;br /&gt;
|3&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_44&lt;br /&gt;
|GPIO2_9&lt;br /&gt;
|lcd_data3&lt;br /&gt;
|8ACh&lt;br /&gt;
|0x0AC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|4&lt;br /&gt;
|Mode_6&lt;br /&gt;
|4&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_41&lt;br /&gt;
|GPIO2_10&lt;br /&gt;
|lcd_data4&lt;br /&gt;
|8B0h&lt;br /&gt;
|0x0B0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|5&lt;br /&gt;
|Mode_6&lt;br /&gt;
|5&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_42&lt;br /&gt;
|GPIO2_11&lt;br /&gt;
|lcd_data5&lt;br /&gt;
|8B4h&lt;br /&gt;
|0x0B4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|6&lt;br /&gt;
|Mode_6&lt;br /&gt;
|6&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_39&lt;br /&gt;
|GPIO2_12&lt;br /&gt;
|lcd_data6&lt;br /&gt;
|8B8h&lt;br /&gt;
|0x0B8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|7&lt;br /&gt;
|Mode_6&lt;br /&gt;
|7&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_40&lt;br /&gt;
|GPIO2_13&lt;br /&gt;
|lcd_data7&lt;br /&gt;
|8BCh&lt;br /&gt;
|0x0BC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|8&lt;br /&gt;
|Mode_6&lt;br /&gt;
|8&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_27&lt;br /&gt;
|GPIO2_22&lt;br /&gt;
|lcd_vsync&lt;br /&gt;
|8E0h&lt;br /&gt;
|0x0EO&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|9&lt;br /&gt;
|Mode_6&lt;br /&gt;
|9&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_29&lt;br /&gt;
|GPIO2_23&lt;br /&gt;
|lcd_hsync&lt;br /&gt;
|8E4h&lt;br /&gt;
|0x0E4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|10&lt;br /&gt;
|Mode_6&lt;br /&gt;
|10&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_28&lt;br /&gt;
|GPIO2_24&lt;br /&gt;
|lcd_pclk&lt;br /&gt;
|8E8h&lt;br /&gt;
|0x0E8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|11&lt;br /&gt;
|Mode_6&lt;br /&gt;
|11&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_30&lt;br /&gt;
|GPIO2_25&lt;br /&gt;
|lcd_ac_bias_en&lt;br /&gt;
|8ECh&lt;br /&gt;
|0x0EC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|12&lt;br /&gt;
|Mode_6&lt;br /&gt;
|12&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_21&lt;br /&gt;
|GPIO1_30&lt;br /&gt;
|gpmc_csn1&lt;br /&gt;
|880h&lt;br /&gt;
|0x080&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|13&lt;br /&gt;
|Mode_6&lt;br /&gt;
|13&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_20&lt;br /&gt;
|GPIO1_31&lt;br /&gt;
|gpmc_csn2&lt;br /&gt;
|884h&lt;br /&gt;
|0x084&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|16&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P9_26&lt;br /&gt;
|UART1_RXD&lt;br /&gt;
|uart1_rxd&lt;br /&gt;
|980h&lt;br /&gt;
|0x180&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: red&amp;quot;&amp;gt;&lt;br /&gt;
*Note1: The PRU0 Registers{30,31} Bit 4 (GPIO3_18) is routed to P9_42-GPIO0_7 pin.  You MUST set GPIO0_7 to input mode in pinmuxing.&lt;br /&gt;
&lt;br /&gt;
*Note2: The PRU0 Registers{30,31} Bit 6 (GPIO3_20) is routed to P9_41-GPIO0_20(CLKOUT2). You must set GPIO0_20 to input mode in pinmuxing.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Assembly ==&lt;br /&gt;
The complete list of PRU assembly instructions can be found [http://processors.wiki.ti.com/index.php/PRU_Assembly_Instructions at TI]. &lt;br /&gt;
=== Four instruction classes ===&lt;br /&gt;
* Arithmetic&lt;br /&gt;
* Logical&lt;br /&gt;
* Flow Control&lt;br /&gt;
* Register Load/Store&lt;br /&gt;
&lt;br /&gt;
=== Instruction Syntax ===&lt;br /&gt;
* Mnemonic, followed by comma separated parameter list&lt;br /&gt;
* Parameters can be a register, label, immediate value, or constant table entry&lt;br /&gt;
* Example&lt;br /&gt;
** SUB r3, r4, 10 &lt;br /&gt;
** Subtracts immediate value 10 (decimal) from the value in r4 and then places the result in r3 (or r3 = r4 - 10)&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
* [https://github.com/beagleboard/am335x_pru_package AM335x PRU support package on Github]&lt;br /&gt;
* [https://github.com/beagleboard/am335x_pru_package/blob/master/am335xPruReferenceGuide.pdf?raw=true AM335x PRU-ICSS Reference Guide]&lt;br /&gt;
The documentation on the subsystem is  [[media:spruh73c.pdf|here]].  TI does not support this subsystem and all questions/inquires/problems should be directed to the community.&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/sagedevices/ti-pruv2-assembly-textmate-bundle PRU assembly syntax highlighting for TextMate, Sublime Text, etc.]&lt;br /&gt;
&lt;br /&gt;
* A userspace [https://docs.google.com/file/d/0B80aJokrBccAV1paMTU0bjM1OXc/edit?usp=sharing debugging utility] with credit to PRU_EVTOUT_2 from the #beagle IRC channel.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
* [[BeagleBone_6502_RemoteProc_cape]]&lt;br /&gt;
* [https://github.com/mranostay/beagle-nixie BeagleBone Nixie Cape PRU App]&lt;br /&gt;
* [http://processors.wiki.ti.com/index.php/Soft-UART_Implementation_on_AM335X_PRU_-_Software_Users_Guide PRU Soft UART Driver]&lt;br /&gt;
&lt;br /&gt;
[[Category:ECE497 | PRU]]&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/Ti_AM33XX_PRUSSv2</id>
		<title>Ti AM33XX PRUSSv2</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/Ti_AM33XX_PRUSSv2"/>
				<updated>2013-05-14T04:46:07Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: /* Resources */ Added link to debugger&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The PRUSS (Programmable Real-time Unit Sub System) consists of two 32-bit 200MHz real-time cores, each with 8KB of program memory and direct access to general I/O.&lt;br /&gt;
These cores are connected to various data memories, peripheral modules and an interrupt controller for access to the entire system-on-a-chip via a 32-bit interconnect bus.&lt;br /&gt;
&lt;br /&gt;
PRUs are programmed in [http://en.wikipedia.org/wiki/Assembly_language Assembly], with most commands executing in a single cycle with no caching or pipe-lining, allowing for 100% predictable timings. At 200MHz, a single cycle most operations will take 5ns (nanoseconds) with exception of accessing memory external to PRU to execute.&lt;br /&gt;
&lt;br /&gt;
====This is a Work In Progress====&lt;br /&gt;
&lt;br /&gt;
== Available PRU Resources ==&lt;br /&gt;
[[File:PRUSS.png|AM335x PRUSS]]&lt;br /&gt;
&lt;br /&gt;
[[PRUSSv2 Memory Map|Click here for a full list of register mappings.]]&lt;br /&gt;
&lt;br /&gt;
=== Per PRU ===&lt;br /&gt;
; 8KB program memory&lt;br /&gt;
: Memory used to store instructions and static data AKA Instruction Memory (IRAM). This is the memory in which PRU programs are loaded.&lt;br /&gt;
&lt;br /&gt;
; Enhanced GPIO (EGPIO)&lt;br /&gt;
: High-speed direct access to 16 general purpose output and 17 general purpose input pins for each PRU.&lt;br /&gt;
:; PRU0&lt;br /&gt;
:: ''pr1_pru_0_pru_r30[15:0]'' (PRU0 Register R30 Outputs)&lt;br /&gt;
:: ''pr1_pru_0_pru_r31[16:0]'' (PRU0 Register R31 Inputs)&lt;br /&gt;
:; PRU1&lt;br /&gt;
:: ''pr1_pru_1_pru_r30[15:0]'' (PRU1 Register R30 Outputs)&lt;br /&gt;
:: ''pr1_pru_1_pru_r31[16:0]'' (PRU1 Register R31 Inputs)&lt;br /&gt;
:; Hardware capture modes&lt;br /&gt;
:: Serial 28-bit shift in and out.&lt;br /&gt;
:: Parallel 16-bit capture on clock.&lt;br /&gt;
:: [http://en.wikipedia.org/wiki/Media_Independent_Interface| MII] standardised capture mode, used for implementing media independent Fast Ethernet (100Mbps - 25MHz 4-bit).&lt;br /&gt;
&lt;br /&gt;
; A 32-bit multiply and accumulate unit (MAC)&lt;br /&gt;
: Enables single-cycle integer multiplications with a 64-bit overflow (useful for decimal results).&lt;br /&gt;
&lt;br /&gt;
; 8KB data memory&lt;br /&gt;
: Memory used to store dynamic data. Is accessed over the 32-bit bus and so not single-cycle.&lt;br /&gt;
: One PRU may access the memory of another for passing information but it is recommend to use scratch pad or shared memory, see below.&lt;br /&gt;
&lt;br /&gt;
; [http://en.wikipedia.org/wiki/Open_Core_Protocol| Open Core Protocol] (OCP) master port&lt;br /&gt;
: Access to the data bus that interconnects all peripherals on the SoC, including the ARM Cortex-A8, used for data transfer directly to and from the PRU in Level 3 (L3) memory space.&lt;br /&gt;
&lt;br /&gt;
=== Shared Between PRUs ===&lt;br /&gt;
; Scratch pad&lt;br /&gt;
: 3 banks of 30 32-bit registers (total 90 32-bit registers).&lt;br /&gt;
: Single-cycle access, can be accessed from either PRU for data sharing and signalling or for individual use.&lt;br /&gt;
&lt;br /&gt;
; 12KB data memory&lt;br /&gt;
: Accessed over the 32-but bus, not single-cycle.&lt;br /&gt;
&lt;br /&gt;
=== Local Peripherals ===&lt;br /&gt;
Local peripherals are those present within the PRUSS and not those belonging to the entire SoC. Peripherals are accessed from PRUs over the Switched Central Resource (SCR) 32-bit bus within the PRUSS.&lt;br /&gt;
&lt;br /&gt;
Attached to the SCR bus is also an OCP slave, enabling OCP masters from outside of the PRUSS to access these local peripherals in Level 4 (L4) memory space.&lt;br /&gt;
&lt;br /&gt;
; Enhanced Capture Model (eCAP)&lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
; Industrial Ethernet Peripheral (IEP)&lt;br /&gt;
&lt;br /&gt;
; Universal Asynchronous Receiver/Transmitter (UART0)&lt;br /&gt;
: Used to perform serial data transmission to the TL16C550 industry standard.&lt;br /&gt;
: 16-bit FIFO receive and transmit buffers + per byte error status.&lt;br /&gt;
: Can generate Interrupt requests for the PRUSS Interrupt Controller.&lt;br /&gt;
: Can generate DMA requests for the EDMA SoC DMA controller.&lt;br /&gt;
: Maximum transmission speed of 192MHz (192Mbps - 24MB/s).&lt;br /&gt;
&lt;br /&gt;
== Communication ==&lt;br /&gt;
Communication between various elements of the PRUSS or the wider SoC may take place either directly, over a bus, via interrupts or via DMA.&lt;br /&gt;
&lt;br /&gt;
The following lists will expose all possible communication approaches for each likely scenario.&lt;br /&gt;
&lt;br /&gt;
For communication via interrupts, please first read the section on the [[PRUSSv2 Interrupt Controller]].&lt;br /&gt;
&lt;br /&gt;
[[PRUSSv2 Interrupts| Click here for a full list of PRUSS Interrupts.]]&lt;br /&gt;
&lt;br /&gt;
The current [https://github.com/beagleboard/am335x_pru_package/blob/master/pru_sw/app_loader/interface/prussdrv.c example PRU loader] uses [http://arago-project.org/git/projects/?p=linux-am33x.git;a=commit;h=f1a304e7941cc76353363a139cbb6a4b1ca7c737 UIO], but this ideally should be replaced with [http://omappedia.org/wiki/Category:RPMsg remoteproc] rather than poking at the registers from userspace. In the mean time, according to [https://groups.google.com/d/msg/beagleboard/gqCjxh4uZi0/_uIUD8ZF88QJ this discussion:] we can use the included script and load the uio_pruss userspace driver.&lt;br /&gt;
&lt;br /&gt;
=== PRU to Host (PRU to ARM Cortex-A8) ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Host to PRU (ARM Cortex-A8 to PRU) ===&lt;br /&gt;
==== Interrupts ====&lt;br /&gt;
Each PRU has access to host interrupt channels Host-0 and Host-1 through register R31 bit 30 and bit 31 respectively.&lt;br /&gt;
By probing these registers, a PRU can determine if an interrupt is currently present on each host channel.&lt;br /&gt;
&lt;br /&gt;
To configure &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PRU to external peripherals ===&lt;br /&gt;
=== External peripherals to PRU ===&lt;br /&gt;
=== PRU to internal peripherals ===&lt;br /&gt;
=== Internal peripherals to PRU ===&lt;br /&gt;
&lt;br /&gt;
== Loading a PRU Program ==&lt;br /&gt;
&lt;br /&gt;
==Beaglebone PRU connections and modes==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|'''PRU #'''&lt;br /&gt;
|'''R30(input) bit'''&lt;br /&gt;
|'''Pinmux Mode'''&lt;br /&gt;
|'''R31(output) bit'''&lt;br /&gt;
|'''Pinmux Mode'''&lt;br /&gt;
|'''BB Header'''&lt;br /&gt;
|'''BB Pin Name'''&lt;br /&gt;
|'''ZCZ BallName'''&lt;br /&gt;
|'''Offset Reg'''&lt;br /&gt;
|'''DT Offset'''&lt;br /&gt;
|'''Input Mode'''&lt;br /&gt;
|'''Output Mode'''&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|0&lt;br /&gt;
|Mode_6&lt;br /&gt;
|0&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_31&lt;br /&gt;
|SPI1_SCLK&lt;br /&gt;
|mcasp0_aclkx&lt;br /&gt;
|990h&lt;br /&gt;
|0x190&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|1&lt;br /&gt;
|Mode_6&lt;br /&gt;
|1&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_31&lt;br /&gt;
|SPI1_D0&lt;br /&gt;
|mcasp0_fsx&lt;br /&gt;
|994h&lt;br /&gt;
|0x194&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|2&lt;br /&gt;
|Mode_6&lt;br /&gt;
|2&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_30&lt;br /&gt;
|SPI1_D1&lt;br /&gt;
|mcasp0_axr0&lt;br /&gt;
|998h&lt;br /&gt;
|0x198&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|3&lt;br /&gt;
|Mode_6&lt;br /&gt;
|3&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_28&lt;br /&gt;
|SPI1_CS0&lt;br /&gt;
|mcasp0_ahclkr&lt;br /&gt;
|99Ch&lt;br /&gt;
|0x19C&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|4&lt;br /&gt;
|Mode_6&lt;br /&gt;
|4&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_42&lt;br /&gt;
|&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;(*note1)&amp;lt;/span&amp;gt;&lt;br /&gt;
|mcasp0_aclkr&lt;br /&gt;
|9A0h&lt;br /&gt;
|0x1A0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|5&lt;br /&gt;
|Mode_6&lt;br /&gt;
|5&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_27&lt;br /&gt;
|GPIO3_19&lt;br /&gt;
|mcasp0_fsr&lt;br /&gt;
|9A4h&lt;br /&gt;
|0x1A4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|6&lt;br /&gt;
|Mode_6&lt;br /&gt;
|6&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_41&lt;br /&gt;
|&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;(*note2)&amp;lt;/span&amp;gt;&lt;br /&gt;
|mcasp0_axr1&lt;br /&gt;
|9A8h&lt;br /&gt;
|0x1A8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|7&lt;br /&gt;
|Mode_6&lt;br /&gt;
|7&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_25&lt;br /&gt;
|GPIO3_21&lt;br /&gt;
|mcasp0_ahclkx&lt;br /&gt;
|9ACh&lt;br /&gt;
|0x1AC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|14&lt;br /&gt;
|Mode_6&lt;br /&gt;
|P8_12&lt;br /&gt;
|GPIO1_12&lt;br /&gt;
|gpmc_ad12&lt;br /&gt;
|830h&lt;br /&gt;
|0x030&lt;br /&gt;
|NA&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|15&lt;br /&gt;
|Mode_6&lt;br /&gt;
|P8_11&lt;br /&gt;
|GPIO1_13&lt;br /&gt;
|gpmc_ad9&lt;br /&gt;
|824h&lt;br /&gt;
|0x024&lt;br /&gt;
|NA&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|14&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P8_16&lt;br /&gt;
|GPIO1_14&lt;br /&gt;
|gpmc_ad14&lt;br /&gt;
|838h&lt;br /&gt;
|0x038&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|15&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P8_15&lt;br /&gt;
|GPIO1_15&lt;br /&gt;
|gpmc_ad15&lt;br /&gt;
|83Ch&lt;br /&gt;
|0x03C&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|16&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P9_24&lt;br /&gt;
|UART1_TXD&lt;br /&gt;
|uart1_txd&lt;br /&gt;
|984h&lt;br /&gt;
|0x184&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|0&lt;br /&gt;
|Mode_6&lt;br /&gt;
|0&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_45&lt;br /&gt;
|GPIO2_6&lt;br /&gt;
|lcd_data0&lt;br /&gt;
|8A0h&lt;br /&gt;
|0x0A0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|1&lt;br /&gt;
|Mode_6&lt;br /&gt;
|1&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_46&lt;br /&gt;
|GPIO2_7&lt;br /&gt;
|lcd_data1&lt;br /&gt;
|8A4h&lt;br /&gt;
|0x0A4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|2&lt;br /&gt;
|Mode_6&lt;br /&gt;
|2&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_43&lt;br /&gt;
|GPIO2_8&lt;br /&gt;
|lcd_data2&lt;br /&gt;
|8A8h&lt;br /&gt;
|0x0A8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|3&lt;br /&gt;
|Mode_6&lt;br /&gt;
|3&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_44&lt;br /&gt;
|GPIO2_9&lt;br /&gt;
|lcd_data3&lt;br /&gt;
|8ACh&lt;br /&gt;
|0x0AC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|4&lt;br /&gt;
|Mode_6&lt;br /&gt;
|4&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_41&lt;br /&gt;
|GPIO2_10&lt;br /&gt;
|lcd_data4&lt;br /&gt;
|8B0h&lt;br /&gt;
|0x0B0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|5&lt;br /&gt;
|Mode_6&lt;br /&gt;
|5&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_42&lt;br /&gt;
|GPIO2_11&lt;br /&gt;
|lcd_data5&lt;br /&gt;
|8B4h&lt;br /&gt;
|0x0B4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|6&lt;br /&gt;
|Mode_6&lt;br /&gt;
|6&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_39&lt;br /&gt;
|GPIO2_12&lt;br /&gt;
|lcd_data6&lt;br /&gt;
|8B8h&lt;br /&gt;
|0x0B8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|7&lt;br /&gt;
|Mode_6&lt;br /&gt;
|7&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_40&lt;br /&gt;
|GPIO2_13&lt;br /&gt;
|lcd_data7&lt;br /&gt;
|8BCh&lt;br /&gt;
|0x0BC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|8&lt;br /&gt;
|Mode_6&lt;br /&gt;
|8&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_27&lt;br /&gt;
|GPIO2_22&lt;br /&gt;
|lcd_vsync&lt;br /&gt;
|8E0h&lt;br /&gt;
|0x0EO&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|9&lt;br /&gt;
|Mode_6&lt;br /&gt;
|9&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_29&lt;br /&gt;
|GPIO2_23&lt;br /&gt;
|lcd_hsync&lt;br /&gt;
|8E4h&lt;br /&gt;
|0x0E4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|10&lt;br /&gt;
|Mode_6&lt;br /&gt;
|10&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_28&lt;br /&gt;
|GPIO2_24&lt;br /&gt;
|lcd_pclk&lt;br /&gt;
|8E8h&lt;br /&gt;
|0x0E8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|11&lt;br /&gt;
|Mode_6&lt;br /&gt;
|11&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_30&lt;br /&gt;
|GPIO2_25&lt;br /&gt;
|lcd_ac_bias_en&lt;br /&gt;
|8ECh&lt;br /&gt;
|0x0EC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|12&lt;br /&gt;
|Mode_6&lt;br /&gt;
|12&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_21&lt;br /&gt;
|GPIO1_30&lt;br /&gt;
|gpmc_csn1&lt;br /&gt;
|880h&lt;br /&gt;
|0x080&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|13&lt;br /&gt;
|Mode_6&lt;br /&gt;
|13&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_20&lt;br /&gt;
|GPIO1_31&lt;br /&gt;
|gpmc_csn2&lt;br /&gt;
|884h&lt;br /&gt;
|0x084&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|16&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P9_26&lt;br /&gt;
|UART1_RXD&lt;br /&gt;
|uart1_rxd&lt;br /&gt;
|980h&lt;br /&gt;
|0x180&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: red&amp;quot;&amp;gt;&lt;br /&gt;
*Note1: The PRU0 Registers{30,31} Bit 4 (GPIO3_18) is routed to P9_42-GPIO0_7 pin.  You MUST set GPIO0_7 to input mode in pinmuxing.&lt;br /&gt;
&lt;br /&gt;
*Note2: The PRU0 Registers{30,31} Bit 6 (GPIO3_20) is routed to P9_41-GPIO0_20(CLKOUT2). You must set GPIO0_20 to input mode in pinmuxing.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Assembly ==&lt;br /&gt;
The complete list of PRU assembly instructions can be found [http://processors.wiki.ti.com/index.php/PRU_Assembly_Instructions at TI]. &lt;br /&gt;
=== Four instruction classes ===&lt;br /&gt;
* Arithmetic&lt;br /&gt;
* Logical&lt;br /&gt;
* Flow Control&lt;br /&gt;
* Register Load/Store&lt;br /&gt;
&lt;br /&gt;
=== Instruction Syntax ===&lt;br /&gt;
* Mnemonic, followed by comma separated parameter list&lt;br /&gt;
* Parameters can be a register, label, immediate value, or constant table entry&lt;br /&gt;
* Example&lt;br /&gt;
** SUB r3, r4, 10 &lt;br /&gt;
** Subtracts immediate value 10 (decimal) from the value in r4 and then places the result in r3 (or r3 = r4 - 10)&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
* [https://github.com/beagleboard/am335x_pru_package AM335x PRU support package on Github]&lt;br /&gt;
* [https://github.com/beagleboard/am335x_pru_package/blob/master/am335xPruReferenceGuide.pdf?raw=true AM335x PRU-ICSS Reference Guide]&lt;br /&gt;
The documentation on the subsystem is  [[media:spruh73c.pdf|here]].  TI does not support this subsystem and all questions/inquires/problems should be directed to the community.&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/sagedevices/ti-pruv2-assembly-textmate-bundle PRU assembly syntax highlighting for TextMate, Sublime Text, etc.]&lt;br /&gt;
&lt;br /&gt;
* A userspace [https://docs.google.com/file/d/0B80aJokrBccAV1paMTU0bjM1OXc/edit?usp=sharing debugging utility] with credit to PRU_EVTOUT_2 from the #beagle IRC channel.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
* [[BeagleBone_6502_RemoteProc_cape]]&lt;br /&gt;
* [https://github.com/mranostay/beagle-nixie BeagleBone Nixie Cape PRU App]&lt;br /&gt;
* [http://processors.wiki.ti.com/index.php/Soft-UART_Implementation_on_AM335X_PRU_-_Software_Users_Guide PRU Soft UART Driver]&lt;br /&gt;
&lt;br /&gt;
[[Category:ECE497 | PRU]]&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/Ti_AM33XX_PRUSSv2</id>
		<title>Ti AM33XX PRUSSv2</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/Ti_AM33XX_PRUSSv2"/>
				<updated>2013-05-13T19:58:04Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: Added category for ECE497&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The PRUSS (Programmable Real-time Unit Sub System) consists of two 32-bit 200MHz real-time cores, each with 8KB of program memory and direct access to general I/O.&lt;br /&gt;
These cores are connected to various data memories, peripheral modules and an interrupt controller for access to the entire system-on-a-chip via a 32-bit interconnect bus.&lt;br /&gt;
&lt;br /&gt;
PRUs are programmed in [http://en.wikipedia.org/wiki/Assembly_language Assembly], with most commands executing in a single cycle with no caching or pipe-lining, allowing for 100% predictable timings. At 200MHz, a single cycle most operations will take 5ns (nanoseconds) with exception of accessing memory external to PRU to execute.&lt;br /&gt;
&lt;br /&gt;
====This is a Work In Progress====&lt;br /&gt;
&lt;br /&gt;
== Available PRU Resources ==&lt;br /&gt;
[[File:PRUSS.png|AM335x PRUSS]]&lt;br /&gt;
&lt;br /&gt;
[[PRUSSv2 Memory Map|Click here for a full list of register mappings.]]&lt;br /&gt;
&lt;br /&gt;
=== Per PRU ===&lt;br /&gt;
; 8KB program memory&lt;br /&gt;
: Memory used to store instructions and static data AKA Instruction Memory (IRAM). This is the memory in which PRU programs are loaded.&lt;br /&gt;
&lt;br /&gt;
; Enhanced GPIO (EGPIO)&lt;br /&gt;
: High-speed direct access to 16 general purpose output and 17 general purpose input pins for each PRU.&lt;br /&gt;
:; PRU0&lt;br /&gt;
:: ''pr1_pru_0_pru_r30[15:0]'' (PRU0 Register R30 Outputs)&lt;br /&gt;
:: ''pr1_pru_0_pru_r31[16:0]'' (PRU0 Register R31 Inputs)&lt;br /&gt;
:; PRU1&lt;br /&gt;
:: ''pr1_pru_1_pru_r30[15:0]'' (PRU1 Register R30 Outputs)&lt;br /&gt;
:: ''pr1_pru_1_pru_r31[16:0]'' (PRU1 Register R31 Inputs)&lt;br /&gt;
:; Hardware capture modes&lt;br /&gt;
:: Serial 28-bit shift in and out.&lt;br /&gt;
:: Parallel 16-bit capture on clock.&lt;br /&gt;
:: [http://en.wikipedia.org/wiki/Media_Independent_Interface| MII] standardised capture mode, used for implementing media independent Fast Ethernet (100Mbps - 25MHz 4-bit).&lt;br /&gt;
&lt;br /&gt;
; A 32-bit multiply and accumulate unit (MAC)&lt;br /&gt;
: Enables single-cycle integer multiplications with a 64-bit overflow (useful for decimal results).&lt;br /&gt;
&lt;br /&gt;
; 8KB data memory&lt;br /&gt;
: Memory used to store dynamic data. Is accessed over the 32-bit bus and so not single-cycle.&lt;br /&gt;
: One PRU may access the memory of another for passing information but it is recommend to use scratch pad or shared memory, see below.&lt;br /&gt;
&lt;br /&gt;
; [http://en.wikipedia.org/wiki/Open_Core_Protocol| Open Core Protocol] (OCP) master port&lt;br /&gt;
: Access to the data bus that interconnects all peripherals on the SoC, including the ARM Cortex-A8, used for data transfer directly to and from the PRU in Level 3 (L3) memory space.&lt;br /&gt;
&lt;br /&gt;
=== Shared Between PRUs ===&lt;br /&gt;
; Scratch pad&lt;br /&gt;
: 3 banks of 30 32-bit registers (total 90 32-bit registers).&lt;br /&gt;
: Single-cycle access, can be accessed from either PRU for data sharing and signalling or for individual use.&lt;br /&gt;
&lt;br /&gt;
; 12KB data memory&lt;br /&gt;
: Accessed over the 32-but bus, not single-cycle.&lt;br /&gt;
&lt;br /&gt;
=== Local Peripherals ===&lt;br /&gt;
Local peripherals are those present within the PRUSS and not those belonging to the entire SoC. Peripherals are accessed from PRUs over the Switched Central Resource (SCR) 32-bit bus within the PRUSS.&lt;br /&gt;
&lt;br /&gt;
Attached to the SCR bus is also an OCP slave, enabling OCP masters from outside of the PRUSS to access these local peripherals in Level 4 (L4) memory space.&lt;br /&gt;
&lt;br /&gt;
; Enhanced Capture Model (eCAP)&lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
; Industrial Ethernet Peripheral (IEP)&lt;br /&gt;
&lt;br /&gt;
; Universal Asynchronous Receiver/Transmitter (UART0)&lt;br /&gt;
: Used to perform serial data transmission to the TL16C550 industry standard.&lt;br /&gt;
: 16-bit FIFO receive and transmit buffers + per byte error status.&lt;br /&gt;
: Can generate Interrupt requests for the PRUSS Interrupt Controller.&lt;br /&gt;
: Can generate DMA requests for the EDMA SoC DMA controller.&lt;br /&gt;
: Maximum transmission speed of 192MHz (192Mbps - 24MB/s).&lt;br /&gt;
&lt;br /&gt;
== Communication ==&lt;br /&gt;
Communication between various elements of the PRUSS or the wider SoC may take place either directly, over a bus, via interrupts or via DMA.&lt;br /&gt;
&lt;br /&gt;
The following lists will expose all possible communication approaches for each likely scenario.&lt;br /&gt;
&lt;br /&gt;
For communication via interrupts, please first read the section on the [[PRUSSv2 Interrupt Controller]].&lt;br /&gt;
&lt;br /&gt;
[[PRUSSv2 Interrupts| Click here for a full list of PRUSS Interrupts.]]&lt;br /&gt;
&lt;br /&gt;
The current [https://github.com/beagleboard/am335x_pru_package/blob/master/pru_sw/app_loader/interface/prussdrv.c example PRU loader] uses [http://arago-project.org/git/projects/?p=linux-am33x.git;a=commit;h=f1a304e7941cc76353363a139cbb6a4b1ca7c737 UIO], but this ideally should be replaced with [http://omappedia.org/wiki/Category:RPMsg remoteproc] rather than poking at the registers from userspace. In the mean time, according to [https://groups.google.com/d/msg/beagleboard/gqCjxh4uZi0/_uIUD8ZF88QJ this discussion:] we can use the included script and load the uio_pruss userspace driver.&lt;br /&gt;
&lt;br /&gt;
=== PRU to Host (PRU to ARM Cortex-A8) ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Host to PRU (ARM Cortex-A8 to PRU) ===&lt;br /&gt;
==== Interrupts ====&lt;br /&gt;
Each PRU has access to host interrupt channels Host-0 and Host-1 through register R31 bit 30 and bit 31 respectively.&lt;br /&gt;
By probing these registers, a PRU can determine if an interrupt is currently present on each host channel.&lt;br /&gt;
&lt;br /&gt;
To configure &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PRU to external peripherals ===&lt;br /&gt;
=== External peripherals to PRU ===&lt;br /&gt;
=== PRU to internal peripherals ===&lt;br /&gt;
=== Internal peripherals to PRU ===&lt;br /&gt;
&lt;br /&gt;
== Loading a PRU Program ==&lt;br /&gt;
&lt;br /&gt;
==Beaglebone PRU connections and modes==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|'''PRU #'''&lt;br /&gt;
|'''R30(input) bit'''&lt;br /&gt;
|'''Pinmux Mode'''&lt;br /&gt;
|'''R31(output) bit'''&lt;br /&gt;
|'''Pinmux Mode'''&lt;br /&gt;
|'''BB Header'''&lt;br /&gt;
|'''BB Pin Name'''&lt;br /&gt;
|'''ZCZ BallName'''&lt;br /&gt;
|'''Offset Reg'''&lt;br /&gt;
|'''DT Offset'''&lt;br /&gt;
|'''Input Mode'''&lt;br /&gt;
|'''Output Mode'''&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|0&lt;br /&gt;
|Mode_6&lt;br /&gt;
|0&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_31&lt;br /&gt;
|SPI1_SCLK&lt;br /&gt;
|mcasp0_aclkx&lt;br /&gt;
|990h&lt;br /&gt;
|0x190&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|1&lt;br /&gt;
|Mode_6&lt;br /&gt;
|1&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_31&lt;br /&gt;
|SPI1_D0&lt;br /&gt;
|mcasp0_fsx&lt;br /&gt;
|994h&lt;br /&gt;
|0x194&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|2&lt;br /&gt;
|Mode_6&lt;br /&gt;
|2&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_30&lt;br /&gt;
|SPI1_D1&lt;br /&gt;
|mcasp0_axr0&lt;br /&gt;
|998h&lt;br /&gt;
|0x198&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|3&lt;br /&gt;
|Mode_6&lt;br /&gt;
|3&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_28&lt;br /&gt;
|SPI1_CS0&lt;br /&gt;
|mcasp0_ahclkr&lt;br /&gt;
|99Ch&lt;br /&gt;
|0x19C&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|4&lt;br /&gt;
|Mode_6&lt;br /&gt;
|4&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_42&lt;br /&gt;
|(*see note1 below)&lt;br /&gt;
|mcasp0_aclkr&lt;br /&gt;
|9A0h&lt;br /&gt;
|0x1A0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|5&lt;br /&gt;
|Mode_6&lt;br /&gt;
|5&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_27&lt;br /&gt;
|GPIO3_19&lt;br /&gt;
|mcasp0_fsr&lt;br /&gt;
|9A4h&lt;br /&gt;
|0x1A4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|6&lt;br /&gt;
|Mode_6&lt;br /&gt;
|6&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_41&lt;br /&gt;
|(*see note2 below)&lt;br /&gt;
|mcasp0_axr1&lt;br /&gt;
|9A8h&lt;br /&gt;
|0x1A8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|7&lt;br /&gt;
|Mode_6&lt;br /&gt;
|7&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_25&lt;br /&gt;
|GPIO3_21&lt;br /&gt;
|mcasp0_ahclkx&lt;br /&gt;
|9ACh&lt;br /&gt;
|0x1AC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|14&lt;br /&gt;
|Mode_6&lt;br /&gt;
|P8_12&lt;br /&gt;
|GPIO1_12&lt;br /&gt;
|gpmc_ad12&lt;br /&gt;
|830h&lt;br /&gt;
|0x030&lt;br /&gt;
|NA&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|15&lt;br /&gt;
|Mode_6&lt;br /&gt;
|P8_11&lt;br /&gt;
|GPIO1_13&lt;br /&gt;
|gpmc_ad9&lt;br /&gt;
|824h&lt;br /&gt;
|0x024&lt;br /&gt;
|NA&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|14&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P8_16&lt;br /&gt;
|GPIO1_14&lt;br /&gt;
|gpmc_ad14&lt;br /&gt;
|838h&lt;br /&gt;
|0x038&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|15&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P8_15&lt;br /&gt;
|GPIO1_15&lt;br /&gt;
|gpmc_ad15&lt;br /&gt;
|83Ch&lt;br /&gt;
|0x03C&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|16&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P9_24&lt;br /&gt;
|UART1_TXD&lt;br /&gt;
|uart1_txd&lt;br /&gt;
|984h&lt;br /&gt;
|0x184&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|0&lt;br /&gt;
|Mode_6&lt;br /&gt;
|0&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_45&lt;br /&gt;
|GPIO2_6&lt;br /&gt;
|lcd_data0&lt;br /&gt;
|8A0h&lt;br /&gt;
|0x0A0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|1&lt;br /&gt;
|Mode_6&lt;br /&gt;
|1&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_46&lt;br /&gt;
|GPIO2_7&lt;br /&gt;
|lcd_data1&lt;br /&gt;
|8A4h&lt;br /&gt;
|0x0A4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|2&lt;br /&gt;
|Mode_6&lt;br /&gt;
|2&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_43&lt;br /&gt;
|GPIO2_8&lt;br /&gt;
|lcd_data2&lt;br /&gt;
|8A8h&lt;br /&gt;
|0x0A8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|3&lt;br /&gt;
|Mode_6&lt;br /&gt;
|3&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_44&lt;br /&gt;
|GPIO2_9&lt;br /&gt;
|lcd_data3&lt;br /&gt;
|8ACh&lt;br /&gt;
|0x0AC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|4&lt;br /&gt;
|Mode_6&lt;br /&gt;
|4&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_41&lt;br /&gt;
|GPIO2_10&lt;br /&gt;
|lcd_data4&lt;br /&gt;
|8B0h&lt;br /&gt;
|0x0B0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|5&lt;br /&gt;
|Mode_6&lt;br /&gt;
|5&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_42&lt;br /&gt;
|GPIO2_11&lt;br /&gt;
|lcd_data5&lt;br /&gt;
|8B4h&lt;br /&gt;
|0x0B4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|6&lt;br /&gt;
|Mode_6&lt;br /&gt;
|6&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_39&lt;br /&gt;
|GPIO2_12&lt;br /&gt;
|lcd_data6&lt;br /&gt;
|8B8h&lt;br /&gt;
|0x0B8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|7&lt;br /&gt;
|Mode_6&lt;br /&gt;
|7&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_40&lt;br /&gt;
|GPIO2_13&lt;br /&gt;
|lcd_data7&lt;br /&gt;
|8BCh&lt;br /&gt;
|0x0BC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|8&lt;br /&gt;
|Mode_6&lt;br /&gt;
|8&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_27&lt;br /&gt;
|GPIO2_22&lt;br /&gt;
|lcd_vsync&lt;br /&gt;
|8E0h&lt;br /&gt;
|0x0EO&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|9&lt;br /&gt;
|Mode_6&lt;br /&gt;
|9&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_29&lt;br /&gt;
|GPIO2_23&lt;br /&gt;
|lcd_hsync&lt;br /&gt;
|8E4h&lt;br /&gt;
|0x0E4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|10&lt;br /&gt;
|Mode_6&lt;br /&gt;
|10&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_28&lt;br /&gt;
|GPIO2_24&lt;br /&gt;
|lcd_pclk&lt;br /&gt;
|8E8h&lt;br /&gt;
|0x0E8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|11&lt;br /&gt;
|Mode_6&lt;br /&gt;
|11&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_30&lt;br /&gt;
|GPIO2_25&lt;br /&gt;
|lcd_ac_bias_en&lt;br /&gt;
|8ECh&lt;br /&gt;
|0x0EC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|12&lt;br /&gt;
|Mode_6&lt;br /&gt;
|12&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_21&lt;br /&gt;
|GPIO1_30&lt;br /&gt;
|gpmc_csn1&lt;br /&gt;
|880h&lt;br /&gt;
|0x080&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|13&lt;br /&gt;
|Mode_6&lt;br /&gt;
|13&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_20&lt;br /&gt;
|GPIO1_31&lt;br /&gt;
|gpmc_csn2&lt;br /&gt;
|884h&lt;br /&gt;
|0x084&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|16&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P9_26&lt;br /&gt;
|UART1_RXD&lt;br /&gt;
|uart1_rxd&lt;br /&gt;
|980h&lt;br /&gt;
|0x180&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*Note1: The PRU0 Registers{30,31} Bit 4 (GPIO3_18) is routed to P9_42-GPIO0_7 pin.  You MUST set GPIO0_7 to input mode in pinmuxing.&lt;br /&gt;
&lt;br /&gt;
*Note2: The PRU0 Registers{30,31} Bit 6 (GPIO3_20) is routed to P9_41-GPIO0_20(CLKOUT2). You must set GPIO0_20 to input mode in pinmuxing.&lt;br /&gt;
&lt;br /&gt;
== Assembly ==&lt;br /&gt;
The complete list of PRU assembly instructions can be found [http://processors.wiki.ti.com/index.php/PRU_Assembly_Instructions at TI]. &lt;br /&gt;
=== Four instruction classes ===&lt;br /&gt;
* Arithmetic&lt;br /&gt;
* Logical&lt;br /&gt;
* Flow Control&lt;br /&gt;
* Register Load/Store&lt;br /&gt;
&lt;br /&gt;
=== Instruction Syntax ===&lt;br /&gt;
* Mnemonic, followed by comma separated parameter list&lt;br /&gt;
* Parameters can be a register, label, immediate value, or constant table entry&lt;br /&gt;
* Example&lt;br /&gt;
** SUB r3, r4, 10 &lt;br /&gt;
** Subtracts immediate value 10 (decimal) from the value in r4 and then places the result in r3 (or r3 = r4 - 10)&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
* [https://github.com/beagleboard/am335x_pru_package AM335x PRU support package on Github]&lt;br /&gt;
* [https://github.com/beagleboard/am335x_pru_package/blob/master/am335xPruReferenceGuide.pdf?raw=true AM335x PRU-ICSS Reference Guide]&lt;br /&gt;
The documentation on the subsystem is  [[media:spruh73c.pdf|here]].  TI does not support this subsystem and all questions/inquires/problems should be directed to the community.&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/sagedevices/ti-pruv2-assembly-textmate-bundle PRU assembly syntax highlighting for TextMate, Sublime Text, etc.]&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
* [[BeagleBone_6502_RemoteProc_cape]]&lt;br /&gt;
* [https://github.com/mranostay/beagle-nixie BeagleBone Nixie Cape PRU App]&lt;br /&gt;
* [http://processors.wiki.ti.com/index.php/Soft-UART_Implementation_on_AM335X_PRU_-_Software_Users_Guide PRU Soft UART Driver]&lt;br /&gt;
&lt;br /&gt;
[[Category:ECE497 | PRU]]&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/Ti_AM33XX_PRUSSv2</id>
		<title>Ti AM33XX PRUSSv2</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/Ti_AM33XX_PRUSSv2"/>
				<updated>2013-05-13T19:53:05Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: Added assembly information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The PRUSS (Programmable Real-time Unit Sub System) consists of two 32-bit 200MHz real-time cores, each with 8KB of program memory and direct access to general I/O.&lt;br /&gt;
These cores are connected to various data memories, peripheral modules and an interrupt controller for access to the entire system-on-a-chip via a 32-bit interconnect bus.&lt;br /&gt;
&lt;br /&gt;
PRUs are programmed in [http://en.wikipedia.org/wiki/Assembly_language Assembly], with most commands executing in a single cycle with no caching or pipe-lining, allowing for 100% predictable timings. At 200MHz, a single cycle most operations will take 5ns (nanoseconds) with exception of accessing memory external to PRU to execute.&lt;br /&gt;
&lt;br /&gt;
====This is a Work In Progress====&lt;br /&gt;
&lt;br /&gt;
== Available PRU Resources ==&lt;br /&gt;
[[File:PRUSS.png|AM335x PRUSS]]&lt;br /&gt;
&lt;br /&gt;
[[PRUSSv2 Memory Map|Click here for a full list of register mappings.]]&lt;br /&gt;
&lt;br /&gt;
=== Per PRU ===&lt;br /&gt;
; 8KB program memory&lt;br /&gt;
: Memory used to store instructions and static data AKA Instruction Memory (IRAM). This is the memory in which PRU programs are loaded.&lt;br /&gt;
&lt;br /&gt;
; Enhanced GPIO (EGPIO)&lt;br /&gt;
: High-speed direct access to 16 general purpose output and 17 general purpose input pins for each PRU.&lt;br /&gt;
:; PRU0&lt;br /&gt;
:: ''pr1_pru_0_pru_r30[15:0]'' (PRU0 Register R30 Outputs)&lt;br /&gt;
:: ''pr1_pru_0_pru_r31[16:0]'' (PRU0 Register R31 Inputs)&lt;br /&gt;
:; PRU1&lt;br /&gt;
:: ''pr1_pru_1_pru_r30[15:0]'' (PRU1 Register R30 Outputs)&lt;br /&gt;
:: ''pr1_pru_1_pru_r31[16:0]'' (PRU1 Register R31 Inputs)&lt;br /&gt;
:; Hardware capture modes&lt;br /&gt;
:: Serial 28-bit shift in and out.&lt;br /&gt;
:: Parallel 16-bit capture on clock.&lt;br /&gt;
:: [http://en.wikipedia.org/wiki/Media_Independent_Interface| MII] standardised capture mode, used for implementing media independent Fast Ethernet (100Mbps - 25MHz 4-bit).&lt;br /&gt;
&lt;br /&gt;
; A 32-bit multiply and accumulate unit (MAC)&lt;br /&gt;
: Enables single-cycle integer multiplications with a 64-bit overflow (useful for decimal results).&lt;br /&gt;
&lt;br /&gt;
; 8KB data memory&lt;br /&gt;
: Memory used to store dynamic data. Is accessed over the 32-bit bus and so not single-cycle.&lt;br /&gt;
: One PRU may access the memory of another for passing information but it is recommend to use scratch pad or shared memory, see below.&lt;br /&gt;
&lt;br /&gt;
; [http://en.wikipedia.org/wiki/Open_Core_Protocol| Open Core Protocol] (OCP) master port&lt;br /&gt;
: Access to the data bus that interconnects all peripherals on the SoC, including the ARM Cortex-A8, used for data transfer directly to and from the PRU in Level 3 (L3) memory space.&lt;br /&gt;
&lt;br /&gt;
=== Shared Between PRUs ===&lt;br /&gt;
; Scratch pad&lt;br /&gt;
: 3 banks of 30 32-bit registers (total 90 32-bit registers).&lt;br /&gt;
: Single-cycle access, can be accessed from either PRU for data sharing and signalling or for individual use.&lt;br /&gt;
&lt;br /&gt;
; 12KB data memory&lt;br /&gt;
: Accessed over the 32-but bus, not single-cycle.&lt;br /&gt;
&lt;br /&gt;
=== Local Peripherals ===&lt;br /&gt;
Local peripherals are those present within the PRUSS and not those belonging to the entire SoC. Peripherals are accessed from PRUs over the Switched Central Resource (SCR) 32-bit bus within the PRUSS.&lt;br /&gt;
&lt;br /&gt;
Attached to the SCR bus is also an OCP slave, enabling OCP masters from outside of the PRUSS to access these local peripherals in Level 4 (L4) memory space.&lt;br /&gt;
&lt;br /&gt;
; Enhanced Capture Model (eCAP)&lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
; Industrial Ethernet Peripheral (IEP)&lt;br /&gt;
&lt;br /&gt;
; Universal Asynchronous Receiver/Transmitter (UART0)&lt;br /&gt;
: Used to perform serial data transmission to the TL16C550 industry standard.&lt;br /&gt;
: 16-bit FIFO receive and transmit buffers + per byte error status.&lt;br /&gt;
: Can generate Interrupt requests for the PRUSS Interrupt Controller.&lt;br /&gt;
: Can generate DMA requests for the EDMA SoC DMA controller.&lt;br /&gt;
: Maximum transmission speed of 192MHz (192Mbps - 24MB/s).&lt;br /&gt;
&lt;br /&gt;
== Communication ==&lt;br /&gt;
Communication between various elements of the PRUSS or the wider SoC may take place either directly, over a bus, via interrupts or via DMA.&lt;br /&gt;
&lt;br /&gt;
The following lists will expose all possible communication approaches for each likely scenario.&lt;br /&gt;
&lt;br /&gt;
For communication via interrupts, please first read the section on the [[PRUSSv2 Interrupt Controller]].&lt;br /&gt;
&lt;br /&gt;
[[PRUSSv2 Interrupts| Click here for a full list of PRUSS Interrupts.]]&lt;br /&gt;
&lt;br /&gt;
The current [https://github.com/beagleboard/am335x_pru_package/blob/master/pru_sw/app_loader/interface/prussdrv.c example PRU loader] uses [http://arago-project.org/git/projects/?p=linux-am33x.git;a=commit;h=f1a304e7941cc76353363a139cbb6a4b1ca7c737 UIO], but this ideally should be replaced with [http://omappedia.org/wiki/Category:RPMsg remoteproc] rather than poking at the registers from userspace. In the mean time, according to [https://groups.google.com/d/msg/beagleboard/gqCjxh4uZi0/_uIUD8ZF88QJ this discussion:] we can use the included script and load the uio_pruss userspace driver.&lt;br /&gt;
&lt;br /&gt;
=== PRU to Host (PRU to ARM Cortex-A8) ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Host to PRU (ARM Cortex-A8 to PRU) ===&lt;br /&gt;
==== Interrupts ====&lt;br /&gt;
Each PRU has access to host interrupt channels Host-0 and Host-1 through register R31 bit 30 and bit 31 respectively.&lt;br /&gt;
By probing these registers, a PRU can determine if an interrupt is currently present on each host channel.&lt;br /&gt;
&lt;br /&gt;
To configure &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PRU to external peripherals ===&lt;br /&gt;
=== External peripherals to PRU ===&lt;br /&gt;
=== PRU to internal peripherals ===&lt;br /&gt;
=== Internal peripherals to PRU ===&lt;br /&gt;
&lt;br /&gt;
== Loading a PRU Program ==&lt;br /&gt;
&lt;br /&gt;
==Beaglebone PRU connections and modes==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|'''PRU #'''&lt;br /&gt;
|'''R30(input) bit'''&lt;br /&gt;
|'''Pinmux Mode'''&lt;br /&gt;
|'''R31(output) bit'''&lt;br /&gt;
|'''Pinmux Mode'''&lt;br /&gt;
|'''BB Header'''&lt;br /&gt;
|'''BB Pin Name'''&lt;br /&gt;
|'''ZCZ BallName'''&lt;br /&gt;
|'''Offset Reg'''&lt;br /&gt;
|'''DT Offset'''&lt;br /&gt;
|'''Input Mode'''&lt;br /&gt;
|'''Output Mode'''&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|0&lt;br /&gt;
|Mode_6&lt;br /&gt;
|0&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_31&lt;br /&gt;
|SPI1_SCLK&lt;br /&gt;
|mcasp0_aclkx&lt;br /&gt;
|990h&lt;br /&gt;
|0x190&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|1&lt;br /&gt;
|Mode_6&lt;br /&gt;
|1&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_31&lt;br /&gt;
|SPI1_D0&lt;br /&gt;
|mcasp0_fsx&lt;br /&gt;
|994h&lt;br /&gt;
|0x194&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|2&lt;br /&gt;
|Mode_6&lt;br /&gt;
|2&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_30&lt;br /&gt;
|SPI1_D1&lt;br /&gt;
|mcasp0_axr0&lt;br /&gt;
|998h&lt;br /&gt;
|0x198&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|3&lt;br /&gt;
|Mode_6&lt;br /&gt;
|3&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_28&lt;br /&gt;
|SPI1_CS0&lt;br /&gt;
|mcasp0_ahclkr&lt;br /&gt;
|99Ch&lt;br /&gt;
|0x19C&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|4&lt;br /&gt;
|Mode_6&lt;br /&gt;
|4&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_42&lt;br /&gt;
|(*see note1 below)&lt;br /&gt;
|mcasp0_aclkr&lt;br /&gt;
|9A0h&lt;br /&gt;
|0x1A0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|5&lt;br /&gt;
|Mode_6&lt;br /&gt;
|5&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_27&lt;br /&gt;
|GPIO3_19&lt;br /&gt;
|mcasp0_fsr&lt;br /&gt;
|9A4h&lt;br /&gt;
|0x1A4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|6&lt;br /&gt;
|Mode_6&lt;br /&gt;
|6&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_41&lt;br /&gt;
|(*see note2 below)&lt;br /&gt;
|mcasp0_axr1&lt;br /&gt;
|9A8h&lt;br /&gt;
|0x1A8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|7&lt;br /&gt;
|Mode_6&lt;br /&gt;
|7&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_25&lt;br /&gt;
|GPIO3_21&lt;br /&gt;
|mcasp0_ahclkx&lt;br /&gt;
|9ACh&lt;br /&gt;
|0x1AC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|14&lt;br /&gt;
|Mode_6&lt;br /&gt;
|P8_12&lt;br /&gt;
|GPIO1_12&lt;br /&gt;
|gpmc_ad12&lt;br /&gt;
|830h&lt;br /&gt;
|0x030&lt;br /&gt;
|NA&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|15&lt;br /&gt;
|Mode_6&lt;br /&gt;
|P8_11&lt;br /&gt;
|GPIO1_13&lt;br /&gt;
|gpmc_ad9&lt;br /&gt;
|824h&lt;br /&gt;
|0x024&lt;br /&gt;
|NA&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|14&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P8_16&lt;br /&gt;
|GPIO1_14&lt;br /&gt;
|gpmc_ad14&lt;br /&gt;
|838h&lt;br /&gt;
|0x038&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|15&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P8_15&lt;br /&gt;
|GPIO1_15&lt;br /&gt;
|gpmc_ad15&lt;br /&gt;
|83Ch&lt;br /&gt;
|0x03C&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|16&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P9_24&lt;br /&gt;
|UART1_TXD&lt;br /&gt;
|uart1_txd&lt;br /&gt;
|984h&lt;br /&gt;
|0x184&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|0&lt;br /&gt;
|Mode_6&lt;br /&gt;
|0&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_45&lt;br /&gt;
|GPIO2_6&lt;br /&gt;
|lcd_data0&lt;br /&gt;
|8A0h&lt;br /&gt;
|0x0A0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|1&lt;br /&gt;
|Mode_6&lt;br /&gt;
|1&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_46&lt;br /&gt;
|GPIO2_7&lt;br /&gt;
|lcd_data1&lt;br /&gt;
|8A4h&lt;br /&gt;
|0x0A4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|2&lt;br /&gt;
|Mode_6&lt;br /&gt;
|2&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_43&lt;br /&gt;
|GPIO2_8&lt;br /&gt;
|lcd_data2&lt;br /&gt;
|8A8h&lt;br /&gt;
|0x0A8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|3&lt;br /&gt;
|Mode_6&lt;br /&gt;
|3&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_44&lt;br /&gt;
|GPIO2_9&lt;br /&gt;
|lcd_data3&lt;br /&gt;
|8ACh&lt;br /&gt;
|0x0AC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|4&lt;br /&gt;
|Mode_6&lt;br /&gt;
|4&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_41&lt;br /&gt;
|GPIO2_10&lt;br /&gt;
|lcd_data4&lt;br /&gt;
|8B0h&lt;br /&gt;
|0x0B0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|5&lt;br /&gt;
|Mode_6&lt;br /&gt;
|5&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_42&lt;br /&gt;
|GPIO2_11&lt;br /&gt;
|lcd_data5&lt;br /&gt;
|8B4h&lt;br /&gt;
|0x0B4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|6&lt;br /&gt;
|Mode_6&lt;br /&gt;
|6&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_39&lt;br /&gt;
|GPIO2_12&lt;br /&gt;
|lcd_data6&lt;br /&gt;
|8B8h&lt;br /&gt;
|0x0B8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|7&lt;br /&gt;
|Mode_6&lt;br /&gt;
|7&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_40&lt;br /&gt;
|GPIO2_13&lt;br /&gt;
|lcd_data7&lt;br /&gt;
|8BCh&lt;br /&gt;
|0x0BC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|8&lt;br /&gt;
|Mode_6&lt;br /&gt;
|8&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_27&lt;br /&gt;
|GPIO2_22&lt;br /&gt;
|lcd_vsync&lt;br /&gt;
|8E0h&lt;br /&gt;
|0x0EO&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|9&lt;br /&gt;
|Mode_6&lt;br /&gt;
|9&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_29&lt;br /&gt;
|GPIO2_23&lt;br /&gt;
|lcd_hsync&lt;br /&gt;
|8E4h&lt;br /&gt;
|0x0E4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|10&lt;br /&gt;
|Mode_6&lt;br /&gt;
|10&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_28&lt;br /&gt;
|GPIO2_24&lt;br /&gt;
|lcd_pclk&lt;br /&gt;
|8E8h&lt;br /&gt;
|0x0E8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|11&lt;br /&gt;
|Mode_6&lt;br /&gt;
|11&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_30&lt;br /&gt;
|GPIO2_25&lt;br /&gt;
|lcd_ac_bias_en&lt;br /&gt;
|8ECh&lt;br /&gt;
|0x0EC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|12&lt;br /&gt;
|Mode_6&lt;br /&gt;
|12&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_21&lt;br /&gt;
|GPIO1_30&lt;br /&gt;
|gpmc_csn1&lt;br /&gt;
|880h&lt;br /&gt;
|0x080&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|13&lt;br /&gt;
|Mode_6&lt;br /&gt;
|13&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_20&lt;br /&gt;
|GPIO1_31&lt;br /&gt;
|gpmc_csn2&lt;br /&gt;
|884h&lt;br /&gt;
|0x084&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|16&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P9_26&lt;br /&gt;
|UART1_RXD&lt;br /&gt;
|uart1_rxd&lt;br /&gt;
|980h&lt;br /&gt;
|0x180&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*Note1: The PRU0 Registers{30,31} Bit 4 (GPIO3_18) is routed to P9_42-GPIO0_7 pin.  You MUST set GPIO0_7 to input mode in pinmuxing.&lt;br /&gt;
&lt;br /&gt;
*Note2: The PRU0 Registers{30,31} Bit 6 (GPIO3_20) is routed to P9_41-GPIO0_20(CLKOUT2). You must set GPIO0_20 to input mode in pinmuxing.&lt;br /&gt;
&lt;br /&gt;
== Assembly ==&lt;br /&gt;
The complete list of PRU assembly instructions can be found [http://processors.wiki.ti.com/index.php/PRU_Assembly_Instructions at TI]. &lt;br /&gt;
=== Four instruction classes ===&lt;br /&gt;
* Arithmetic&lt;br /&gt;
* Logical&lt;br /&gt;
* Flow Control&lt;br /&gt;
* Register Load/Store&lt;br /&gt;
&lt;br /&gt;
=== Instruction Syntax ===&lt;br /&gt;
* Mnemonic, followed by comma separated parameter list&lt;br /&gt;
* Parameters can be a register, label, immediate value, or constant table entry&lt;br /&gt;
* Example&lt;br /&gt;
** SUB r3, r4, 10 &lt;br /&gt;
** Subtracts immediate value 10 (decimal) from the value in r4 and then places the result in r3 (or r3 = r4 - 10)&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
* [https://github.com/beagleboard/am335x_pru_package AM335x PRU support package on Github]&lt;br /&gt;
* [https://github.com/beagleboard/am335x_pru_package/blob/master/am335xPruReferenceGuide.pdf?raw=true AM335x PRU-ICSS Reference Guide]&lt;br /&gt;
The documentation on the subsystem is  [[media:spruh73c.pdf|here]].  TI does not support this subsystem and all questions/inquires/problems should be directed to the community.&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/sagedevices/ti-pruv2-assembly-textmate-bundle PRU assembly syntax highlighting for TextMate, Sublime Text, etc.]&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
* [[BeagleBone_6502_RemoteProc_cape]]&lt;br /&gt;
* [https://github.com/mranostay/beagle-nixie BeagleBone Nixie Cape PRU App]&lt;br /&gt;
* [http://processors.wiki.ti.com/index.php/Soft-UART_Implementation_on_AM335X_PRU_-_Software_Users_Guide PRU Soft UART Driver]&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/Ti_AM33XX_PRUSSv2</id>
		<title>Ti AM33XX PRUSSv2</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/Ti_AM33XX_PRUSSv2"/>
				<updated>2013-05-13T19:42:28Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: /* Communication */ Added a link to the uio_pruss discussion&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The PRUSS (Programmable Real-time Unit Sub System) consists of two 32-bit 200MHz real-time cores, each with 8KB of program memory and direct access to general I/O.&lt;br /&gt;
These cores are connected to various data memories, peripheral modules and an interrupt controller for access to the entire system-on-a-chip via a 32-bit interconnect bus.&lt;br /&gt;
&lt;br /&gt;
PRUs are programmed in [http://en.wikipedia.org/wiki/Assembly_language Assembly], with most commands executing in a single cycle with no caching or pipe-lining, allowing for 100% predictable timings. At 200MHz, a single cycle most operations will take 5ns (nanoseconds) with exception of accessing memory external to PRU to execute.&lt;br /&gt;
&lt;br /&gt;
====This is a Work In Progress====&lt;br /&gt;
&lt;br /&gt;
== Available PRU Resources ==&lt;br /&gt;
[[File:PRUSS.png|AM335x PRUSS]]&lt;br /&gt;
&lt;br /&gt;
[[PRUSSv2 Memory Map|Click here for a full list of register mappings.]]&lt;br /&gt;
&lt;br /&gt;
=== Per PRU ===&lt;br /&gt;
; 8KB program memory&lt;br /&gt;
: Memory used to store instructions and static data AKA Instruction Memory (IRAM). This is the memory in which PRU programs are loaded.&lt;br /&gt;
&lt;br /&gt;
; Enhanced GPIO (EGPIO)&lt;br /&gt;
: High-speed direct access to 16 general purpose output and 17 general purpose input pins for each PRU.&lt;br /&gt;
:; PRU0&lt;br /&gt;
:: ''pr1_pru_0_pru_r30[15:0]'' (PRU0 Register R30 Outputs)&lt;br /&gt;
:: ''pr1_pru_0_pru_r31[16:0]'' (PRU0 Register R31 Inputs)&lt;br /&gt;
:; PRU1&lt;br /&gt;
:: ''pr1_pru_1_pru_r30[15:0]'' (PRU1 Register R30 Outputs)&lt;br /&gt;
:: ''pr1_pru_1_pru_r31[16:0]'' (PRU1 Register R31 Inputs)&lt;br /&gt;
:; Hardware capture modes&lt;br /&gt;
:: Serial 28-bit shift in and out.&lt;br /&gt;
:: Parallel 16-bit capture on clock.&lt;br /&gt;
:: [http://en.wikipedia.org/wiki/Media_Independent_Interface| MII] standardised capture mode, used for implementing media independent Fast Ethernet (100Mbps - 25MHz 4-bit).&lt;br /&gt;
&lt;br /&gt;
; A 32-bit multiply and accumulate unit (MAC)&lt;br /&gt;
: Enables single-cycle integer multiplications with a 64-bit overflow (useful for decimal results).&lt;br /&gt;
&lt;br /&gt;
; 8KB data memory&lt;br /&gt;
: Memory used to store dynamic data. Is accessed over the 32-bit bus and so not single-cycle.&lt;br /&gt;
: One PRU may access the memory of another for passing information but it is recommend to use scratch pad or shared memory, see below.&lt;br /&gt;
&lt;br /&gt;
; [http://en.wikipedia.org/wiki/Open_Core_Protocol| Open Core Protocol] (OCP) master port&lt;br /&gt;
: Access to the data bus that interconnects all peripherals on the SoC, including the ARM Cortex-A8, used for data transfer directly to and from the PRU in Level 3 (L3) memory space.&lt;br /&gt;
&lt;br /&gt;
=== Shared Between PRUs ===&lt;br /&gt;
; Scratch pad&lt;br /&gt;
: 3 banks of 30 32-bit registers (total 90 32-bit registers).&lt;br /&gt;
: Single-cycle access, can be accessed from either PRU for data sharing and signalling or for individual use.&lt;br /&gt;
&lt;br /&gt;
; 12KB data memory&lt;br /&gt;
: Accessed over the 32-but bus, not single-cycle.&lt;br /&gt;
&lt;br /&gt;
=== Local Peripherals ===&lt;br /&gt;
Local peripherals are those present within the PRUSS and not those belonging to the entire SoC. Peripherals are accessed from PRUs over the Switched Central Resource (SCR) 32-bit bus within the PRUSS.&lt;br /&gt;
&lt;br /&gt;
Attached to the SCR bus is also an OCP slave, enabling OCP masters from outside of the PRUSS to access these local peripherals in Level 4 (L4) memory space.&lt;br /&gt;
&lt;br /&gt;
; Enhanced Capture Model (eCAP)&lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
; Industrial Ethernet Peripheral (IEP)&lt;br /&gt;
&lt;br /&gt;
; Universal Asynchronous Receiver/Transmitter (UART0)&lt;br /&gt;
: Used to perform serial data transmission to the TL16C550 industry standard.&lt;br /&gt;
: 16-bit FIFO receive and transmit buffers + per byte error status.&lt;br /&gt;
: Can generate Interrupt requests for the PRUSS Interrupt Controller.&lt;br /&gt;
: Can generate DMA requests for the EDMA SoC DMA controller.&lt;br /&gt;
: Maximum transmission speed of 192MHz (192Mbps - 24MB/s).&lt;br /&gt;
&lt;br /&gt;
== Communication ==&lt;br /&gt;
Communication between various elements of the PRUSS or the wider SoC may take place either directly, over a bus, via interrupts or via DMA.&lt;br /&gt;
&lt;br /&gt;
The following lists will expose all possible communication approaches for each likely scenario.&lt;br /&gt;
&lt;br /&gt;
For communication via interrupts, please first read the section on the [[PRUSSv2 Interrupt Controller]].&lt;br /&gt;
&lt;br /&gt;
[[PRUSSv2 Interrupts| Click here for a full list of PRUSS Interrupts.]]&lt;br /&gt;
&lt;br /&gt;
The current [https://github.com/beagleboard/am335x_pru_package/blob/master/pru_sw/app_loader/interface/prussdrv.c example PRU loader] uses [http://arago-project.org/git/projects/?p=linux-am33x.git;a=commit;h=f1a304e7941cc76353363a139cbb6a4b1ca7c737 UIO], but this ideally should be replaced with [http://omappedia.org/wiki/Category:RPMsg remoteproc] rather than poking at the registers from userspace. In the mean time, according to [https://groups.google.com/d/msg/beagleboard/gqCjxh4uZi0/_uIUD8ZF88QJ this discussion:] we can use the included script and load the uio_pruss userspace driver.&lt;br /&gt;
&lt;br /&gt;
=== PRU to Host (PRU to ARM Cortex-A8) ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Host to PRU (ARM Cortex-A8 to PRU) ===&lt;br /&gt;
==== Interrupts ====&lt;br /&gt;
Each PRU has access to host interrupt channels Host-0 and Host-1 through register R31 bit 30 and bit 31 respectively.&lt;br /&gt;
By probing these registers, a PRU can determine if an interrupt is currently present on each host channel.&lt;br /&gt;
&lt;br /&gt;
To configure &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PRU to external peripherals ===&lt;br /&gt;
=== External peripherals to PRU ===&lt;br /&gt;
=== PRU to internal peripherals ===&lt;br /&gt;
=== Internal peripherals to PRU ===&lt;br /&gt;
&lt;br /&gt;
== Loading a PRU Program ==&lt;br /&gt;
&lt;br /&gt;
==Beaglebone PRU connections and modes==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|'''PRU #'''&lt;br /&gt;
|'''R30(input) bit'''&lt;br /&gt;
|'''Pinmux Mode'''&lt;br /&gt;
|'''R31(output) bit'''&lt;br /&gt;
|'''Pinmux Mode'''&lt;br /&gt;
|'''BB Header'''&lt;br /&gt;
|'''BB Pin Name'''&lt;br /&gt;
|'''ZCZ BallName'''&lt;br /&gt;
|'''Offset Reg'''&lt;br /&gt;
|'''DT Offset'''&lt;br /&gt;
|'''Input Mode'''&lt;br /&gt;
|'''Output Mode'''&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|0&lt;br /&gt;
|Mode_6&lt;br /&gt;
|0&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_31&lt;br /&gt;
|SPI1_SCLK&lt;br /&gt;
|mcasp0_aclkx&lt;br /&gt;
|990h&lt;br /&gt;
|0x190&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|1&lt;br /&gt;
|Mode_6&lt;br /&gt;
|1&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_31&lt;br /&gt;
|SPI1_D0&lt;br /&gt;
|mcasp0_fsx&lt;br /&gt;
|994h&lt;br /&gt;
|0x194&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|2&lt;br /&gt;
|Mode_6&lt;br /&gt;
|2&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_30&lt;br /&gt;
|SPI1_D1&lt;br /&gt;
|mcasp0_axr0&lt;br /&gt;
|998h&lt;br /&gt;
|0x198&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|3&lt;br /&gt;
|Mode_6&lt;br /&gt;
|3&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_28&lt;br /&gt;
|SPI1_CS0&lt;br /&gt;
|mcasp0_ahclkr&lt;br /&gt;
|99Ch&lt;br /&gt;
|0x19C&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|4&lt;br /&gt;
|Mode_6&lt;br /&gt;
|4&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_42&lt;br /&gt;
|(*see note1 below)&lt;br /&gt;
|mcasp0_aclkr&lt;br /&gt;
|9A0h&lt;br /&gt;
|0x1A0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|5&lt;br /&gt;
|Mode_6&lt;br /&gt;
|5&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_27&lt;br /&gt;
|GPIO3_19&lt;br /&gt;
|mcasp0_fsr&lt;br /&gt;
|9A4h&lt;br /&gt;
|0x1A4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|6&lt;br /&gt;
|Mode_6&lt;br /&gt;
|6&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_41&lt;br /&gt;
|(*see note2 below)&lt;br /&gt;
|mcasp0_axr1&lt;br /&gt;
|9A8h&lt;br /&gt;
|0x1A8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|7&lt;br /&gt;
|Mode_6&lt;br /&gt;
|7&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_25&lt;br /&gt;
|GPIO3_21&lt;br /&gt;
|mcasp0_ahclkx&lt;br /&gt;
|9ACh&lt;br /&gt;
|0x1AC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|14&lt;br /&gt;
|Mode_6&lt;br /&gt;
|P8_12&lt;br /&gt;
|GPIO1_12&lt;br /&gt;
|gpmc_ad12&lt;br /&gt;
|830h&lt;br /&gt;
|0x030&lt;br /&gt;
|NA&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|15&lt;br /&gt;
|Mode_6&lt;br /&gt;
|P8_11&lt;br /&gt;
|GPIO1_13&lt;br /&gt;
|gpmc_ad9&lt;br /&gt;
|824h&lt;br /&gt;
|0x024&lt;br /&gt;
|NA&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|14&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P8_16&lt;br /&gt;
|GPIO1_14&lt;br /&gt;
|gpmc_ad14&lt;br /&gt;
|838h&lt;br /&gt;
|0x038&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|15&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P8_15&lt;br /&gt;
|GPIO1_15&lt;br /&gt;
|gpmc_ad15&lt;br /&gt;
|83Ch&lt;br /&gt;
|0x03C&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|16&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P9_24&lt;br /&gt;
|UART1_TXD&lt;br /&gt;
|uart1_txd&lt;br /&gt;
|984h&lt;br /&gt;
|0x184&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|0&lt;br /&gt;
|Mode_6&lt;br /&gt;
|0&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_45&lt;br /&gt;
|GPIO2_6&lt;br /&gt;
|lcd_data0&lt;br /&gt;
|8A0h&lt;br /&gt;
|0x0A0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|1&lt;br /&gt;
|Mode_6&lt;br /&gt;
|1&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_46&lt;br /&gt;
|GPIO2_7&lt;br /&gt;
|lcd_data1&lt;br /&gt;
|8A4h&lt;br /&gt;
|0x0A4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|2&lt;br /&gt;
|Mode_6&lt;br /&gt;
|2&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_43&lt;br /&gt;
|GPIO2_8&lt;br /&gt;
|lcd_data2&lt;br /&gt;
|8A8h&lt;br /&gt;
|0x0A8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|3&lt;br /&gt;
|Mode_6&lt;br /&gt;
|3&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_44&lt;br /&gt;
|GPIO2_9&lt;br /&gt;
|lcd_data3&lt;br /&gt;
|8ACh&lt;br /&gt;
|0x0AC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|4&lt;br /&gt;
|Mode_6&lt;br /&gt;
|4&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_41&lt;br /&gt;
|GPIO2_10&lt;br /&gt;
|lcd_data4&lt;br /&gt;
|8B0h&lt;br /&gt;
|0x0B0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|5&lt;br /&gt;
|Mode_6&lt;br /&gt;
|5&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_42&lt;br /&gt;
|GPIO2_11&lt;br /&gt;
|lcd_data5&lt;br /&gt;
|8B4h&lt;br /&gt;
|0x0B4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|6&lt;br /&gt;
|Mode_6&lt;br /&gt;
|6&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_39&lt;br /&gt;
|GPIO2_12&lt;br /&gt;
|lcd_data6&lt;br /&gt;
|8B8h&lt;br /&gt;
|0x0B8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|7&lt;br /&gt;
|Mode_6&lt;br /&gt;
|7&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_40&lt;br /&gt;
|GPIO2_13&lt;br /&gt;
|lcd_data7&lt;br /&gt;
|8BCh&lt;br /&gt;
|0x0BC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|8&lt;br /&gt;
|Mode_6&lt;br /&gt;
|8&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_27&lt;br /&gt;
|GPIO2_22&lt;br /&gt;
|lcd_vsync&lt;br /&gt;
|8E0h&lt;br /&gt;
|0x0EO&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|9&lt;br /&gt;
|Mode_6&lt;br /&gt;
|9&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_29&lt;br /&gt;
|GPIO2_23&lt;br /&gt;
|lcd_hsync&lt;br /&gt;
|8E4h&lt;br /&gt;
|0x0E4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|10&lt;br /&gt;
|Mode_6&lt;br /&gt;
|10&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_28&lt;br /&gt;
|GPIO2_24&lt;br /&gt;
|lcd_pclk&lt;br /&gt;
|8E8h&lt;br /&gt;
|0x0E8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|11&lt;br /&gt;
|Mode_6&lt;br /&gt;
|11&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_30&lt;br /&gt;
|GPIO2_25&lt;br /&gt;
|lcd_ac_bias_en&lt;br /&gt;
|8ECh&lt;br /&gt;
|0x0EC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|12&lt;br /&gt;
|Mode_6&lt;br /&gt;
|12&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_21&lt;br /&gt;
|GPIO1_30&lt;br /&gt;
|gpmc_csn1&lt;br /&gt;
|880h&lt;br /&gt;
|0x080&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|13&lt;br /&gt;
|Mode_6&lt;br /&gt;
|13&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_20&lt;br /&gt;
|GPIO1_31&lt;br /&gt;
|gpmc_csn2&lt;br /&gt;
|884h&lt;br /&gt;
|0x084&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|16&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P9_26&lt;br /&gt;
|UART1_RXD&lt;br /&gt;
|uart1_rxd&lt;br /&gt;
|980h&lt;br /&gt;
|0x180&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*Note1: The PRU0 Registers{30,31} Bit 4 (GPIO3_18) is routed to P9_42-GPIO0_7 pin.  You MUST set GPIO0_7 to input mode in pinmuxing.&lt;br /&gt;
&lt;br /&gt;
*Note2: The PRU0 Registers{30,31} Bit 6 (GPIO3_20) is routed to P9_41-GPIO0_20(CLKOUT2). You must set GPIO0_20 to input mode in pinmuxing.&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
* [https://github.com/beagleboard/am335x_pru_package AM335x PRU support package on Github]&lt;br /&gt;
* [https://github.com/beagleboard/am335x_pru_package/blob/master/am335xPruReferenceGuide.pdf?raw=true AM335x PRU-ICSS Reference Guide]&lt;br /&gt;
The documentation on the subsystem is  [[media:spruh73c.pdf|here]].  TI does not support this subsystem and all questions/inquires/problems should be directed to the community.&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/sagedevices/ti-pruv2-assembly-textmate-bundle PRU assembly syntax highlighting for TextMate, Sublime Text, etc.]&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
* [[BeagleBone_6502_RemoteProc_cape]]&lt;br /&gt;
* [https://github.com/mranostay/beagle-nixie BeagleBone Nixie Cape PRU App]&lt;br /&gt;
* [http://processors.wiki.ti.com/index.php/Soft-UART_Implementation_on_AM335X_PRU_-_Software_Users_Guide PRU Soft UART Driver]&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/Ti_AM33XX_PRUSSv2</id>
		<title>Ti AM33XX PRUSSv2</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/Ti_AM33XX_PRUSSv2"/>
				<updated>2013-05-13T19:36:51Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: /* Available PRU Resources */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The PRUSS (Programmable Real-time Unit Sub System) consists of two 32-bit 200MHz real-time cores, each with 8KB of program memory and direct access to general I/O.&lt;br /&gt;
These cores are connected to various data memories, peripheral modules and an interrupt controller for access to the entire system-on-a-chip via a 32-bit interconnect bus.&lt;br /&gt;
&lt;br /&gt;
PRUs are programmed in [http://en.wikipedia.org/wiki/Assembly_language Assembly], with most commands executing in a single cycle with no caching or pipe-lining, allowing for 100% predictable timings. At 200MHz, a single cycle most operations will take 5ns (nanoseconds) with exception of accessing memory external to PRU to execute.&lt;br /&gt;
&lt;br /&gt;
====This is a Work In Progress====&lt;br /&gt;
&lt;br /&gt;
== Available PRU Resources ==&lt;br /&gt;
[[File:PRUSS.png|AM335x PRUSS]]&lt;br /&gt;
&lt;br /&gt;
[[PRUSSv2 Memory Map|Click here for a full list of register mappings.]]&lt;br /&gt;
&lt;br /&gt;
=== Per PRU ===&lt;br /&gt;
; 8KB program memory&lt;br /&gt;
: Memory used to store instructions and static data AKA Instruction Memory (IRAM). This is the memory in which PRU programs are loaded.&lt;br /&gt;
&lt;br /&gt;
; Enhanced GPIO (EGPIO)&lt;br /&gt;
: High-speed direct access to 16 general purpose output and 17 general purpose input pins for each PRU.&lt;br /&gt;
:; PRU0&lt;br /&gt;
:: ''pr1_pru_0_pru_r30[15:0]'' (PRU0 Register R30 Outputs)&lt;br /&gt;
:: ''pr1_pru_0_pru_r31[16:0]'' (PRU0 Register R31 Inputs)&lt;br /&gt;
:; PRU1&lt;br /&gt;
:: ''pr1_pru_1_pru_r30[15:0]'' (PRU1 Register R30 Outputs)&lt;br /&gt;
:: ''pr1_pru_1_pru_r31[16:0]'' (PRU1 Register R31 Inputs)&lt;br /&gt;
:; Hardware capture modes&lt;br /&gt;
:: Serial 28-bit shift in and out.&lt;br /&gt;
:: Parallel 16-bit capture on clock.&lt;br /&gt;
:: [http://en.wikipedia.org/wiki/Media_Independent_Interface| MII] standardised capture mode, used for implementing media independent Fast Ethernet (100Mbps - 25MHz 4-bit).&lt;br /&gt;
&lt;br /&gt;
; A 32-bit multiply and accumulate unit (MAC)&lt;br /&gt;
: Enables single-cycle integer multiplications with a 64-bit overflow (useful for decimal results).&lt;br /&gt;
&lt;br /&gt;
; 8KB data memory&lt;br /&gt;
: Memory used to store dynamic data. Is accessed over the 32-bit bus and so not single-cycle.&lt;br /&gt;
: One PRU may access the memory of another for passing information but it is recommend to use scratch pad or shared memory, see below.&lt;br /&gt;
&lt;br /&gt;
; [http://en.wikipedia.org/wiki/Open_Core_Protocol| Open Core Protocol] (OCP) master port&lt;br /&gt;
: Access to the data bus that interconnects all peripherals on the SoC, including the ARM Cortex-A8, used for data transfer directly to and from the PRU in Level 3 (L3) memory space.&lt;br /&gt;
&lt;br /&gt;
=== Shared Between PRUs ===&lt;br /&gt;
; Scratch pad&lt;br /&gt;
: 3 banks of 30 32-bit registers (total 90 32-bit registers).&lt;br /&gt;
: Single-cycle access, can be accessed from either PRU for data sharing and signalling or for individual use.&lt;br /&gt;
&lt;br /&gt;
; 12KB data memory&lt;br /&gt;
: Accessed over the 32-but bus, not single-cycle.&lt;br /&gt;
&lt;br /&gt;
=== Local Peripherals ===&lt;br /&gt;
Local peripherals are those present within the PRUSS and not those belonging to the entire SoC. Peripherals are accessed from PRUs over the Switched Central Resource (SCR) 32-bit bus within the PRUSS.&lt;br /&gt;
&lt;br /&gt;
Attached to the SCR bus is also an OCP slave, enabling OCP masters from outside of the PRUSS to access these local peripherals in Level 4 (L4) memory space.&lt;br /&gt;
&lt;br /&gt;
; Enhanced Capture Model (eCAP)&lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
; Industrial Ethernet Peripheral (IEP)&lt;br /&gt;
&lt;br /&gt;
; Universal Asynchronous Receiver/Transmitter (UART0)&lt;br /&gt;
: Used to perform serial data transmission to the TL16C550 industry standard.&lt;br /&gt;
: 16-bit FIFO receive and transmit buffers + per byte error status.&lt;br /&gt;
: Can generate Interrupt requests for the PRUSS Interrupt Controller.&lt;br /&gt;
: Can generate DMA requests for the EDMA SoC DMA controller.&lt;br /&gt;
: Maximum transmission speed of 192MHz (192Mbps - 24MB/s).&lt;br /&gt;
&lt;br /&gt;
== Communication ==&lt;br /&gt;
Communication between various elements of the PRUSS or the wider SoC may take place either directly, over a bus, via interrupts or via DMA.&lt;br /&gt;
&lt;br /&gt;
The following lists will expose all possible communication approaches for each likely scenario.&lt;br /&gt;
&lt;br /&gt;
For communication via interrupts, please first read the section on the [[PRUSSv2 Interrupt Controller]].&lt;br /&gt;
&lt;br /&gt;
[[PRUSSv2 Interrupts| Click here for a full list of PRUSS Interrupts.]]&lt;br /&gt;
&lt;br /&gt;
The current [https://github.com/beagleboard/am335x_pru_package/blob/master/pru_sw/app_loader/interface/prussdrv.c example PRU loader] uses [http://arago-project.org/git/projects/?p=linux-am33x.git;a=commit;h=f1a304e7941cc76353363a139cbb6a4b1ca7c737 UIO], but this ideally should be replaced with [http://omappedia.org/wiki/Category:RPMsg remoteproc] rather than poking at the registers from userspace.&lt;br /&gt;
&lt;br /&gt;
=== PRU to Host (PRU to ARM Cortex-A8) ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Host to PRU (ARM Cortex-A8 to PRU) ===&lt;br /&gt;
==== Interrupts ====&lt;br /&gt;
Each PRU has access to host interrupt channels Host-0 and Host-1 through register R31 bit 30 and bit 31 respectively.&lt;br /&gt;
By probing these registers, a PRU can determine if an interrupt is currently present on each host channel.&lt;br /&gt;
&lt;br /&gt;
To configure &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PRU to external peripherals ===&lt;br /&gt;
=== External peripherals to PRU ===&lt;br /&gt;
=== PRU to internal peripherals ===&lt;br /&gt;
=== Internal peripherals to PRU ===&lt;br /&gt;
&lt;br /&gt;
== Loading a PRU Program ==&lt;br /&gt;
&lt;br /&gt;
==Beaglebone PRU connections and modes==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|'''PRU #'''&lt;br /&gt;
|'''R30(input) bit'''&lt;br /&gt;
|'''Pinmux Mode'''&lt;br /&gt;
|'''R31(output) bit'''&lt;br /&gt;
|'''Pinmux Mode'''&lt;br /&gt;
|'''BB Header'''&lt;br /&gt;
|'''BB Pin Name'''&lt;br /&gt;
|'''ZCZ BallName'''&lt;br /&gt;
|'''Offset Reg'''&lt;br /&gt;
|'''DT Offset'''&lt;br /&gt;
|'''Input Mode'''&lt;br /&gt;
|'''Output Mode'''&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|0&lt;br /&gt;
|Mode_6&lt;br /&gt;
|0&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_31&lt;br /&gt;
|SPI1_SCLK&lt;br /&gt;
|mcasp0_aclkx&lt;br /&gt;
|990h&lt;br /&gt;
|0x190&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|1&lt;br /&gt;
|Mode_6&lt;br /&gt;
|1&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_31&lt;br /&gt;
|SPI1_D0&lt;br /&gt;
|mcasp0_fsx&lt;br /&gt;
|994h&lt;br /&gt;
|0x194&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|2&lt;br /&gt;
|Mode_6&lt;br /&gt;
|2&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_30&lt;br /&gt;
|SPI1_D1&lt;br /&gt;
|mcasp0_axr0&lt;br /&gt;
|998h&lt;br /&gt;
|0x198&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|3&lt;br /&gt;
|Mode_6&lt;br /&gt;
|3&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_28&lt;br /&gt;
|SPI1_CS0&lt;br /&gt;
|mcasp0_ahclkr&lt;br /&gt;
|99Ch&lt;br /&gt;
|0x19C&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|4&lt;br /&gt;
|Mode_6&lt;br /&gt;
|4&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_42&lt;br /&gt;
|(*see note1 below)&lt;br /&gt;
|mcasp0_aclkr&lt;br /&gt;
|9A0h&lt;br /&gt;
|0x1A0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|5&lt;br /&gt;
|Mode_6&lt;br /&gt;
|5&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_27&lt;br /&gt;
|GPIO3_19&lt;br /&gt;
|mcasp0_fsr&lt;br /&gt;
|9A4h&lt;br /&gt;
|0x1A4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|6&lt;br /&gt;
|Mode_6&lt;br /&gt;
|6&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_41&lt;br /&gt;
|(*see note2 below)&lt;br /&gt;
|mcasp0_axr1&lt;br /&gt;
|9A8h&lt;br /&gt;
|0x1A8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|7&lt;br /&gt;
|Mode_6&lt;br /&gt;
|7&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_25&lt;br /&gt;
|GPIO3_21&lt;br /&gt;
|mcasp0_ahclkx&lt;br /&gt;
|9ACh&lt;br /&gt;
|0x1AC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|14&lt;br /&gt;
|Mode_6&lt;br /&gt;
|P8_12&lt;br /&gt;
|GPIO1_12&lt;br /&gt;
|gpmc_ad12&lt;br /&gt;
|830h&lt;br /&gt;
|0x030&lt;br /&gt;
|NA&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|15&lt;br /&gt;
|Mode_6&lt;br /&gt;
|P8_11&lt;br /&gt;
|GPIO1_13&lt;br /&gt;
|gpmc_ad9&lt;br /&gt;
|824h&lt;br /&gt;
|0x024&lt;br /&gt;
|NA&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|14&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P8_16&lt;br /&gt;
|GPIO1_14&lt;br /&gt;
|gpmc_ad14&lt;br /&gt;
|838h&lt;br /&gt;
|0x038&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|15&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P8_15&lt;br /&gt;
|GPIO1_15&lt;br /&gt;
|gpmc_ad15&lt;br /&gt;
|83Ch&lt;br /&gt;
|0x03C&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|16&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P9_24&lt;br /&gt;
|UART1_TXD&lt;br /&gt;
|uart1_txd&lt;br /&gt;
|984h&lt;br /&gt;
|0x184&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|0&lt;br /&gt;
|Mode_6&lt;br /&gt;
|0&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_45&lt;br /&gt;
|GPIO2_6&lt;br /&gt;
|lcd_data0&lt;br /&gt;
|8A0h&lt;br /&gt;
|0x0A0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|1&lt;br /&gt;
|Mode_6&lt;br /&gt;
|1&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_46&lt;br /&gt;
|GPIO2_7&lt;br /&gt;
|lcd_data1&lt;br /&gt;
|8A4h&lt;br /&gt;
|0x0A4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|2&lt;br /&gt;
|Mode_6&lt;br /&gt;
|2&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_43&lt;br /&gt;
|GPIO2_8&lt;br /&gt;
|lcd_data2&lt;br /&gt;
|8A8h&lt;br /&gt;
|0x0A8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|3&lt;br /&gt;
|Mode_6&lt;br /&gt;
|3&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_44&lt;br /&gt;
|GPIO2_9&lt;br /&gt;
|lcd_data3&lt;br /&gt;
|8ACh&lt;br /&gt;
|0x0AC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|4&lt;br /&gt;
|Mode_6&lt;br /&gt;
|4&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_41&lt;br /&gt;
|GPIO2_10&lt;br /&gt;
|lcd_data4&lt;br /&gt;
|8B0h&lt;br /&gt;
|0x0B0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|5&lt;br /&gt;
|Mode_6&lt;br /&gt;
|5&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_42&lt;br /&gt;
|GPIO2_11&lt;br /&gt;
|lcd_data5&lt;br /&gt;
|8B4h&lt;br /&gt;
|0x0B4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|6&lt;br /&gt;
|Mode_6&lt;br /&gt;
|6&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_39&lt;br /&gt;
|GPIO2_12&lt;br /&gt;
|lcd_data6&lt;br /&gt;
|8B8h&lt;br /&gt;
|0x0B8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|7&lt;br /&gt;
|Mode_6&lt;br /&gt;
|7&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_40&lt;br /&gt;
|GPIO2_13&lt;br /&gt;
|lcd_data7&lt;br /&gt;
|8BCh&lt;br /&gt;
|0x0BC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|8&lt;br /&gt;
|Mode_6&lt;br /&gt;
|8&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_27&lt;br /&gt;
|GPIO2_22&lt;br /&gt;
|lcd_vsync&lt;br /&gt;
|8E0h&lt;br /&gt;
|0x0EO&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|9&lt;br /&gt;
|Mode_6&lt;br /&gt;
|9&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_29&lt;br /&gt;
|GPIO2_23&lt;br /&gt;
|lcd_hsync&lt;br /&gt;
|8E4h&lt;br /&gt;
|0x0E4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|10&lt;br /&gt;
|Mode_6&lt;br /&gt;
|10&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_28&lt;br /&gt;
|GPIO2_24&lt;br /&gt;
|lcd_pclk&lt;br /&gt;
|8E8h&lt;br /&gt;
|0x0E8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|11&lt;br /&gt;
|Mode_6&lt;br /&gt;
|11&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_30&lt;br /&gt;
|GPIO2_25&lt;br /&gt;
|lcd_ac_bias_en&lt;br /&gt;
|8ECh&lt;br /&gt;
|0x0EC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|12&lt;br /&gt;
|Mode_6&lt;br /&gt;
|12&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_21&lt;br /&gt;
|GPIO1_30&lt;br /&gt;
|gpmc_csn1&lt;br /&gt;
|880h&lt;br /&gt;
|0x080&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|13&lt;br /&gt;
|Mode_6&lt;br /&gt;
|13&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_20&lt;br /&gt;
|GPIO1_31&lt;br /&gt;
|gpmc_csn2&lt;br /&gt;
|884h&lt;br /&gt;
|0x084&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|16&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P9_26&lt;br /&gt;
|UART1_RXD&lt;br /&gt;
|uart1_rxd&lt;br /&gt;
|980h&lt;br /&gt;
|0x180&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*Note1: The PRU0 Registers{30,31} Bit 4 (GPIO3_18) is routed to P9_42-GPIO0_7 pin.  You MUST set GPIO0_7 to input mode in pinmuxing.&lt;br /&gt;
&lt;br /&gt;
*Note2: The PRU0 Registers{30,31} Bit 6 (GPIO3_20) is routed to P9_41-GPIO0_20(CLKOUT2). You must set GPIO0_20 to input mode in pinmuxing.&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
* [https://github.com/beagleboard/am335x_pru_package AM335x PRU support package on Github]&lt;br /&gt;
* [https://github.com/beagleboard/am335x_pru_package/blob/master/am335xPruReferenceGuide.pdf?raw=true AM335x PRU-ICSS Reference Guide]&lt;br /&gt;
The documentation on the subsystem is  [[media:spruh73c.pdf|here]].  TI does not support this subsystem and all questions/inquires/problems should be directed to the community.&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/sagedevices/ti-pruv2-assembly-textmate-bundle PRU assembly syntax highlighting for TextMate, Sublime Text, etc.]&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
* [[BeagleBone_6502_RemoteProc_cape]]&lt;br /&gt;
* [https://github.com/mranostay/beagle-nixie BeagleBone Nixie Cape PRU App]&lt;br /&gt;
* [http://processors.wiki.ti.com/index.php/Soft-UART_Implementation_on_AM335X_PRU_-_Software_Users_Guide PRU Soft UART Driver]&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/Ti_AM33XX_PRUSSv2</id>
		<title>Ti AM33XX PRUSSv2</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/Ti_AM33XX_PRUSSv2"/>
				<updated>2013-05-13T19:36:38Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: /* Available PRU Resources */ Added hardware layout image&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The PRUSS (Programmable Real-time Unit Sub System) consists of two 32-bit 200MHz real-time cores, each with 8KB of program memory and direct access to general I/O.&lt;br /&gt;
These cores are connected to various data memories, peripheral modules and an interrupt controller for access to the entire system-on-a-chip via a 32-bit interconnect bus.&lt;br /&gt;
&lt;br /&gt;
PRUs are programmed in [http://en.wikipedia.org/wiki/Assembly_language Assembly], with most commands executing in a single cycle with no caching or pipe-lining, allowing for 100% predictable timings. At 200MHz, a single cycle most operations will take 5ns (nanoseconds) with exception of accessing memory external to PRU to execute.&lt;br /&gt;
&lt;br /&gt;
====This is a Work In Progress====&lt;br /&gt;
&lt;br /&gt;
== Available PRU Resources ==&lt;br /&gt;
[[File:PRUSS.png|AM335x PRUSS]]&lt;br /&gt;
[[PRUSSv2 Memory Map|Click here for a full list of register mappings.]]&lt;br /&gt;
&lt;br /&gt;
=== Per PRU ===&lt;br /&gt;
; 8KB program memory&lt;br /&gt;
: Memory used to store instructions and static data AKA Instruction Memory (IRAM). This is the memory in which PRU programs are loaded.&lt;br /&gt;
&lt;br /&gt;
; Enhanced GPIO (EGPIO)&lt;br /&gt;
: High-speed direct access to 16 general purpose output and 17 general purpose input pins for each PRU.&lt;br /&gt;
:; PRU0&lt;br /&gt;
:: ''pr1_pru_0_pru_r30[15:0]'' (PRU0 Register R30 Outputs)&lt;br /&gt;
:: ''pr1_pru_0_pru_r31[16:0]'' (PRU0 Register R31 Inputs)&lt;br /&gt;
:; PRU1&lt;br /&gt;
:: ''pr1_pru_1_pru_r30[15:0]'' (PRU1 Register R30 Outputs)&lt;br /&gt;
:: ''pr1_pru_1_pru_r31[16:0]'' (PRU1 Register R31 Inputs)&lt;br /&gt;
:; Hardware capture modes&lt;br /&gt;
:: Serial 28-bit shift in and out.&lt;br /&gt;
:: Parallel 16-bit capture on clock.&lt;br /&gt;
:: [http://en.wikipedia.org/wiki/Media_Independent_Interface| MII] standardised capture mode, used for implementing media independent Fast Ethernet (100Mbps - 25MHz 4-bit).&lt;br /&gt;
&lt;br /&gt;
; A 32-bit multiply and accumulate unit (MAC)&lt;br /&gt;
: Enables single-cycle integer multiplications with a 64-bit overflow (useful for decimal results).&lt;br /&gt;
&lt;br /&gt;
; 8KB data memory&lt;br /&gt;
: Memory used to store dynamic data. Is accessed over the 32-bit bus and so not single-cycle.&lt;br /&gt;
: One PRU may access the memory of another for passing information but it is recommend to use scratch pad or shared memory, see below.&lt;br /&gt;
&lt;br /&gt;
; [http://en.wikipedia.org/wiki/Open_Core_Protocol| Open Core Protocol] (OCP) master port&lt;br /&gt;
: Access to the data bus that interconnects all peripherals on the SoC, including the ARM Cortex-A8, used for data transfer directly to and from the PRU in Level 3 (L3) memory space.&lt;br /&gt;
&lt;br /&gt;
=== Shared Between PRUs ===&lt;br /&gt;
; Scratch pad&lt;br /&gt;
: 3 banks of 30 32-bit registers (total 90 32-bit registers).&lt;br /&gt;
: Single-cycle access, can be accessed from either PRU for data sharing and signalling or for individual use.&lt;br /&gt;
&lt;br /&gt;
; 12KB data memory&lt;br /&gt;
: Accessed over the 32-but bus, not single-cycle.&lt;br /&gt;
&lt;br /&gt;
=== Local Peripherals ===&lt;br /&gt;
Local peripherals are those present within the PRUSS and not those belonging to the entire SoC. Peripherals are accessed from PRUs over the Switched Central Resource (SCR) 32-bit bus within the PRUSS.&lt;br /&gt;
&lt;br /&gt;
Attached to the SCR bus is also an OCP slave, enabling OCP masters from outside of the PRUSS to access these local peripherals in Level 4 (L4) memory space.&lt;br /&gt;
&lt;br /&gt;
; Enhanced Capture Model (eCAP)&lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
; Industrial Ethernet Peripheral (IEP)&lt;br /&gt;
&lt;br /&gt;
; Universal Asynchronous Receiver/Transmitter (UART0)&lt;br /&gt;
: Used to perform serial data transmission to the TL16C550 industry standard.&lt;br /&gt;
: 16-bit FIFO receive and transmit buffers + per byte error status.&lt;br /&gt;
: Can generate Interrupt requests for the PRUSS Interrupt Controller.&lt;br /&gt;
: Can generate DMA requests for the EDMA SoC DMA controller.&lt;br /&gt;
: Maximum transmission speed of 192MHz (192Mbps - 24MB/s).&lt;br /&gt;
&lt;br /&gt;
== Communication ==&lt;br /&gt;
Communication between various elements of the PRUSS or the wider SoC may take place either directly, over a bus, via interrupts or via DMA.&lt;br /&gt;
&lt;br /&gt;
The following lists will expose all possible communication approaches for each likely scenario.&lt;br /&gt;
&lt;br /&gt;
For communication via interrupts, please first read the section on the [[PRUSSv2 Interrupt Controller]].&lt;br /&gt;
&lt;br /&gt;
[[PRUSSv2 Interrupts| Click here for a full list of PRUSS Interrupts.]]&lt;br /&gt;
&lt;br /&gt;
The current [https://github.com/beagleboard/am335x_pru_package/blob/master/pru_sw/app_loader/interface/prussdrv.c example PRU loader] uses [http://arago-project.org/git/projects/?p=linux-am33x.git;a=commit;h=f1a304e7941cc76353363a139cbb6a4b1ca7c737 UIO], but this ideally should be replaced with [http://omappedia.org/wiki/Category:RPMsg remoteproc] rather than poking at the registers from userspace.&lt;br /&gt;
&lt;br /&gt;
=== PRU to Host (PRU to ARM Cortex-A8) ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Host to PRU (ARM Cortex-A8 to PRU) ===&lt;br /&gt;
==== Interrupts ====&lt;br /&gt;
Each PRU has access to host interrupt channels Host-0 and Host-1 through register R31 bit 30 and bit 31 respectively.&lt;br /&gt;
By probing these registers, a PRU can determine if an interrupt is currently present on each host channel.&lt;br /&gt;
&lt;br /&gt;
To configure &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PRU to external peripherals ===&lt;br /&gt;
=== External peripherals to PRU ===&lt;br /&gt;
=== PRU to internal peripherals ===&lt;br /&gt;
=== Internal peripherals to PRU ===&lt;br /&gt;
&lt;br /&gt;
== Loading a PRU Program ==&lt;br /&gt;
&lt;br /&gt;
==Beaglebone PRU connections and modes==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|'''PRU #'''&lt;br /&gt;
|'''R30(input) bit'''&lt;br /&gt;
|'''Pinmux Mode'''&lt;br /&gt;
|'''R31(output) bit'''&lt;br /&gt;
|'''Pinmux Mode'''&lt;br /&gt;
|'''BB Header'''&lt;br /&gt;
|'''BB Pin Name'''&lt;br /&gt;
|'''ZCZ BallName'''&lt;br /&gt;
|'''Offset Reg'''&lt;br /&gt;
|'''DT Offset'''&lt;br /&gt;
|'''Input Mode'''&lt;br /&gt;
|'''Output Mode'''&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|0&lt;br /&gt;
|Mode_6&lt;br /&gt;
|0&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_31&lt;br /&gt;
|SPI1_SCLK&lt;br /&gt;
|mcasp0_aclkx&lt;br /&gt;
|990h&lt;br /&gt;
|0x190&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|1&lt;br /&gt;
|Mode_6&lt;br /&gt;
|1&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_31&lt;br /&gt;
|SPI1_D0&lt;br /&gt;
|mcasp0_fsx&lt;br /&gt;
|994h&lt;br /&gt;
|0x194&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|2&lt;br /&gt;
|Mode_6&lt;br /&gt;
|2&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_30&lt;br /&gt;
|SPI1_D1&lt;br /&gt;
|mcasp0_axr0&lt;br /&gt;
|998h&lt;br /&gt;
|0x198&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|3&lt;br /&gt;
|Mode_6&lt;br /&gt;
|3&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_28&lt;br /&gt;
|SPI1_CS0&lt;br /&gt;
|mcasp0_ahclkr&lt;br /&gt;
|99Ch&lt;br /&gt;
|0x19C&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|4&lt;br /&gt;
|Mode_6&lt;br /&gt;
|4&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_42&lt;br /&gt;
|(*see note1 below)&lt;br /&gt;
|mcasp0_aclkr&lt;br /&gt;
|9A0h&lt;br /&gt;
|0x1A0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|5&lt;br /&gt;
|Mode_6&lt;br /&gt;
|5&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_27&lt;br /&gt;
|GPIO3_19&lt;br /&gt;
|mcasp0_fsr&lt;br /&gt;
|9A4h&lt;br /&gt;
|0x1A4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|6&lt;br /&gt;
|Mode_6&lt;br /&gt;
|6&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_41&lt;br /&gt;
|(*see note2 below)&lt;br /&gt;
|mcasp0_axr1&lt;br /&gt;
|9A8h&lt;br /&gt;
|0x1A8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|7&lt;br /&gt;
|Mode_6&lt;br /&gt;
|7&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_25&lt;br /&gt;
|GPIO3_21&lt;br /&gt;
|mcasp0_ahclkx&lt;br /&gt;
|9ACh&lt;br /&gt;
|0x1AC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|14&lt;br /&gt;
|Mode_6&lt;br /&gt;
|P8_12&lt;br /&gt;
|GPIO1_12&lt;br /&gt;
|gpmc_ad12&lt;br /&gt;
|830h&lt;br /&gt;
|0x030&lt;br /&gt;
|NA&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|15&lt;br /&gt;
|Mode_6&lt;br /&gt;
|P8_11&lt;br /&gt;
|GPIO1_13&lt;br /&gt;
|gpmc_ad9&lt;br /&gt;
|824h&lt;br /&gt;
|0x024&lt;br /&gt;
|NA&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|14&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P8_16&lt;br /&gt;
|GPIO1_14&lt;br /&gt;
|gpmc_ad14&lt;br /&gt;
|838h&lt;br /&gt;
|0x038&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|15&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P8_15&lt;br /&gt;
|GPIO1_15&lt;br /&gt;
|gpmc_ad15&lt;br /&gt;
|83Ch&lt;br /&gt;
|0x03C&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|16&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P9_24&lt;br /&gt;
|UART1_TXD&lt;br /&gt;
|uart1_txd&lt;br /&gt;
|984h&lt;br /&gt;
|0x184&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|0&lt;br /&gt;
|Mode_6&lt;br /&gt;
|0&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_45&lt;br /&gt;
|GPIO2_6&lt;br /&gt;
|lcd_data0&lt;br /&gt;
|8A0h&lt;br /&gt;
|0x0A0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|1&lt;br /&gt;
|Mode_6&lt;br /&gt;
|1&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_46&lt;br /&gt;
|GPIO2_7&lt;br /&gt;
|lcd_data1&lt;br /&gt;
|8A4h&lt;br /&gt;
|0x0A4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|2&lt;br /&gt;
|Mode_6&lt;br /&gt;
|2&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_43&lt;br /&gt;
|GPIO2_8&lt;br /&gt;
|lcd_data2&lt;br /&gt;
|8A8h&lt;br /&gt;
|0x0A8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|3&lt;br /&gt;
|Mode_6&lt;br /&gt;
|3&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_44&lt;br /&gt;
|GPIO2_9&lt;br /&gt;
|lcd_data3&lt;br /&gt;
|8ACh&lt;br /&gt;
|0x0AC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|4&lt;br /&gt;
|Mode_6&lt;br /&gt;
|4&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_41&lt;br /&gt;
|GPIO2_10&lt;br /&gt;
|lcd_data4&lt;br /&gt;
|8B0h&lt;br /&gt;
|0x0B0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|5&lt;br /&gt;
|Mode_6&lt;br /&gt;
|5&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_42&lt;br /&gt;
|GPIO2_11&lt;br /&gt;
|lcd_data5&lt;br /&gt;
|8B4h&lt;br /&gt;
|0x0B4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|6&lt;br /&gt;
|Mode_6&lt;br /&gt;
|6&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_39&lt;br /&gt;
|GPIO2_12&lt;br /&gt;
|lcd_data6&lt;br /&gt;
|8B8h&lt;br /&gt;
|0x0B8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|7&lt;br /&gt;
|Mode_6&lt;br /&gt;
|7&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_40&lt;br /&gt;
|GPIO2_13&lt;br /&gt;
|lcd_data7&lt;br /&gt;
|8BCh&lt;br /&gt;
|0x0BC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|8&lt;br /&gt;
|Mode_6&lt;br /&gt;
|8&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_27&lt;br /&gt;
|GPIO2_22&lt;br /&gt;
|lcd_vsync&lt;br /&gt;
|8E0h&lt;br /&gt;
|0x0EO&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|9&lt;br /&gt;
|Mode_6&lt;br /&gt;
|9&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_29&lt;br /&gt;
|GPIO2_23&lt;br /&gt;
|lcd_hsync&lt;br /&gt;
|8E4h&lt;br /&gt;
|0x0E4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|10&lt;br /&gt;
|Mode_6&lt;br /&gt;
|10&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_28&lt;br /&gt;
|GPIO2_24&lt;br /&gt;
|lcd_pclk&lt;br /&gt;
|8E8h&lt;br /&gt;
|0x0E8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|11&lt;br /&gt;
|Mode_6&lt;br /&gt;
|11&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_30&lt;br /&gt;
|GPIO2_25&lt;br /&gt;
|lcd_ac_bias_en&lt;br /&gt;
|8ECh&lt;br /&gt;
|0x0EC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|12&lt;br /&gt;
|Mode_6&lt;br /&gt;
|12&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_21&lt;br /&gt;
|GPIO1_30&lt;br /&gt;
|gpmc_csn1&lt;br /&gt;
|880h&lt;br /&gt;
|0x080&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|13&lt;br /&gt;
|Mode_6&lt;br /&gt;
|13&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_20&lt;br /&gt;
|GPIO1_31&lt;br /&gt;
|gpmc_csn2&lt;br /&gt;
|884h&lt;br /&gt;
|0x084&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|16&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P9_26&lt;br /&gt;
|UART1_RXD&lt;br /&gt;
|uart1_rxd&lt;br /&gt;
|980h&lt;br /&gt;
|0x180&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*Note1: The PRU0 Registers{30,31} Bit 4 (GPIO3_18) is routed to P9_42-GPIO0_7 pin.  You MUST set GPIO0_7 to input mode in pinmuxing.&lt;br /&gt;
&lt;br /&gt;
*Note2: The PRU0 Registers{30,31} Bit 6 (GPIO3_20) is routed to P9_41-GPIO0_20(CLKOUT2). You must set GPIO0_20 to input mode in pinmuxing.&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
* [https://github.com/beagleboard/am335x_pru_package AM335x PRU support package on Github]&lt;br /&gt;
* [https://github.com/beagleboard/am335x_pru_package/blob/master/am335xPruReferenceGuide.pdf?raw=true AM335x PRU-ICSS Reference Guide]&lt;br /&gt;
The documentation on the subsystem is  [[media:spruh73c.pdf|here]].  TI does not support this subsystem and all questions/inquires/problems should be directed to the community.&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/sagedevices/ti-pruv2-assembly-textmate-bundle PRU assembly syntax highlighting for TextMate, Sublime Text, etc.]&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
* [[BeagleBone_6502_RemoteProc_cape]]&lt;br /&gt;
* [https://github.com/mranostay/beagle-nixie BeagleBone Nixie Cape PRU App]&lt;br /&gt;
* [http://processors.wiki.ti.com/index.php/Soft-UART_Implementation_on_AM335X_PRU_-_Software_Users_Guide PRU Soft UART Driver]&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/Ti_AM33XX_PRUSSv2</id>
		<title>Ti AM33XX PRUSSv2</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/Ti_AM33XX_PRUSSv2"/>
				<updated>2013-05-13T19:35:11Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: /* Communication */ fixed link error&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The PRUSS (Programmable Real-time Unit Sub System) consists of two 32-bit 200MHz real-time cores, each with 8KB of program memory and direct access to general I/O.&lt;br /&gt;
These cores are connected to various data memories, peripheral modules and an interrupt controller for access to the entire system-on-a-chip via a 32-bit interconnect bus.&lt;br /&gt;
&lt;br /&gt;
PRUs are programmed in [http://en.wikipedia.org/wiki/Assembly_language Assembly], with most commands executing in a single cycle with no caching or pipe-lining, allowing for 100% predictable timings. At 200MHz, a single cycle most operations will take 5ns (nanoseconds) with exception of accessing memory external to PRU to execute.&lt;br /&gt;
&lt;br /&gt;
====This is a Work In Progress====&lt;br /&gt;
&lt;br /&gt;
== Available PRU Resources ==&lt;br /&gt;
[[PRUSSv2 Memory Map|Click here for a full list of register mappings.]]&lt;br /&gt;
&lt;br /&gt;
=== Per PRU ===&lt;br /&gt;
; 8KB program memory&lt;br /&gt;
: Memory used to store instructions and static data AKA Instruction Memory (IRAM). This is the memory in which PRU programs are loaded.&lt;br /&gt;
&lt;br /&gt;
; Enhanced GPIO (EGPIO)&lt;br /&gt;
: High-speed direct access to 16 general purpose output and 17 general purpose input pins for each PRU.&lt;br /&gt;
:; PRU0&lt;br /&gt;
:: ''pr1_pru_0_pru_r30[15:0]'' (PRU0 Register R30 Outputs)&lt;br /&gt;
:: ''pr1_pru_0_pru_r31[16:0]'' (PRU0 Register R31 Inputs)&lt;br /&gt;
:; PRU1&lt;br /&gt;
:: ''pr1_pru_1_pru_r30[15:0]'' (PRU1 Register R30 Outputs)&lt;br /&gt;
:: ''pr1_pru_1_pru_r31[16:0]'' (PRU1 Register R31 Inputs)&lt;br /&gt;
:; Hardware capture modes&lt;br /&gt;
:: Serial 28-bit shift in and out.&lt;br /&gt;
:: Parallel 16-bit capture on clock.&lt;br /&gt;
:: [http://en.wikipedia.org/wiki/Media_Independent_Interface| MII] standardised capture mode, used for implementing media independent Fast Ethernet (100Mbps - 25MHz 4-bit).&lt;br /&gt;
&lt;br /&gt;
; A 32-bit multiply and accumulate unit (MAC)&lt;br /&gt;
: Enables single-cycle integer multiplications with a 64-bit overflow (useful for decimal results).&lt;br /&gt;
&lt;br /&gt;
; 8KB data memory&lt;br /&gt;
: Memory used to store dynamic data. Is accessed over the 32-bit bus and so not single-cycle.&lt;br /&gt;
: One PRU may access the memory of another for passing information but it is recommend to use scratch pad or shared memory, see below.&lt;br /&gt;
&lt;br /&gt;
; [http://en.wikipedia.org/wiki/Open_Core_Protocol| Open Core Protocol] (OCP) master port&lt;br /&gt;
: Access to the data bus that interconnects all peripherals on the SoC, including the ARM Cortex-A8, used for data transfer directly to and from the PRU in Level 3 (L3) memory space.&lt;br /&gt;
&lt;br /&gt;
=== Shared Between PRUs ===&lt;br /&gt;
; Scratch pad&lt;br /&gt;
: 3 banks of 30 32-bit registers (total 90 32-bit registers).&lt;br /&gt;
: Single-cycle access, can be accessed from either PRU for data sharing and signalling or for individual use.&lt;br /&gt;
&lt;br /&gt;
; 12KB data memory&lt;br /&gt;
: Accessed over the 32-but bus, not single-cycle.&lt;br /&gt;
&lt;br /&gt;
=== Local Peripherals ===&lt;br /&gt;
Local peripherals are those present within the PRUSS and not those belonging to the entire SoC. Peripherals are accessed from PRUs over the Switched Central Resource (SCR) 32-bit bus within the PRUSS.&lt;br /&gt;
&lt;br /&gt;
Attached to the SCR bus is also an OCP slave, enabling OCP masters from outside of the PRUSS to access these local peripherals in Level 4 (L4) memory space.&lt;br /&gt;
&lt;br /&gt;
; Enhanced Capture Model (eCAP)&lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
; Industrial Ethernet Peripheral (IEP)&lt;br /&gt;
&lt;br /&gt;
; Universal Asynchronous Receiver/Transmitter (UART0)&lt;br /&gt;
: Used to perform serial data transmission to the TL16C550 industry standard.&lt;br /&gt;
: 16-bit FIFO receive and transmit buffers + per byte error status.&lt;br /&gt;
: Can generate Interrupt requests for the PRUSS Interrupt Controller.&lt;br /&gt;
: Can generate DMA requests for the EDMA SoC DMA controller.&lt;br /&gt;
: Maximum transmission speed of 192MHz (192Mbps - 24MB/s).&lt;br /&gt;
&lt;br /&gt;
== Communication ==&lt;br /&gt;
Communication between various elements of the PRUSS or the wider SoC may take place either directly, over a bus, via interrupts or via DMA.&lt;br /&gt;
&lt;br /&gt;
The following lists will expose all possible communication approaches for each likely scenario.&lt;br /&gt;
&lt;br /&gt;
For communication via interrupts, please first read the section on the [[PRUSSv2 Interrupt Controller]].&lt;br /&gt;
&lt;br /&gt;
[[PRUSSv2 Interrupts| Click here for a full list of PRUSS Interrupts.]]&lt;br /&gt;
&lt;br /&gt;
The current [https://github.com/beagleboard/am335x_pru_package/blob/master/pru_sw/app_loader/interface/prussdrv.c example PRU loader] uses [http://arago-project.org/git/projects/?p=linux-am33x.git;a=commit;h=f1a304e7941cc76353363a139cbb6a4b1ca7c737 UIO], but this ideally should be replaced with [http://omappedia.org/wiki/Category:RPMsg remoteproc] rather than poking at the registers from userspace.&lt;br /&gt;
&lt;br /&gt;
=== PRU to Host (PRU to ARM Cortex-A8) ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Host to PRU (ARM Cortex-A8 to PRU) ===&lt;br /&gt;
==== Interrupts ====&lt;br /&gt;
Each PRU has access to host interrupt channels Host-0 and Host-1 through register R31 bit 30 and bit 31 respectively.&lt;br /&gt;
By probing these registers, a PRU can determine if an interrupt is currently present on each host channel.&lt;br /&gt;
&lt;br /&gt;
To configure &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PRU to external peripherals ===&lt;br /&gt;
=== External peripherals to PRU ===&lt;br /&gt;
=== PRU to internal peripherals ===&lt;br /&gt;
=== Internal peripherals to PRU ===&lt;br /&gt;
&lt;br /&gt;
== Loading a PRU Program ==&lt;br /&gt;
&lt;br /&gt;
==Beaglebone PRU connections and modes==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|'''PRU #'''&lt;br /&gt;
|'''R30(input) bit'''&lt;br /&gt;
|'''Pinmux Mode'''&lt;br /&gt;
|'''R31(output) bit'''&lt;br /&gt;
|'''Pinmux Mode'''&lt;br /&gt;
|'''BB Header'''&lt;br /&gt;
|'''BB Pin Name'''&lt;br /&gt;
|'''ZCZ BallName'''&lt;br /&gt;
|'''Offset Reg'''&lt;br /&gt;
|'''DT Offset'''&lt;br /&gt;
|'''Input Mode'''&lt;br /&gt;
|'''Output Mode'''&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|0&lt;br /&gt;
|Mode_6&lt;br /&gt;
|0&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_31&lt;br /&gt;
|SPI1_SCLK&lt;br /&gt;
|mcasp0_aclkx&lt;br /&gt;
|990h&lt;br /&gt;
|0x190&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|1&lt;br /&gt;
|Mode_6&lt;br /&gt;
|1&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_31&lt;br /&gt;
|SPI1_D0&lt;br /&gt;
|mcasp0_fsx&lt;br /&gt;
|994h&lt;br /&gt;
|0x194&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|2&lt;br /&gt;
|Mode_6&lt;br /&gt;
|2&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_30&lt;br /&gt;
|SPI1_D1&lt;br /&gt;
|mcasp0_axr0&lt;br /&gt;
|998h&lt;br /&gt;
|0x198&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|3&lt;br /&gt;
|Mode_6&lt;br /&gt;
|3&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_28&lt;br /&gt;
|SPI1_CS0&lt;br /&gt;
|mcasp0_ahclkr&lt;br /&gt;
|99Ch&lt;br /&gt;
|0x19C&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|4&lt;br /&gt;
|Mode_6&lt;br /&gt;
|4&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_42&lt;br /&gt;
|(*see note1 below)&lt;br /&gt;
|mcasp0_aclkr&lt;br /&gt;
|9A0h&lt;br /&gt;
|0x1A0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|5&lt;br /&gt;
|Mode_6&lt;br /&gt;
|5&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_27&lt;br /&gt;
|GPIO3_19&lt;br /&gt;
|mcasp0_fsr&lt;br /&gt;
|9A4h&lt;br /&gt;
|0x1A4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|6&lt;br /&gt;
|Mode_6&lt;br /&gt;
|6&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_41&lt;br /&gt;
|(*see note2 below)&lt;br /&gt;
|mcasp0_axr1&lt;br /&gt;
|9A8h&lt;br /&gt;
|0x1A8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|7&lt;br /&gt;
|Mode_6&lt;br /&gt;
|7&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_25&lt;br /&gt;
|GPIO3_21&lt;br /&gt;
|mcasp0_ahclkx&lt;br /&gt;
|9ACh&lt;br /&gt;
|0x1AC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|14&lt;br /&gt;
|Mode_6&lt;br /&gt;
|P8_12&lt;br /&gt;
|GPIO1_12&lt;br /&gt;
|gpmc_ad12&lt;br /&gt;
|830h&lt;br /&gt;
|0x030&lt;br /&gt;
|NA&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|15&lt;br /&gt;
|Mode_6&lt;br /&gt;
|P8_11&lt;br /&gt;
|GPIO1_13&lt;br /&gt;
|gpmc_ad9&lt;br /&gt;
|824h&lt;br /&gt;
|0x024&lt;br /&gt;
|NA&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|14&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P8_16&lt;br /&gt;
|GPIO1_14&lt;br /&gt;
|gpmc_ad14&lt;br /&gt;
|838h&lt;br /&gt;
|0x038&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|15&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P8_15&lt;br /&gt;
|GPIO1_15&lt;br /&gt;
|gpmc_ad15&lt;br /&gt;
|83Ch&lt;br /&gt;
|0x03C&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|16&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P9_24&lt;br /&gt;
|UART1_TXD&lt;br /&gt;
|uart1_txd&lt;br /&gt;
|984h&lt;br /&gt;
|0x184&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|0&lt;br /&gt;
|Mode_6&lt;br /&gt;
|0&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_45&lt;br /&gt;
|GPIO2_6&lt;br /&gt;
|lcd_data0&lt;br /&gt;
|8A0h&lt;br /&gt;
|0x0A0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|1&lt;br /&gt;
|Mode_6&lt;br /&gt;
|1&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_46&lt;br /&gt;
|GPIO2_7&lt;br /&gt;
|lcd_data1&lt;br /&gt;
|8A4h&lt;br /&gt;
|0x0A4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|2&lt;br /&gt;
|Mode_6&lt;br /&gt;
|2&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_43&lt;br /&gt;
|GPIO2_8&lt;br /&gt;
|lcd_data2&lt;br /&gt;
|8A8h&lt;br /&gt;
|0x0A8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|3&lt;br /&gt;
|Mode_6&lt;br /&gt;
|3&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_44&lt;br /&gt;
|GPIO2_9&lt;br /&gt;
|lcd_data3&lt;br /&gt;
|8ACh&lt;br /&gt;
|0x0AC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|4&lt;br /&gt;
|Mode_6&lt;br /&gt;
|4&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_41&lt;br /&gt;
|GPIO2_10&lt;br /&gt;
|lcd_data4&lt;br /&gt;
|8B0h&lt;br /&gt;
|0x0B0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|5&lt;br /&gt;
|Mode_6&lt;br /&gt;
|5&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_42&lt;br /&gt;
|GPIO2_11&lt;br /&gt;
|lcd_data5&lt;br /&gt;
|8B4h&lt;br /&gt;
|0x0B4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|6&lt;br /&gt;
|Mode_6&lt;br /&gt;
|6&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_39&lt;br /&gt;
|GPIO2_12&lt;br /&gt;
|lcd_data6&lt;br /&gt;
|8B8h&lt;br /&gt;
|0x0B8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|7&lt;br /&gt;
|Mode_6&lt;br /&gt;
|7&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_40&lt;br /&gt;
|GPIO2_13&lt;br /&gt;
|lcd_data7&lt;br /&gt;
|8BCh&lt;br /&gt;
|0x0BC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|8&lt;br /&gt;
|Mode_6&lt;br /&gt;
|8&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_27&lt;br /&gt;
|GPIO2_22&lt;br /&gt;
|lcd_vsync&lt;br /&gt;
|8E0h&lt;br /&gt;
|0x0EO&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|9&lt;br /&gt;
|Mode_6&lt;br /&gt;
|9&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_29&lt;br /&gt;
|GPIO2_23&lt;br /&gt;
|lcd_hsync&lt;br /&gt;
|8E4h&lt;br /&gt;
|0x0E4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|10&lt;br /&gt;
|Mode_6&lt;br /&gt;
|10&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_28&lt;br /&gt;
|GPIO2_24&lt;br /&gt;
|lcd_pclk&lt;br /&gt;
|8E8h&lt;br /&gt;
|0x0E8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|11&lt;br /&gt;
|Mode_6&lt;br /&gt;
|11&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_30&lt;br /&gt;
|GPIO2_25&lt;br /&gt;
|lcd_ac_bias_en&lt;br /&gt;
|8ECh&lt;br /&gt;
|0x0EC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|12&lt;br /&gt;
|Mode_6&lt;br /&gt;
|12&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_21&lt;br /&gt;
|GPIO1_30&lt;br /&gt;
|gpmc_csn1&lt;br /&gt;
|880h&lt;br /&gt;
|0x080&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|13&lt;br /&gt;
|Mode_6&lt;br /&gt;
|13&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_20&lt;br /&gt;
|GPIO1_31&lt;br /&gt;
|gpmc_csn2&lt;br /&gt;
|884h&lt;br /&gt;
|0x084&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|16&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P9_26&lt;br /&gt;
|UART1_RXD&lt;br /&gt;
|uart1_rxd&lt;br /&gt;
|980h&lt;br /&gt;
|0x180&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*Note1: The PRU0 Registers{30,31} Bit 4 (GPIO3_18) is routed to P9_42-GPIO0_7 pin.  You MUST set GPIO0_7 to input mode in pinmuxing.&lt;br /&gt;
&lt;br /&gt;
*Note2: The PRU0 Registers{30,31} Bit 6 (GPIO3_20) is routed to P9_41-GPIO0_20(CLKOUT2). You must set GPIO0_20 to input mode in pinmuxing.&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
* [https://github.com/beagleboard/am335x_pru_package AM335x PRU support package on Github]&lt;br /&gt;
* [https://github.com/beagleboard/am335x_pru_package/blob/master/am335xPruReferenceGuide.pdf?raw=true AM335x PRU-ICSS Reference Guide]&lt;br /&gt;
The documentation on the subsystem is  [[media:spruh73c.pdf|here]].  TI does not support this subsystem and all questions/inquires/problems should be directed to the community.&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/sagedevices/ti-pruv2-assembly-textmate-bundle PRU assembly syntax highlighting for TextMate, Sublime Text, etc.]&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
* [[BeagleBone_6502_RemoteProc_cape]]&lt;br /&gt;
* [https://github.com/mranostay/beagle-nixie BeagleBone Nixie Cape PRU App]&lt;br /&gt;
* [http://processors.wiki.ti.com/index.php/Soft-UART_Implementation_on_AM335X_PRU_-_Software_Users_Guide PRU Soft UART Driver]&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/Ti_AM33XX_PRUSSv2</id>
		<title>Ti AM33XX PRUSSv2</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/Ti_AM33XX_PRUSSv2"/>
				<updated>2013-05-13T19:34:42Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: fixed link error&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The PRUSS (Programmable Real-time Unit Sub System) consists of two 32-bit 200MHz real-time cores, each with 8KB of program memory and direct access to general I/O.&lt;br /&gt;
These cores are connected to various data memories, peripheral modules and an interrupt controller for access to the entire system-on-a-chip via a 32-bit interconnect bus.&lt;br /&gt;
&lt;br /&gt;
PRUs are programmed in [http://en.wikipedia.org/wiki/Assembly_language Assembly], with most commands executing in a single cycle with no caching or pipe-lining, allowing for 100% predictable timings. At 200MHz, a single cycle most operations will take 5ns (nanoseconds) with exception of accessing memory external to PRU to execute.&lt;br /&gt;
&lt;br /&gt;
====This is a Work In Progress====&lt;br /&gt;
&lt;br /&gt;
== Available PRU Resources ==&lt;br /&gt;
[[PRUSSv2 Memory Map|Click here for a full list of register mappings.]]&lt;br /&gt;
&lt;br /&gt;
=== Per PRU ===&lt;br /&gt;
; 8KB program memory&lt;br /&gt;
: Memory used to store instructions and static data AKA Instruction Memory (IRAM). This is the memory in which PRU programs are loaded.&lt;br /&gt;
&lt;br /&gt;
; Enhanced GPIO (EGPIO)&lt;br /&gt;
: High-speed direct access to 16 general purpose output and 17 general purpose input pins for each PRU.&lt;br /&gt;
:; PRU0&lt;br /&gt;
:: ''pr1_pru_0_pru_r30[15:0]'' (PRU0 Register R30 Outputs)&lt;br /&gt;
:: ''pr1_pru_0_pru_r31[16:0]'' (PRU0 Register R31 Inputs)&lt;br /&gt;
:; PRU1&lt;br /&gt;
:: ''pr1_pru_1_pru_r30[15:0]'' (PRU1 Register R30 Outputs)&lt;br /&gt;
:: ''pr1_pru_1_pru_r31[16:0]'' (PRU1 Register R31 Inputs)&lt;br /&gt;
:; Hardware capture modes&lt;br /&gt;
:: Serial 28-bit shift in and out.&lt;br /&gt;
:: Parallel 16-bit capture on clock.&lt;br /&gt;
:: [http://en.wikipedia.org/wiki/Media_Independent_Interface| MII] standardised capture mode, used for implementing media independent Fast Ethernet (100Mbps - 25MHz 4-bit).&lt;br /&gt;
&lt;br /&gt;
; A 32-bit multiply and accumulate unit (MAC)&lt;br /&gt;
: Enables single-cycle integer multiplications with a 64-bit overflow (useful for decimal results).&lt;br /&gt;
&lt;br /&gt;
; 8KB data memory&lt;br /&gt;
: Memory used to store dynamic data. Is accessed over the 32-bit bus and so not single-cycle.&lt;br /&gt;
: One PRU may access the memory of another for passing information but it is recommend to use scratch pad or shared memory, see below.&lt;br /&gt;
&lt;br /&gt;
; [http://en.wikipedia.org/wiki/Open_Core_Protocol| Open Core Protocol] (OCP) master port&lt;br /&gt;
: Access to the data bus that interconnects all peripherals on the SoC, including the ARM Cortex-A8, used for data transfer directly to and from the PRU in Level 3 (L3) memory space.&lt;br /&gt;
&lt;br /&gt;
=== Shared Between PRUs ===&lt;br /&gt;
; Scratch pad&lt;br /&gt;
: 3 banks of 30 32-bit registers (total 90 32-bit registers).&lt;br /&gt;
: Single-cycle access, can be accessed from either PRU for data sharing and signalling or for individual use.&lt;br /&gt;
&lt;br /&gt;
; 12KB data memory&lt;br /&gt;
: Accessed over the 32-but bus, not single-cycle.&lt;br /&gt;
&lt;br /&gt;
=== Local Peripherals ===&lt;br /&gt;
Local peripherals are those present within the PRUSS and not those belonging to the entire SoC. Peripherals are accessed from PRUs over the Switched Central Resource (SCR) 32-bit bus within the PRUSS.&lt;br /&gt;
&lt;br /&gt;
Attached to the SCR bus is also an OCP slave, enabling OCP masters from outside of the PRUSS to access these local peripherals in Level 4 (L4) memory space.&lt;br /&gt;
&lt;br /&gt;
; Enhanced Capture Model (eCAP)&lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
; Industrial Ethernet Peripheral (IEP)&lt;br /&gt;
&lt;br /&gt;
; Universal Asynchronous Receiver/Transmitter (UART0)&lt;br /&gt;
: Used to perform serial data transmission to the TL16C550 industry standard.&lt;br /&gt;
: 16-bit FIFO receive and transmit buffers + per byte error status.&lt;br /&gt;
: Can generate Interrupt requests for the PRUSS Interrupt Controller.&lt;br /&gt;
: Can generate DMA requests for the EDMA SoC DMA controller.&lt;br /&gt;
: Maximum transmission speed of 192MHz (192Mbps - 24MB/s).&lt;br /&gt;
&lt;br /&gt;
== Communication ==&lt;br /&gt;
Communication between various elements of the PRUSS or the wider SoC may take place either directly, over a bus, via interrupts or via DMA.&lt;br /&gt;
&lt;br /&gt;
The following lists will expose all possible communication approaches for each likely scenario.&lt;br /&gt;
&lt;br /&gt;
For communication via interrupts, please first read the section on the [[PRUSSv2 Interrupt Controller]].&lt;br /&gt;
&lt;br /&gt;
[[PRUSSv2 Interrupts| Click here for a full list of PRUSS Interrupts.]]&lt;br /&gt;
&lt;br /&gt;
The current [https://github.com/beagleboard/am335x_pru_package/blob/master/pru_sw/app_loader/interface/prussdrv.c | example PRU loader] uses [http://arago-project.org/git/projects/?p=linux-am33x.git;a=commit;h=f1a304e7941cc76353363a139cbb6a4b1ca7c737 UIO], but this ideally should be replaced with [http://omappedia.org/wiki/Category:RPMsg remoteproc] rather than poking at the registers from userspace.&lt;br /&gt;
&lt;br /&gt;
=== PRU to Host (PRU to ARM Cortex-A8) ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Host to PRU (ARM Cortex-A8 to PRU) ===&lt;br /&gt;
==== Interrupts ====&lt;br /&gt;
Each PRU has access to host interrupt channels Host-0 and Host-1 through register R31 bit 30 and bit 31 respectively.&lt;br /&gt;
By probing these registers, a PRU can determine if an interrupt is currently present on each host channel.&lt;br /&gt;
&lt;br /&gt;
To configure &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PRU to external peripherals ===&lt;br /&gt;
=== External peripherals to PRU ===&lt;br /&gt;
=== PRU to internal peripherals ===&lt;br /&gt;
=== Internal peripherals to PRU ===&lt;br /&gt;
&lt;br /&gt;
== Loading a PRU Program ==&lt;br /&gt;
&lt;br /&gt;
==Beaglebone PRU connections and modes==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|'''PRU #'''&lt;br /&gt;
|'''R30(input) bit'''&lt;br /&gt;
|'''Pinmux Mode'''&lt;br /&gt;
|'''R31(output) bit'''&lt;br /&gt;
|'''Pinmux Mode'''&lt;br /&gt;
|'''BB Header'''&lt;br /&gt;
|'''BB Pin Name'''&lt;br /&gt;
|'''ZCZ BallName'''&lt;br /&gt;
|'''Offset Reg'''&lt;br /&gt;
|'''DT Offset'''&lt;br /&gt;
|'''Input Mode'''&lt;br /&gt;
|'''Output Mode'''&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|0&lt;br /&gt;
|Mode_6&lt;br /&gt;
|0&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_31&lt;br /&gt;
|SPI1_SCLK&lt;br /&gt;
|mcasp0_aclkx&lt;br /&gt;
|990h&lt;br /&gt;
|0x190&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|1&lt;br /&gt;
|Mode_6&lt;br /&gt;
|1&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_31&lt;br /&gt;
|SPI1_D0&lt;br /&gt;
|mcasp0_fsx&lt;br /&gt;
|994h&lt;br /&gt;
|0x194&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|2&lt;br /&gt;
|Mode_6&lt;br /&gt;
|2&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_30&lt;br /&gt;
|SPI1_D1&lt;br /&gt;
|mcasp0_axr0&lt;br /&gt;
|998h&lt;br /&gt;
|0x198&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|3&lt;br /&gt;
|Mode_6&lt;br /&gt;
|3&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_28&lt;br /&gt;
|SPI1_CS0&lt;br /&gt;
|mcasp0_ahclkr&lt;br /&gt;
|99Ch&lt;br /&gt;
|0x19C&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|4&lt;br /&gt;
|Mode_6&lt;br /&gt;
|4&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_42&lt;br /&gt;
|(*see note1 below)&lt;br /&gt;
|mcasp0_aclkr&lt;br /&gt;
|9A0h&lt;br /&gt;
|0x1A0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|5&lt;br /&gt;
|Mode_6&lt;br /&gt;
|5&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_27&lt;br /&gt;
|GPIO3_19&lt;br /&gt;
|mcasp0_fsr&lt;br /&gt;
|9A4h&lt;br /&gt;
|0x1A4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|6&lt;br /&gt;
|Mode_6&lt;br /&gt;
|6&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_41&lt;br /&gt;
|(*see note2 below)&lt;br /&gt;
|mcasp0_axr1&lt;br /&gt;
|9A8h&lt;br /&gt;
|0x1A8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|7&lt;br /&gt;
|Mode_6&lt;br /&gt;
|7&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_25&lt;br /&gt;
|GPIO3_21&lt;br /&gt;
|mcasp0_ahclkx&lt;br /&gt;
|9ACh&lt;br /&gt;
|0x1AC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|14&lt;br /&gt;
|Mode_6&lt;br /&gt;
|P8_12&lt;br /&gt;
|GPIO1_12&lt;br /&gt;
|gpmc_ad12&lt;br /&gt;
|830h&lt;br /&gt;
|0x030&lt;br /&gt;
|NA&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|15&lt;br /&gt;
|Mode_6&lt;br /&gt;
|P8_11&lt;br /&gt;
|GPIO1_13&lt;br /&gt;
|gpmc_ad9&lt;br /&gt;
|824h&lt;br /&gt;
|0x024&lt;br /&gt;
|NA&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|14&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P8_16&lt;br /&gt;
|GPIO1_14&lt;br /&gt;
|gpmc_ad14&lt;br /&gt;
|838h&lt;br /&gt;
|0x038&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|15&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P8_15&lt;br /&gt;
|GPIO1_15&lt;br /&gt;
|gpmc_ad15&lt;br /&gt;
|83Ch&lt;br /&gt;
|0x03C&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|16&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P9_24&lt;br /&gt;
|UART1_TXD&lt;br /&gt;
|uart1_txd&lt;br /&gt;
|984h&lt;br /&gt;
|0x184&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|0&lt;br /&gt;
|Mode_6&lt;br /&gt;
|0&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_45&lt;br /&gt;
|GPIO2_6&lt;br /&gt;
|lcd_data0&lt;br /&gt;
|8A0h&lt;br /&gt;
|0x0A0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|1&lt;br /&gt;
|Mode_6&lt;br /&gt;
|1&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_46&lt;br /&gt;
|GPIO2_7&lt;br /&gt;
|lcd_data1&lt;br /&gt;
|8A4h&lt;br /&gt;
|0x0A4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|2&lt;br /&gt;
|Mode_6&lt;br /&gt;
|2&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_43&lt;br /&gt;
|GPIO2_8&lt;br /&gt;
|lcd_data2&lt;br /&gt;
|8A8h&lt;br /&gt;
|0x0A8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|3&lt;br /&gt;
|Mode_6&lt;br /&gt;
|3&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_44&lt;br /&gt;
|GPIO2_9&lt;br /&gt;
|lcd_data3&lt;br /&gt;
|8ACh&lt;br /&gt;
|0x0AC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|4&lt;br /&gt;
|Mode_6&lt;br /&gt;
|4&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_41&lt;br /&gt;
|GPIO2_10&lt;br /&gt;
|lcd_data4&lt;br /&gt;
|8B0h&lt;br /&gt;
|0x0B0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|5&lt;br /&gt;
|Mode_6&lt;br /&gt;
|5&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_42&lt;br /&gt;
|GPIO2_11&lt;br /&gt;
|lcd_data5&lt;br /&gt;
|8B4h&lt;br /&gt;
|0x0B4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|6&lt;br /&gt;
|Mode_6&lt;br /&gt;
|6&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_39&lt;br /&gt;
|GPIO2_12&lt;br /&gt;
|lcd_data6&lt;br /&gt;
|8B8h&lt;br /&gt;
|0x0B8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|7&lt;br /&gt;
|Mode_6&lt;br /&gt;
|7&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_40&lt;br /&gt;
|GPIO2_13&lt;br /&gt;
|lcd_data7&lt;br /&gt;
|8BCh&lt;br /&gt;
|0x0BC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|8&lt;br /&gt;
|Mode_6&lt;br /&gt;
|8&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_27&lt;br /&gt;
|GPIO2_22&lt;br /&gt;
|lcd_vsync&lt;br /&gt;
|8E0h&lt;br /&gt;
|0x0EO&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|9&lt;br /&gt;
|Mode_6&lt;br /&gt;
|9&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_29&lt;br /&gt;
|GPIO2_23&lt;br /&gt;
|lcd_hsync&lt;br /&gt;
|8E4h&lt;br /&gt;
|0x0E4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|10&lt;br /&gt;
|Mode_6&lt;br /&gt;
|10&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_28&lt;br /&gt;
|GPIO2_24&lt;br /&gt;
|lcd_pclk&lt;br /&gt;
|8E8h&lt;br /&gt;
|0x0E8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|11&lt;br /&gt;
|Mode_6&lt;br /&gt;
|11&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_30&lt;br /&gt;
|GPIO2_25&lt;br /&gt;
|lcd_ac_bias_en&lt;br /&gt;
|8ECh&lt;br /&gt;
|0x0EC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|12&lt;br /&gt;
|Mode_6&lt;br /&gt;
|12&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_21&lt;br /&gt;
|GPIO1_30&lt;br /&gt;
|gpmc_csn1&lt;br /&gt;
|880h&lt;br /&gt;
|0x080&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|13&lt;br /&gt;
|Mode_6&lt;br /&gt;
|13&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_20&lt;br /&gt;
|GPIO1_31&lt;br /&gt;
|gpmc_csn2&lt;br /&gt;
|884h&lt;br /&gt;
|0x084&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|16&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P9_26&lt;br /&gt;
|UART1_RXD&lt;br /&gt;
|uart1_rxd&lt;br /&gt;
|980h&lt;br /&gt;
|0x180&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*Note1: The PRU0 Registers{30,31} Bit 4 (GPIO3_18) is routed to P9_42-GPIO0_7 pin.  You MUST set GPIO0_7 to input mode in pinmuxing.&lt;br /&gt;
&lt;br /&gt;
*Note2: The PRU0 Registers{30,31} Bit 6 (GPIO3_20) is routed to P9_41-GPIO0_20(CLKOUT2). You must set GPIO0_20 to input mode in pinmuxing.&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
* [https://github.com/beagleboard/am335x_pru_package AM335x PRU support package on Github]&lt;br /&gt;
* [https://github.com/beagleboard/am335x_pru_package/blob/master/am335xPruReferenceGuide.pdf?raw=true AM335x PRU-ICSS Reference Guide]&lt;br /&gt;
The documentation on the subsystem is  [[media:spruh73c.pdf|here]].  TI does not support this subsystem and all questions/inquires/problems should be directed to the community.&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/sagedevices/ti-pruv2-assembly-textmate-bundle PRU assembly syntax highlighting for TextMate, Sublime Text, etc.]&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
* [[BeagleBone_6502_RemoteProc_cape]]&lt;br /&gt;
* [https://github.com/mranostay/beagle-nixie BeagleBone Nixie Cape PRU App]&lt;br /&gt;
* [http://processors.wiki.ti.com/index.php/Soft-UART_Implementation_on_AM335X_PRU_-_Software_Users_Guide PRU Soft UART Driver]&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/Ti_AM33XX_PRUSSv2</id>
		<title>Ti AM33XX PRUSSv2</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/Ti_AM33XX_PRUSSv2"/>
				<updated>2013-05-13T15:12:31Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: fixed Mhz capitalization and idiosyncrasy with access to external memory&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The PRUSS (Programmable Real-time Unit Sub System) consists of two 32-bit 200MHz real-time cores, each with 8KB of program memory and direct access to general I/O.&lt;br /&gt;
These cores are connected to various data memories, peripheral modules and an interrupt controller for access to the entire system-on-a-chip via a 32-bit interconnect bus.&lt;br /&gt;
&lt;br /&gt;
PRUs are programmed in [http://en.wikipedia.org/wiki/Assembly_language Assembly], with most commands executing in a single cycle with no caching or pipe-lining, allowing for 100% predictable timings. At 200MHz, a single cycle most operations will take 5ns (nanoseconds) with exception of accessing memory external to PRU to execute.&lt;br /&gt;
&lt;br /&gt;
====This is a Work In Progress====&lt;br /&gt;
&lt;br /&gt;
== Available PRU Resources ==&lt;br /&gt;
[[PRUSSv2 Memory Map|Click here for a full list of register mappings.]]&lt;br /&gt;
&lt;br /&gt;
=== Per PRU ===&lt;br /&gt;
; 8KB program memory&lt;br /&gt;
: Memory used to store instructions and static data AKA Instruction Memory (IRAM). This is the memory in which PRU programs are loaded.&lt;br /&gt;
&lt;br /&gt;
; Enhanced GPIO (EGPIO)&lt;br /&gt;
: High-speed direct access to 16 general purpose output and 17 general purpose input pins for each PRU.&lt;br /&gt;
:; PRU0&lt;br /&gt;
:: ''pr1_pru_0_pru_r30[15:0]'' (PRU0 Register R30 Outputs)&lt;br /&gt;
:: ''pr1_pru_0_pru_r31[16:0]'' (PRU0 Register R31 Inputs)&lt;br /&gt;
:; PRU1&lt;br /&gt;
:: ''pr1_pru_1_pru_r30[15:0]'' (PRU1 Register R30 Outputs)&lt;br /&gt;
:: ''pr1_pru_1_pru_r31[16:0]'' (PRU1 Register R31 Inputs)&lt;br /&gt;
:; Hardware capture modes&lt;br /&gt;
:: Serial 28-bit shift in and out.&lt;br /&gt;
:: Parallel 16-bit capture on clock.&lt;br /&gt;
:: [http://en.wikipedia.org/wiki/Media_Independent_Interface| MII] standardised capture mode, used for implementing media independent Fast Ethernet (100Mbps - 25MHz 4-bit).&lt;br /&gt;
&lt;br /&gt;
; A 32-bit multiply and accumulate unit (MAC)&lt;br /&gt;
: Enables single-cycle integer multiplications with a 64-bit overflow (useful for decimal results).&lt;br /&gt;
&lt;br /&gt;
; 8KB data memory&lt;br /&gt;
: Memory used to store dynamic data. Is accessed over the 32-bit bus and so not single-cycle.&lt;br /&gt;
: One PRU may access the memory of another for passing information but it is recommend to use scratch pad or shared memory, see below.&lt;br /&gt;
&lt;br /&gt;
; [http://en.wikipedia.org/wiki/Open_Core_Protocol| Open Core Protocol] (OCP) master port&lt;br /&gt;
: Access to the data bus that interconnects all peripherals on the SoC, including the ARM Cortex-A8, used for data transfer directly to and from the PRU in Level 3 (L3) memory space.&lt;br /&gt;
&lt;br /&gt;
=== Shared Between PRUs ===&lt;br /&gt;
; Scratch pad&lt;br /&gt;
: 3 banks of 30 32-bit registers (total 90 32-bit registers).&lt;br /&gt;
: Single-cycle access, can be accessed from either PRU for data sharing and signalling or for individual use.&lt;br /&gt;
&lt;br /&gt;
; 12KB data memory&lt;br /&gt;
: Accessed over the 32-but bus, not single-cycle.&lt;br /&gt;
&lt;br /&gt;
=== Local Peripherals ===&lt;br /&gt;
Local peripherals are those present within the PRUSS and not those belonging to the entire SoC. Peripherals are accessed from PRUs over the Switched Central Resource (SCR) 32-bit bus within the PRUSS.&lt;br /&gt;
&lt;br /&gt;
Attached to the SCR bus is also an OCP slave, enabling OCP masters from outside of the PRUSS to access these local peripherals in Level 4 (L4) memory space.&lt;br /&gt;
&lt;br /&gt;
; Enhanced Capture Model (eCAP)&lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
; Industrial Ethernet Peripheral (IEP)&lt;br /&gt;
&lt;br /&gt;
; Universal Asynchronous Receiver/Transmitter (UART0)&lt;br /&gt;
: Used to perform serial data transmission to the TL16C550 industry standard.&lt;br /&gt;
: 16-bit FIFO receive and transmit buffers + per byte error status.&lt;br /&gt;
: Can generate Interrupt requests for the PRUSS Interrupt Controller.&lt;br /&gt;
: Can generate DMA requests for the EDMA SoC DMA controller.&lt;br /&gt;
: Maximum transmission speed of 192MHz (192Mbps - 24MB/s).&lt;br /&gt;
&lt;br /&gt;
== Communication ==&lt;br /&gt;
Communication between various elements of the PRUSS or the wider SoC may take place either directly, over a bus, via interrupts or via DMA.&lt;br /&gt;
&lt;br /&gt;
The following lists will expose all possible communication approaches for each likely scenario.&lt;br /&gt;
&lt;br /&gt;
For communication via interrupts, please first read the section on the [[PRUSSv2 Interrupt Controller]].&lt;br /&gt;
&lt;br /&gt;
[[PRUSSv2 Interrupts| Click here for a full list of PRUSS Interrupts.]]&lt;br /&gt;
&lt;br /&gt;
The current [https://github.com/beagleboard/am335x_pru_package/blob/master/pru_sw/app_loader/interface/prussdrv.c|example PRU loader] uses [http://arago-project.org/git/projects/?p=linux-am33x.git;a=commit;h=f1a304e7941cc76353363a139cbb6a4b1ca7c737 UIO], but this ideally should be replaced with [http://omappedia.org/wiki/Category:RPMsg remoteproc] rather than poking at the registers from userspace.&lt;br /&gt;
&lt;br /&gt;
=== PRU to Host (PRU to ARM Cortex-A8) ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Host to PRU (ARM Cortex-A8 to PRU) ===&lt;br /&gt;
==== Interrupts ====&lt;br /&gt;
Each PRU has access to host interrupt channels Host-0 and Host-1 through register R31 bit 30 and bit 31 respectively.&lt;br /&gt;
By probing these registers, a PRU can determine if an interrupt is currently present on each host channel.&lt;br /&gt;
&lt;br /&gt;
To configure &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PRU to external peripherals ===&lt;br /&gt;
=== External peripherals to PRU ===&lt;br /&gt;
=== PRU to internal peripherals ===&lt;br /&gt;
=== Internal peripherals to PRU ===&lt;br /&gt;
&lt;br /&gt;
== Loading a PRU Program ==&lt;br /&gt;
&lt;br /&gt;
==Beaglebone PRU connections and modes==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|'''PRU #'''&lt;br /&gt;
|'''R30(input) bit'''&lt;br /&gt;
|'''Pinmux Mode'''&lt;br /&gt;
|'''R31(output) bit'''&lt;br /&gt;
|'''Pinmux Mode'''&lt;br /&gt;
|'''BB Header'''&lt;br /&gt;
|'''BB Pin Name'''&lt;br /&gt;
|'''ZCZ BallName'''&lt;br /&gt;
|'''Offset Reg'''&lt;br /&gt;
|'''DT Offset'''&lt;br /&gt;
|'''Input Mode'''&lt;br /&gt;
|'''Output Mode'''&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|0&lt;br /&gt;
|Mode_6&lt;br /&gt;
|0&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_31&lt;br /&gt;
|SPI1_SCLK&lt;br /&gt;
|mcasp0_aclkx&lt;br /&gt;
|990h&lt;br /&gt;
|0x190&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|1&lt;br /&gt;
|Mode_6&lt;br /&gt;
|1&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_31&lt;br /&gt;
|SPI1_D0&lt;br /&gt;
|mcasp0_fsx&lt;br /&gt;
|994h&lt;br /&gt;
|0x194&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|2&lt;br /&gt;
|Mode_6&lt;br /&gt;
|2&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_30&lt;br /&gt;
|SPI1_D1&lt;br /&gt;
|mcasp0_axr0&lt;br /&gt;
|998h&lt;br /&gt;
|0x198&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|3&lt;br /&gt;
|Mode_6&lt;br /&gt;
|3&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_28&lt;br /&gt;
|SPI1_CS0&lt;br /&gt;
|mcasp0_ahclkr&lt;br /&gt;
|99Ch&lt;br /&gt;
|0x19C&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|4&lt;br /&gt;
|Mode_6&lt;br /&gt;
|4&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_42&lt;br /&gt;
|(*see note1 below)&lt;br /&gt;
|mcasp0_aclkr&lt;br /&gt;
|9A0h&lt;br /&gt;
|0x1A0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|5&lt;br /&gt;
|Mode_6&lt;br /&gt;
|5&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_27&lt;br /&gt;
|GPIO3_19&lt;br /&gt;
|mcasp0_fsr&lt;br /&gt;
|9A4h&lt;br /&gt;
|0x1A4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|6&lt;br /&gt;
|Mode_6&lt;br /&gt;
|6&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_41&lt;br /&gt;
|(*see note2 below)&lt;br /&gt;
|mcasp0_axr1&lt;br /&gt;
|9A8h&lt;br /&gt;
|0x1A8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|7&lt;br /&gt;
|Mode_6&lt;br /&gt;
|7&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P9_25&lt;br /&gt;
|GPIO3_21&lt;br /&gt;
|mcasp0_ahclkx&lt;br /&gt;
|9ACh&lt;br /&gt;
|0x1AC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|14&lt;br /&gt;
|Mode_6&lt;br /&gt;
|P8_12&lt;br /&gt;
|GPIO1_12&lt;br /&gt;
|gpmc_ad12&lt;br /&gt;
|830h&lt;br /&gt;
|0x030&lt;br /&gt;
|NA&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|15&lt;br /&gt;
|Mode_6&lt;br /&gt;
|P8_11&lt;br /&gt;
|GPIO1_13&lt;br /&gt;
|gpmc_ad9&lt;br /&gt;
|824h&lt;br /&gt;
|0x024&lt;br /&gt;
|NA&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|14&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P8_16&lt;br /&gt;
|GPIO1_14&lt;br /&gt;
|gpmc_ad14&lt;br /&gt;
|838h&lt;br /&gt;
|0x038&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|15&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P8_15&lt;br /&gt;
|GPIO1_15&lt;br /&gt;
|gpmc_ad15&lt;br /&gt;
|83Ch&lt;br /&gt;
|0x03C&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|16&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P9_24&lt;br /&gt;
|UART1_TXD&lt;br /&gt;
|uart1_txd&lt;br /&gt;
|984h&lt;br /&gt;
|0x184&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|0&lt;br /&gt;
|Mode_6&lt;br /&gt;
|0&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_45&lt;br /&gt;
|GPIO2_6&lt;br /&gt;
|lcd_data0&lt;br /&gt;
|8A0h&lt;br /&gt;
|0x0A0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|1&lt;br /&gt;
|Mode_6&lt;br /&gt;
|1&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_46&lt;br /&gt;
|GPIO2_7&lt;br /&gt;
|lcd_data1&lt;br /&gt;
|8A4h&lt;br /&gt;
|0x0A4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|2&lt;br /&gt;
|Mode_6&lt;br /&gt;
|2&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_43&lt;br /&gt;
|GPIO2_8&lt;br /&gt;
|lcd_data2&lt;br /&gt;
|8A8h&lt;br /&gt;
|0x0A8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|3&lt;br /&gt;
|Mode_6&lt;br /&gt;
|3&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_44&lt;br /&gt;
|GPIO2_9&lt;br /&gt;
|lcd_data3&lt;br /&gt;
|8ACh&lt;br /&gt;
|0x0AC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|4&lt;br /&gt;
|Mode_6&lt;br /&gt;
|4&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_41&lt;br /&gt;
|GPIO2_10&lt;br /&gt;
|lcd_data4&lt;br /&gt;
|8B0h&lt;br /&gt;
|0x0B0&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|5&lt;br /&gt;
|Mode_6&lt;br /&gt;
|5&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_42&lt;br /&gt;
|GPIO2_11&lt;br /&gt;
|lcd_data5&lt;br /&gt;
|8B4h&lt;br /&gt;
|0x0B4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|6&lt;br /&gt;
|Mode_6&lt;br /&gt;
|6&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_39&lt;br /&gt;
|GPIO2_12&lt;br /&gt;
|lcd_data6&lt;br /&gt;
|8B8h&lt;br /&gt;
|0x0B8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|7&lt;br /&gt;
|Mode_6&lt;br /&gt;
|7&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_40&lt;br /&gt;
|GPIO2_13&lt;br /&gt;
|lcd_data7&lt;br /&gt;
|8BCh&lt;br /&gt;
|0x0BC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|8&lt;br /&gt;
|Mode_6&lt;br /&gt;
|8&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_27&lt;br /&gt;
|GPIO2_22&lt;br /&gt;
|lcd_vsync&lt;br /&gt;
|8E0h&lt;br /&gt;
|0x0EO&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|9&lt;br /&gt;
|Mode_6&lt;br /&gt;
|9&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_29&lt;br /&gt;
|GPIO2_23&lt;br /&gt;
|lcd_hsync&lt;br /&gt;
|8E4h&lt;br /&gt;
|0x0E4&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|10&lt;br /&gt;
|Mode_6&lt;br /&gt;
|10&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_28&lt;br /&gt;
|GPIO2_24&lt;br /&gt;
|lcd_pclk&lt;br /&gt;
|8E8h&lt;br /&gt;
|0x0E8&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|11&lt;br /&gt;
|Mode_6&lt;br /&gt;
|11&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_30&lt;br /&gt;
|GPIO2_25&lt;br /&gt;
|lcd_ac_bias_en&lt;br /&gt;
|8ECh&lt;br /&gt;
|0x0EC&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|12&lt;br /&gt;
|Mode_6&lt;br /&gt;
|12&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_21&lt;br /&gt;
|GPIO1_30&lt;br /&gt;
|gpmc_csn1&lt;br /&gt;
|880h&lt;br /&gt;
|0x080&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|13&lt;br /&gt;
|Mode_6&lt;br /&gt;
|13&lt;br /&gt;
|Mode_5&lt;br /&gt;
|P8_20&lt;br /&gt;
|GPIO1_31&lt;br /&gt;
|gpmc_csn2&lt;br /&gt;
|884h&lt;br /&gt;
|0x084&lt;br /&gt;
|0x06&lt;br /&gt;
|0x25&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|16&lt;br /&gt;
|Mode_6&lt;br /&gt;
|N/A&lt;br /&gt;
|&lt;br /&gt;
|P9_26&lt;br /&gt;
|UART1_RXD&lt;br /&gt;
|uart1_rxd&lt;br /&gt;
|980h&lt;br /&gt;
|0x180&lt;br /&gt;
|0x06&lt;br /&gt;
|NA&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*Note1: The PRU0 Registers{30,31} Bit 4 (GPIO3_18) is routed to P9_42-GPIO0_7 pin.  You MUST set GPIO0_7 to input mode in pinmuxing.&lt;br /&gt;
&lt;br /&gt;
*Note2: The PRU0 Registers{30,31} Bit 6 (GPIO3_20) is routed to P9_41-GPIO0_20(CLKOUT2). You must set GPIO0_20 to input mode in pinmuxing.&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
* [https://github.com/beagleboard/am335x_pru_package AM335x PRU support package on Github]&lt;br /&gt;
* [https://github.com/beagleboard/am335x_pru_package/blob/master/am335xPruReferenceGuide.pdf?raw=true AM335x PRU-ICSS Reference Guide]&lt;br /&gt;
The documentation on the subsystem is  [[media:spruh73c.pdf|here]].  TI does not support this subsystem and all questions/inquires/problems should be directed to the community.&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/sagedevices/ti-pruv2-assembly-textmate-bundle PRU assembly syntax highlighting for TextMate, Sublime Text, etc.]&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
* [[BeagleBone_6502_RemoteProc_cape]]&lt;br /&gt;
* [https://github.com/mranostay/beagle-nixie BeagleBone Nixie Cape PRU App]&lt;br /&gt;
* [http://processors.wiki.ti.com/index.php/Soft-UART_Implementation_on_AM335X_PRU_-_Software_Users_Guide PRU Soft UART Driver]&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/BeagleBone_PRU_Notes</id>
		<title>BeagleBone PRU Notes</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/BeagleBone_PRU_Notes"/>
				<updated>2013-04-25T16:31:36Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: /* Example Assembly */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The goal of this page is to record information that is pertinent to getting started with the BeagleBone's AM335x Programmable Real-time Unit (PRU).&lt;br /&gt;
&lt;br /&gt;
== BeagleBone Programmable Real-time Unit ==&lt;br /&gt;
This is also called the PRU Subsystem (PRUSS) or PRU and Industrial Controller Subsystem (PRU-ICSS). It is optimized to perform embedded tasks that require real-time constraints.&lt;br /&gt;
&lt;br /&gt;
Most important is the purssdrv library to expose functions to the PRU. You can load this library by typing modprobe uio_pruss.&lt;br /&gt;
&lt;br /&gt;
=== PRU capabilities ===&lt;br /&gt;
[[File:PRUSS.png|AM335x PRUSS]]&lt;br /&gt;
&lt;br /&gt;
* The PRU has dual 32-bit RISC cores, shared data and instruction memories and an interrupt controller (INTC).&lt;br /&gt;
* 8KB data memory and 8KB instruction memory&lt;br /&gt;
* 12KB shared RAM&lt;br /&gt;
* A small, deterministic instruction set&lt;br /&gt;
&lt;br /&gt;
There is no pipelining done on the processor and there are 29 (r1-r30) registers to use.&lt;br /&gt;
&lt;br /&gt;
Data Sheet is located at http://www.ti.com/lit/pdf/spruh73&lt;br /&gt;
&lt;br /&gt;
=== Software examples ===&lt;br /&gt;
BeagleBoard/TI has provided example C programs that utilize the PRU on [https://github.com/beagleboard/am335x_pru_package github.]&lt;br /&gt;
&lt;br /&gt;
These include: PRU_memAccess_DDR_PRUsharedRAM, PRU_memAccessPRUDataRam, PRU_PRUtoPRUInterrupt, and a PRU assembler.&lt;br /&gt;
&lt;br /&gt;
Full assembly guide is located at http://processors.wiki.ti.com/index.php/PRU_Assembly_Reference_Guide&lt;br /&gt;
&lt;br /&gt;
=== Instruction Set ===&lt;br /&gt;
Nearly all instructions (with exception of accessing memory external to PRU) are single-cycle execute (5 ns when running at 200 MHz)&lt;br /&gt;
&lt;br /&gt;
==== Four instruction classes ====&lt;br /&gt;
* Arithmetic&lt;br /&gt;
* Logical&lt;br /&gt;
* Flow Control&lt;br /&gt;
* Register Load/Store&lt;br /&gt;
&lt;br /&gt;
==== Instruction Syntax ====&lt;br /&gt;
* Mnemonic, followed by comma separated parameter list&lt;br /&gt;
* Parameters can be a register, label, immediate value, or constant table entry&lt;br /&gt;
* Example&lt;br /&gt;
** SUB r3, r3, 10 &lt;br /&gt;
** Subtracts immediate value 10 (decimal) from the value in r3 and then places the result in r3&lt;br /&gt;
&lt;br /&gt;
==== Example Assembly ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;INTC_SIR_IRQ/INTC_SIR_FIQ register address&lt;br /&gt;
INTC_SIR_IRQ_ADDR/INTC_SIR_FIQ_ADDR .word 0x48200040/0x48200044&lt;br /&gt;
; ACTIVEIRQ bit field mask to get only the bit field&lt;br /&gt;
ACTIVEIRQ_MASK .equ 0x7F&lt;br /&gt;
_IRQ_ISR/_FIQ_ISR:&lt;br /&gt;
; Save the critical context&lt;br /&gt;
STMFD SP!, {R0-R12, LR} ; Save working registers and the Link register&lt;br /&gt;
MRS R11, SPSR ; Save the SPSR into R11&lt;br /&gt;
; Get the number of the highest priority active IRQ/FIQ&lt;br /&gt;
LDR R10, INTC_SIR_IRQ_ADDR/INTC_SIR_FIQ_ADDR&lt;br /&gt;
LDR R10, [R10] ; Get the INTC_SIR_IRQ/INTC_SIR_FIQ register&lt;br /&gt;
AND R10, R10, #ACTIVEIRQ_MASK ; Apply the mask to get the active IRQ number&lt;br /&gt;
; Jump to relevant subroutine handler&lt;br /&gt;
LDR PC, [PC, R10, lsl #2] ; PC base address points this instruction + 8&lt;br /&gt;
NOP ; To index the table by the PC&lt;br /&gt;
; Table of handler start addresses&lt;br /&gt;
.word IRQ0handler ;For IRQ0 of BANK0&lt;br /&gt;
.word IRQ1handler&lt;br /&gt;
.word IRQ2handler&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/BeagleBone_PRU_Notes</id>
		<title>BeagleBone PRU Notes</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/BeagleBone_PRU_Notes"/>
				<updated>2013-04-25T16:30:30Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: /* Example Assembly */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The goal of this page is to record information that is pertinent to getting started with the BeagleBone's AM335x Programmable Real-time Unit (PRU).&lt;br /&gt;
&lt;br /&gt;
== BeagleBone Programmable Real-time Unit ==&lt;br /&gt;
This is also called the PRU Subsystem (PRUSS) or PRU and Industrial Controller Subsystem (PRU-ICSS). It is optimized to perform embedded tasks that require real-time constraints.&lt;br /&gt;
&lt;br /&gt;
Most important is the purssdrv library to expose functions to the PRU. You can load this library by typing modprobe uio_pruss.&lt;br /&gt;
&lt;br /&gt;
=== PRU capabilities ===&lt;br /&gt;
[[File:PRUSS.png|AM335x PRUSS]]&lt;br /&gt;
&lt;br /&gt;
* The PRU has dual 32-bit RISC cores, shared data and instruction memories and an interrupt controller (INTC).&lt;br /&gt;
* 8KB data memory and 8KB instruction memory&lt;br /&gt;
* 12KB shared RAM&lt;br /&gt;
* A small, deterministic instruction set&lt;br /&gt;
&lt;br /&gt;
There is no pipelining done on the processor and there are 29 (r1-r30) registers to use.&lt;br /&gt;
&lt;br /&gt;
Data Sheet is located at http://www.ti.com/lit/pdf/spruh73&lt;br /&gt;
&lt;br /&gt;
=== Software examples ===&lt;br /&gt;
BeagleBoard/TI has provided example C programs that utilize the PRU on [https://github.com/beagleboard/am335x_pru_package github.]&lt;br /&gt;
&lt;br /&gt;
These include: PRU_memAccess_DDR_PRUsharedRAM, PRU_memAccessPRUDataRam, PRU_PRUtoPRUInterrupt, and a PRU assembler.&lt;br /&gt;
&lt;br /&gt;
Full assembly guide is located at http://processors.wiki.ti.com/index.php/PRU_Assembly_Reference_Guide&lt;br /&gt;
&lt;br /&gt;
=== Instruction Set ===&lt;br /&gt;
Nearly all instructions (with exception of accessing memory external to PRU) are single-cycle execute (5 ns when running at 200 MHz)&lt;br /&gt;
&lt;br /&gt;
==== Four instruction classes ====&lt;br /&gt;
* Arithmetic&lt;br /&gt;
* Logical&lt;br /&gt;
* Flow Control&lt;br /&gt;
* Register Load/Store&lt;br /&gt;
&lt;br /&gt;
==== Instruction Syntax ====&lt;br /&gt;
* Mnemonic, followed by comma separated parameter list&lt;br /&gt;
* Parameters can be a register, label, immediate value, or constant table entry&lt;br /&gt;
* Example&lt;br /&gt;
** SUB r3, r3, 10 &lt;br /&gt;
** Subtracts immediate value 10 (decimal) from the value in r3 and then places the result in r3&lt;br /&gt;
&lt;br /&gt;
==== Example Assembly ====&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
;INTC_SIR_IRQ/INTC_SIR_FIQ register address&lt;br /&gt;
INTC_SIR_IRQ_ADDR/INTC_SIR_FIQ_ADDR .word 0x48200040/0x48200044&lt;br /&gt;
; ACTIVEIRQ bit field mask to get only the bit field&lt;br /&gt;
ACTIVEIRQ_MASK .equ 0x7F&lt;br /&gt;
_IRQ_ISR/_FIQ_ISR:&lt;br /&gt;
; Save the critical context&lt;br /&gt;
STMFD SP!, {R0-R12, LR} ; Save working registers and the Link register&lt;br /&gt;
MRS R11, SPSR ; Save the SPSR into R11&lt;br /&gt;
; Get the number of the highest priority active IRQ/FIQ&lt;br /&gt;
LDR R10, INTC_SIR_IRQ_ADDR/INTC_SIR_FIQ_ADDR&lt;br /&gt;
LDR R10, [R10] ; Get the INTC_SIR_IRQ/INTC_SIR_FIQ register&lt;br /&gt;
AND R10, R10, #ACTIVEIRQ_MASK ; Apply the mask to get the active IRQ number&lt;br /&gt;
; Jump to relevant subroutine handler&lt;br /&gt;
LDR PC, [PC, R10, lsl #2] ; PC base address points this instruction + 8&lt;br /&gt;
NOP ; To index the table by the PC&lt;br /&gt;
; Table of handler start addresses&lt;br /&gt;
.word IRQ0handler ;For IRQ0 of BANK0&lt;br /&gt;
.word IRQ1handler&lt;br /&gt;
.word IRQ2handler&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/BeagleBone_PRU_Notes</id>
		<title>BeagleBone PRU Notes</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/BeagleBone_PRU_Notes"/>
				<updated>2013-04-25T16:28:48Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: /* Example Assembly */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The goal of this page is to record information that is pertinent to getting started with the BeagleBone's AM335x Programmable Real-time Unit (PRU).&lt;br /&gt;
&lt;br /&gt;
== BeagleBone Programmable Real-time Unit ==&lt;br /&gt;
This is also called the PRU Subsystem (PRUSS) or PRU and Industrial Controller Subsystem (PRU-ICSS). It is optimized to perform embedded tasks that require real-time constraints.&lt;br /&gt;
&lt;br /&gt;
Most important is the purssdrv library to expose functions to the PRU. You can load this library by typing modprobe uio_pruss.&lt;br /&gt;
&lt;br /&gt;
=== PRU capabilities ===&lt;br /&gt;
[[File:PRUSS.png|AM335x PRUSS]]&lt;br /&gt;
&lt;br /&gt;
* The PRU has dual 32-bit RISC cores, shared data and instruction memories and an interrupt controller (INTC).&lt;br /&gt;
* 8KB data memory and 8KB instruction memory&lt;br /&gt;
* 12KB shared RAM&lt;br /&gt;
* A small, deterministic instruction set&lt;br /&gt;
&lt;br /&gt;
There is no pipelining done on the processor and there are 29 (r1-r30) registers to use.&lt;br /&gt;
&lt;br /&gt;
Data Sheet is located at http://www.ti.com/lit/pdf/spruh73&lt;br /&gt;
&lt;br /&gt;
=== Software examples ===&lt;br /&gt;
BeagleBoard/TI has provided example C programs that utilize the PRU on [https://github.com/beagleboard/am335x_pru_package github.]&lt;br /&gt;
&lt;br /&gt;
These include: PRU_memAccess_DDR_PRUsharedRAM, PRU_memAccessPRUDataRam, PRU_PRUtoPRUInterrupt, and a PRU assembler.&lt;br /&gt;
&lt;br /&gt;
Full assembly guide is located at http://processors.wiki.ti.com/index.php/PRU_Assembly_Reference_Guide&lt;br /&gt;
&lt;br /&gt;
=== Instruction Set ===&lt;br /&gt;
Nearly all instructions (with exception of accessing memory external to PRU) are single-cycle execute (5 ns when running at 200 MHz)&lt;br /&gt;
&lt;br /&gt;
==== Four instruction classes ====&lt;br /&gt;
* Arithmetic&lt;br /&gt;
* Logical&lt;br /&gt;
* Flow Control&lt;br /&gt;
* Register Load/Store&lt;br /&gt;
&lt;br /&gt;
==== Instruction Syntax ====&lt;br /&gt;
* Mnemonic, followed by comma separated parameter list&lt;br /&gt;
* Parameters can be a register, label, immediate value, or constant table entry&lt;br /&gt;
* Example&lt;br /&gt;
** SUB r3, r3, 10 &lt;br /&gt;
** Subtracts immediate value 10 (decimal) from the value in r3 and then places the result in r3&lt;br /&gt;
&lt;br /&gt;
==== Example Assembly ====&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
;INTC_SIR_IRQ/INTC_SIR_FIQ register address&lt;br /&gt;
INTC_SIR_IRQ_ADDR/INTC_SIR_FIQ_ADDR .word 0x48200040/0x48200044&lt;br /&gt;
; ACTIVEIRQ bit field mask to get only the bit field&lt;br /&gt;
ACTIVEIRQ_MASK .equ 0x7F&lt;br /&gt;
_IRQ_ISR/_FIQ_ISR:&lt;br /&gt;
; Save the critical context&lt;br /&gt;
STMFD SP!, {R0-R12, LR} ; Save working registers and the Link register&lt;br /&gt;
MRS R11, SPSR ; Save the SPSR into R11&lt;br /&gt;
; Get the number of the highest priority active IRQ/FIQ&lt;br /&gt;
LDR R10, INTC_SIR_IRQ_ADDR/INTC_SIR_FIQ_ADDR&lt;br /&gt;
LDR R10, [R10] ; Get the INTC_SIR_IRQ/INTC_SIR_FIQ register&lt;br /&gt;
AND R10, R10, #ACTIVEIRQ_MASK ; Apply the mask to get the active IRQ number&lt;br /&gt;
; Jump to relevant subroutine handler&lt;br /&gt;
LDR PC, [PC, R10, lsl #2] ; PC base address points this instruction + 8&lt;br /&gt;
NOP ; To index the table by the PC&lt;br /&gt;
; Table of handler start addresses&lt;br /&gt;
.word IRQ0handler ;For IRQ0 of BANK0&lt;br /&gt;
.word IRQ1handler&lt;br /&gt;
.word IRQ2handler&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/BeagleBone_PRU_Notes</id>
		<title>BeagleBone PRU Notes</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/BeagleBone_PRU_Notes"/>
				<updated>2013-04-25T16:28:24Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: Added example assembly&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The goal of this page is to record information that is pertinent to getting started with the BeagleBone's AM335x Programmable Real-time Unit (PRU).&lt;br /&gt;
&lt;br /&gt;
== BeagleBone Programmable Real-time Unit ==&lt;br /&gt;
This is also called the PRU Subsystem (PRUSS) or PRU and Industrial Controller Subsystem (PRU-ICSS). It is optimized to perform embedded tasks that require real-time constraints.&lt;br /&gt;
&lt;br /&gt;
Most important is the purssdrv library to expose functions to the PRU. You can load this library by typing modprobe uio_pruss.&lt;br /&gt;
&lt;br /&gt;
=== PRU capabilities ===&lt;br /&gt;
[[File:PRUSS.png|AM335x PRUSS]]&lt;br /&gt;
&lt;br /&gt;
* The PRU has dual 32-bit RISC cores, shared data and instruction memories and an interrupt controller (INTC).&lt;br /&gt;
* 8KB data memory and 8KB instruction memory&lt;br /&gt;
* 12KB shared RAM&lt;br /&gt;
* A small, deterministic instruction set&lt;br /&gt;
&lt;br /&gt;
There is no pipelining done on the processor and there are 29 (r1-r30) registers to use.&lt;br /&gt;
&lt;br /&gt;
Data Sheet is located at http://www.ti.com/lit/pdf/spruh73&lt;br /&gt;
&lt;br /&gt;
=== Software examples ===&lt;br /&gt;
BeagleBoard/TI has provided example C programs that utilize the PRU on [https://github.com/beagleboard/am335x_pru_package github.]&lt;br /&gt;
&lt;br /&gt;
These include: PRU_memAccess_DDR_PRUsharedRAM, PRU_memAccessPRUDataRam, PRU_PRUtoPRUInterrupt, and a PRU assembler.&lt;br /&gt;
&lt;br /&gt;
Full assembly guide is located at http://processors.wiki.ti.com/index.php/PRU_Assembly_Reference_Guide&lt;br /&gt;
&lt;br /&gt;
=== Instruction Set ===&lt;br /&gt;
Nearly all instructions (with exception of accessing memory external to PRU) are single-cycle execute (5 ns when running at 200 MHz)&lt;br /&gt;
&lt;br /&gt;
==== Four instruction classes ====&lt;br /&gt;
* Arithmetic&lt;br /&gt;
* Logical&lt;br /&gt;
* Flow Control&lt;br /&gt;
* Register Load/Store&lt;br /&gt;
&lt;br /&gt;
==== Instruction Syntax ====&lt;br /&gt;
* Mnemonic, followed by comma separated parameter list&lt;br /&gt;
* Parameters can be a register, label, immediate value, or constant table entry&lt;br /&gt;
* Example&lt;br /&gt;
** SUB r3, r3, 10 &lt;br /&gt;
** Subtracts immediate value 10 (decimal) from the value in r3 and then places the result in r3&lt;br /&gt;
&lt;br /&gt;
==== Example Assembly ====&lt;br /&gt;
;INTC_SIR_IRQ/INTC_SIR_FIQ register address&lt;br /&gt;
INTC_SIR_IRQ_ADDR/INTC_SIR_FIQ_ADDR .word 0x48200040/0x48200044&lt;br /&gt;
; ACTIVEIRQ bit field mask to get only the bit field&lt;br /&gt;
ACTIVEIRQ_MASK .equ 0x7F&lt;br /&gt;
_IRQ_ISR/_FIQ_ISR:&lt;br /&gt;
; Save the critical context&lt;br /&gt;
STMFD SP!, {R0-R12, LR} ; Save working registers and the Link register&lt;br /&gt;
MRS R11, SPSR ; Save the SPSR into R11&lt;br /&gt;
; Get the number of the highest priority active IRQ/FIQ&lt;br /&gt;
LDR R10, INTC_SIR_IRQ_ADDR/INTC_SIR_FIQ_ADDR&lt;br /&gt;
LDR R10, [R10] ; Get the INTC_SIR_IRQ/INTC_SIR_FIQ register&lt;br /&gt;
AND R10, R10, #ACTIVEIRQ_MASK ; Apply the mask to get the active IRQ number&lt;br /&gt;
; Jump to relevant subroutine handler&lt;br /&gt;
LDR PC, [PC, R10, lsl #2] ; PC base address points this instruction + 8&lt;br /&gt;
NOP ; To index the table by the PC&lt;br /&gt;
; Table of handler start addresses&lt;br /&gt;
.word IRQ0handler ;For IRQ0 of BANK0&lt;br /&gt;
.word IRQ1handler&lt;br /&gt;
.word IRQ2handler&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/BeagleBone_PRU_Notes</id>
		<title>BeagleBone PRU Notes</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/BeagleBone_PRU_Notes"/>
				<updated>2013-04-25T16:24:31Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: Added link to assembly guide&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The goal of this page is to record information that is pertinent to getting started with the BeagleBone's AM335x Programmable Real-time Unit (PRU).&lt;br /&gt;
&lt;br /&gt;
== BeagleBone Programmable Real-time Unit ==&lt;br /&gt;
This is also called the PRU Subsystem (PRUSS) or PRU and Industrial Controller Subsystem (PRU-ICSS). It is optimized to perform embedded tasks that require real-time constraints.&lt;br /&gt;
&lt;br /&gt;
Most important is the purssdrv library to expose functions to the PRU. You can load this library by typing modprobe uio_pruss.&lt;br /&gt;
&lt;br /&gt;
=== PRU capabilities ===&lt;br /&gt;
[[File:PRUSS.png|AM335x PRUSS]]&lt;br /&gt;
&lt;br /&gt;
* The PRU has dual 32-bit RISC cores, shared data and instruction memories and an interrupt controller (INTC).&lt;br /&gt;
* 8KB data memory and 8KB instruction memory&lt;br /&gt;
* 12KB shared RAM&lt;br /&gt;
* A small, deterministic instruction set&lt;br /&gt;
&lt;br /&gt;
There is no pipelining done on the processor and there are 29 (r1-r30) registers to use.&lt;br /&gt;
&lt;br /&gt;
Data Sheet is located at http://www.ti.com/lit/pdf/spruh73&lt;br /&gt;
&lt;br /&gt;
=== Software examples ===&lt;br /&gt;
BeagleBoard/TI has provided example C programs that utilize the PRU on [https://github.com/beagleboard/am335x_pru_package github.]&lt;br /&gt;
&lt;br /&gt;
These include: PRU_memAccess_DDR_PRUsharedRAM, PRU_memAccessPRUDataRam, PRU_PRUtoPRUInterrupt, and a PRU assembler.&lt;br /&gt;
&lt;br /&gt;
Full assembly guide is located at http://processors.wiki.ti.com/index.php/PRU_Assembly_Reference_Guide&lt;br /&gt;
&lt;br /&gt;
=== Instruction Set ===&lt;br /&gt;
Nearly all instructions (with exception of accessing memory external to PRU) are single-cycle execute (5 ns when running at 200 MHz)&lt;br /&gt;
&lt;br /&gt;
==== Four instruction classes ====&lt;br /&gt;
* Arithmetic&lt;br /&gt;
* Logical&lt;br /&gt;
* Flow Control&lt;br /&gt;
* Register Load/Store&lt;br /&gt;
&lt;br /&gt;
==== Instruction Syntax ====&lt;br /&gt;
* Mnemonic, followed by comma separated parameter list&lt;br /&gt;
* Parameters can be a register, label, immediate value, or constant table entry&lt;br /&gt;
* Example&lt;br /&gt;
** SUB r3, r3, 10 &lt;br /&gt;
** Subtracts immediate value 10 (decimal) from the value in r3 and then places the result in r3&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/BeagleBone_PRU_Notes</id>
		<title>BeagleBone PRU Notes</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/BeagleBone_PRU_Notes"/>
				<updated>2013-04-25T16:15:58Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: Added data sheet link.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The goal of this page is to record information that is pertinent to getting started with the BeagleBone's AM335x Programmable Real-time Unit (PRU).&lt;br /&gt;
&lt;br /&gt;
== BeagleBone Programmable Real-time Unit ==&lt;br /&gt;
This is also called the PRU Subsystem (PRUSS) or PRU and Industrial Controller Subsystem (PRU-ICSS). It is optimized to perform embedded tasks that require real-time constraints.&lt;br /&gt;
&lt;br /&gt;
Most important is the purssdrv library to expose functions to the PRU. You can load this library by typing modprobe uio_pruss.&lt;br /&gt;
&lt;br /&gt;
=== PRU capabilities ===&lt;br /&gt;
[[File:PRUSS.png|AM335x PRUSS]]&lt;br /&gt;
&lt;br /&gt;
* The PRU has dual 32-bit RISC cores, shared data and instruction memories and an interrupt controller (INTC).&lt;br /&gt;
* 8KB data memory and 8KB instruction memory&lt;br /&gt;
* 12KB shared RAM&lt;br /&gt;
* A small, deterministic instruction set&lt;br /&gt;
&lt;br /&gt;
There is no pipelining done on the processor and there are 29 (r1-r30) registers to use.&lt;br /&gt;
&lt;br /&gt;
Data Sheet is located at http://www.ti.com/lit/pdf/spruh73&lt;br /&gt;
&lt;br /&gt;
=== Software examples ===&lt;br /&gt;
BeagleBoard/TI has provided example C programs that utilize the PRU on [https://github.com/beagleboard/am335x_pru_package github.]&lt;br /&gt;
&lt;br /&gt;
These include: PRU_memAccess_DDR_PRUsharedRAM, PRU_memAccessPRUDataRam, PRU_PRUtoPRUInterrupt, and a PRU assembler.&lt;br /&gt;
&lt;br /&gt;
=== Instruction Set ===&lt;br /&gt;
Nearly all instructions (with exception of accessing memory external to PRU) are single-cycle execute (5 ns when running at 200 MHz)&lt;br /&gt;
&lt;br /&gt;
==== Four instruction classes ====&lt;br /&gt;
* Arithmetic&lt;br /&gt;
* Logical&lt;br /&gt;
* Flow Control&lt;br /&gt;
* Register Load/Store&lt;br /&gt;
&lt;br /&gt;
==== Instruction Syntax ====&lt;br /&gt;
* Mnemonic, followed by comma separated parameter list&lt;br /&gt;
* Parameters can be a register, label, immediate value, or constant table entry&lt;br /&gt;
* Example&lt;br /&gt;
** SUB r3, r3, 10 &lt;br /&gt;
** Subtracts immediate value 10 (decimal) from the value in r3 and then places the result in r3&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/BeagleBone_PRU_Notes</id>
		<title>BeagleBone PRU Notes</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/BeagleBone_PRU_Notes"/>
				<updated>2013-04-18T13:18:45Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The goal of this page is to record information that is pertinent to getting started with the BeagleBone's AM335x Programmable Real-time Unit (PRU).&lt;br /&gt;
&lt;br /&gt;
== BeagleBone Programmable Real-time Unit ==&lt;br /&gt;
This is also called the PRU Subsystem (PRUSS) or PRU and Industrial Controller Subsystem (PRU-ICSS). It is optimized to perform embedded tasks that require real-time constraints.&lt;br /&gt;
&lt;br /&gt;
Most important is the purssdrv library to expose functions to the PRU. You can load this library by typing modprobe uio_pruss.&lt;br /&gt;
&lt;br /&gt;
=== PRU capabilities ===&lt;br /&gt;
[[File:PRUSS.png|AM335x PRUSS]]&lt;br /&gt;
&lt;br /&gt;
* The PRU has dual 32-bit RISC cores, shared data and instruction memories and an interrupt controller (INTC).&lt;br /&gt;
* 8KB data memory and 8KB instruction memory&lt;br /&gt;
* 12KB shared RAM&lt;br /&gt;
* A small, deterministic instruction set&lt;br /&gt;
&lt;br /&gt;
There is no pipelining done on the processor and there are 29 (r1-r30) registers to use.&lt;br /&gt;
&lt;br /&gt;
=== Software examples ===&lt;br /&gt;
BeagleBoard/TI has provided example C programs that utilize the PRU on [https://github.com/beagleboard/am335x_pru_package github.]&lt;br /&gt;
&lt;br /&gt;
These include: PRU_memAccess_DDR_PRUsharedRAM, PRU_memAccessPRUDataRam, PRU_PRUtoPRUInterrupt, and a PRU assembler.&lt;br /&gt;
&lt;br /&gt;
=== Instruction Set ===&lt;br /&gt;
Nearly all instructions (with exception of accessing memory external to PRU) are single-cycle execute (5 ns when running at 200 MHz)&lt;br /&gt;
&lt;br /&gt;
==== Four instruction classes ====&lt;br /&gt;
* Arithmetic&lt;br /&gt;
* Logical&lt;br /&gt;
* Flow Control&lt;br /&gt;
* Register Load/Store&lt;br /&gt;
&lt;br /&gt;
==== Instruction Syntax ====&lt;br /&gt;
* Mnemonic, followed by comma separated parameter list&lt;br /&gt;
* Parameters can be a register, label, immediate value, or constant table entry&lt;br /&gt;
* Example&lt;br /&gt;
** SUB r3, r3, 10 &lt;br /&gt;
** Subtracts immediate value 10 (decimal) from the value in r3 and then places the result in r3&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/BeagleBone_PRU_Notes</id>
		<title>BeagleBone PRU Notes</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/BeagleBone_PRU_Notes"/>
				<updated>2013-04-18T12:04:37Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The goal of this page is to record information that is pertinent to getting started with the BeagleBone's AM335x Programmable Real-time Unit (PRU).&lt;br /&gt;
&lt;br /&gt;
== BeagleBone Programmable Real-time Unit ==&lt;br /&gt;
This is also called the PRU Subsystem (PRUSS) or PRU and Industrial Controller Subsystem (PRU-ICSS). It is optimized to perform embedded tasks that require real-time constraints.&lt;br /&gt;
&lt;br /&gt;
Most important is the purssdrv library to expose functions to the PRU. You can load this library by typing modprobe uio_pruss.&lt;br /&gt;
&lt;br /&gt;
=== PRU capabilities ===&lt;br /&gt;
[[File:PRUSS.png|AM335x PRUSS]]&lt;br /&gt;
&lt;br /&gt;
* The PRU has dual 32-bit RISC cores, shared data and instruction memories and an interrupt controller (INTC).&lt;br /&gt;
* 8KB data memory and 8KB instruction memory&lt;br /&gt;
* 12KB shared RAM&lt;br /&gt;
* A small, deterministic instruction set&lt;br /&gt;
&lt;br /&gt;
There is no pipelining done on the processor and there are 29 (r1-r30) registers to use.&lt;br /&gt;
&lt;br /&gt;
=== Software examples ===&lt;br /&gt;
BeagleBoard/TI has provided example C programs that utilize the PRU on [https://github.com/beagleboard/am335x_pru_package github.]&lt;br /&gt;
&lt;br /&gt;
These include: PRU_memAccess_DDR_PRUsharedRAM, PRU_memAccessPRUDataRam, PRU_PRUtoPRUInterrupt, and a PRU assembler.&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/BeagleBone_PRU_Notes</id>
		<title>BeagleBone PRU Notes</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/BeagleBone_PRU_Notes"/>
				<updated>2013-04-18T12:03:53Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The goal of this page is to record information that is pertinent to getting started with the BeagleBone's AM335x Programmable Real-time Unit (PRU).&lt;br /&gt;
&lt;br /&gt;
== BeagleBone PRU ==&lt;br /&gt;
This is also called the PRU Subsystem (PRUSS) or PRU and Industrial Controller Subsystem (PRU-ICSS). It is optimized to perform embedded tasks that require real-time constraints.&lt;br /&gt;
&lt;br /&gt;
Most important is the purssdrv library to expose functions to the PRU. You can load this library by typing modprobe uio_pruss.&lt;br /&gt;
&lt;br /&gt;
=== PRU capabilities ===&lt;br /&gt;
[[File:PRUSS.png|AM335x PRUSS]]&lt;br /&gt;
&lt;br /&gt;
* The PRU has dual 32-bit RISC cores, shared data and instruction memories and an interrupt controller (INTC).&lt;br /&gt;
* 8KB data memory and 8KB instruction memory&lt;br /&gt;
* 12KB shared RAM&lt;br /&gt;
* A small, deterministic instruction set&lt;br /&gt;
&lt;br /&gt;
There is no pipelining done on the processor and there are 29 (r1-r30) registers to use.&lt;br /&gt;
&lt;br /&gt;
=== Software examples ===&lt;br /&gt;
BeagleBoard/TI has provided example C programs that utilize the PRU on [https://github.com/beagleboard/am335x_pru_package github.]&lt;br /&gt;
&lt;br /&gt;
These include: PRU_memAccess_DDR_PRUsharedRAM, PRU_memAccessPRUDataRam, PRU_PRUtoPRUInterrupt, and a PRU assembler.&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/BeagleBone_PRU_Notes</id>
		<title>BeagleBone PRU Notes</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/BeagleBone_PRU_Notes"/>
				<updated>2013-04-18T12:01:41Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== BeagleBone PRU ==&lt;br /&gt;
The goal of this page is to record information that is pertinent to getting started with the BeagleBone's AM335x Programmable Real-time Unit (PRU).&lt;br /&gt;
&lt;br /&gt;
This is also called the PRU Subsystem (PRUSS) or PRU and Industrial Controller Subsystem (PRU-ICSS). It is optimized to perform embedded tasks that require real-time constraints.&lt;br /&gt;
&lt;br /&gt;
Most important is the purssdrv library to expose functions to the PRU. You can load this library by typing modprobe uio_pruss.&lt;br /&gt;
&lt;br /&gt;
=== PRU capabilities ===&lt;br /&gt;
[[File:PRUSS.png|AM335x PRUSS]]&lt;br /&gt;
&lt;br /&gt;
* The PRU has dual 32-bit RISC cores, shared data and instruction memories and an interrupt controller (INTC).&lt;br /&gt;
* 8KB data memory and 8KB instruction memory&lt;br /&gt;
* 12KB shared RAM&lt;br /&gt;
* A small, deterministic instruction set&lt;br /&gt;
&lt;br /&gt;
There is no pipelining done on the processor and there are 29 (r1-r30) registers to use.&lt;br /&gt;
&lt;br /&gt;
=== Software examples ===&lt;br /&gt;
BeagleBoard/TI has provided example C programs that utilize the PRU on [https://github.com/beagleboard/am335x_pru_package github.]&lt;br /&gt;
&lt;br /&gt;
These include: PRU_memAccess_DDR_PRUsharedRAM, PRU_memAccessPRUDataRam, PRU_PRUtoPRUInterrupt, and a PRU assembler.&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/BeagleBone_PRU_Notes</id>
		<title>BeagleBone PRU Notes</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/BeagleBone_PRU_Notes"/>
				<updated>2013-04-18T12:00:43Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== BeagleBone PRU ==&lt;br /&gt;
The goal of this page is to record information that is pertinent to getting started with the BeagleBone's AM335x Programmable Real-time Unit (PRU).&lt;br /&gt;
&lt;br /&gt;
This is also called the PRU Subsystem (PRUSS) or PRU and Industrial Controller Subsystem (PRU-ICSS). It is optimized to perform embedded tasks that require real-time constraints.&lt;br /&gt;
&lt;br /&gt;
Most important is the purssdrv library to expose functions to the PRU. You can load this library by typing modprobe uio_pruss.&lt;br /&gt;
&lt;br /&gt;
=== PRU capabilities ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:PRUSS.png|AM335x PRUSS&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* The PRU has dual 32-bit RISC cores, shared data and instruction memories and an interrupt controller (INTC).&lt;br /&gt;
* 8KB data memory and 8KB instruction memory&lt;br /&gt;
* 12KB shared RAM&lt;br /&gt;
* A small, deterministic instruction set&lt;br /&gt;
&lt;br /&gt;
There is no pipelining done on the processor and there are 29 (r1-r30) registers to use.&lt;br /&gt;
&lt;br /&gt;
=== Software examples ===&lt;br /&gt;
BeagleBoard/TI has provided example C programs that utilize the PRU on [https://github.com/beagleboard/am335x_pru_package github.]&lt;br /&gt;
&lt;br /&gt;
These include: PRU_memAccess_DDR_PRUsharedRAM, PRU_memAccessPRUDataRam, PRU_PRUtoPRUInterrupt, and a PRU assembler.&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/File:PRUSS.png</id>
		<title>File:PRUSS.png</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/File:PRUSS.png"/>
				<updated>2013-04-18T12:00:20Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: AM335x PRU Diagram&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;AM335x PRU Diagram&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/BeagleBone_PRU_Notes</id>
		<title>BeagleBone PRU Notes</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/BeagleBone_PRU_Notes"/>
				<updated>2013-04-18T11:58:23Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== BeagleBone PRU ==&lt;br /&gt;
The goal of this page is to record information that is pertinent to getting started with the BeagleBone's AM335x Programmable Real-time Unit (PRU).&lt;br /&gt;
&lt;br /&gt;
This is also called the PRU Subsystem (PRUSS) or PRU and Industrial Controller Subsystem (PRU-ICSS). It is optimized to perform embedded tasks that require real-time constraints.&lt;br /&gt;
&lt;br /&gt;
Most important is the purssdrv library to expose functions to the PRU. You can load this library by typing modprobe uio_pruss.&lt;br /&gt;
&lt;br /&gt;
=== PRU capabilities ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:http://i.imgur.com/vgOiatO.png|AM335x PRUSS&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* The PRU has dual 32-bit RISC cores, shared data and instruction memories and an interrupt controller (INTC).&lt;br /&gt;
* 8KB data memory and 8KB instruction memory&lt;br /&gt;
* 12KB shared RAM&lt;br /&gt;
* A small, deterministic instruction set&lt;br /&gt;
&lt;br /&gt;
There is no pipelining done on the processor and there are 29 (r1-r30) registers to use.&lt;br /&gt;
&lt;br /&gt;
=== Software examples ===&lt;br /&gt;
BeagleBoard/TI has provided example C programs that utilize the PRU on [https://github.com/beagleboard/am335x_pru_package github.]&lt;br /&gt;
&lt;br /&gt;
These include: PRU_memAccess_DDR_PRUsharedRAM, PRU_memAccessPRUDataRam, PRU_PRUtoPRUInterrupt, and a PRU assembler.&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/BeagleBone_PRU_Notes</id>
		<title>BeagleBone PRU Notes</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/BeagleBone_PRU_Notes"/>
				<updated>2013-04-18T11:48:22Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: Created page with &amp;quot;== BeagleBone PRU == The goal of this page is to record information that is pertinent to getting started with the BeagleBone's AM335x Programmable Real-time Unit (PRU). This i...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== BeagleBone PRU ==&lt;br /&gt;
The goal of this page is to record information that is pertinent to getting started with the BeagleBone's AM335x Programmable Real-time Unit (PRU).&lt;br /&gt;
This is also called the PRU Subsystem (PRUSS) or PRU and Industrial Controller Subsystem (PRU-ICSS). It is optimized to perform embedded tasks that require real-time constraints.&lt;br /&gt;
Most important is the purssdrv library to expose functions to the PRU. You can load this library by typing modprobe uio_pruss.&lt;br /&gt;
&lt;br /&gt;
=== PRU capabilities ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:http://i.imgur.com/vgOiatO.png|AM335x PRUSS&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* The PRU has dual 32-bit RISC cores, shared data and instruction memories and an interrupt controller (INTC).&lt;br /&gt;
* 8KB data memory and 8KB instruction memory&lt;br /&gt;
* 12KB shared RAM&lt;br /&gt;
* A small, deterministic instruction set&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE497_SPI_Project</id>
		<title>ECE497 SPI Project</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE497_SPI_Project"/>
				<updated>2012-11-08T20:39:25Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: /* Installation Instructions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECE497 |Project]]&lt;br /&gt;
Team members: [[user:Richarsm|Sean Richardson]], [[user:larmorgs|Greg Larmore]]&lt;br /&gt;
&lt;br /&gt;
== Grading Template ==&lt;br /&gt;
I'm using the following template to grade.  Each slot is 10 points.&lt;br /&gt;
0 = Missing, 5=OK, 10=Wow!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
05 Executive Summary (Good start)&lt;br /&gt;
02 Installation Instructions &lt;br /&gt;
00 User Instructions (Missing)&lt;br /&gt;
00 Highlights (Missing)&lt;br /&gt;
00 Theory of Operation (Missing)&lt;br /&gt;
00 Work Breakdown&lt;br /&gt;
00 Future Work&lt;br /&gt;
00 Conclusions&lt;br /&gt;
00 Demo&lt;br /&gt;
00 Late&lt;br /&gt;
Comments: I'm looking forward to seeing this.&lt;br /&gt;
&lt;br /&gt;
Score:  07/100&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Executive Summary ==&lt;br /&gt;
&lt;br /&gt;
For this project we want to further improve documentation available for SPI with the Beagle Bone. In the process of our information gathering we will connect two different products that use SPI, one being an SPI radio interface and the other being a SPI LED strand.&lt;br /&gt;
&lt;br /&gt;
So far there exists documentation for the [http://elinux.org/BeagleBoard/SPI BeagleBoard/SPI]. There also exists other documentation regarding the SPI specifications.&lt;br /&gt;
&lt;br /&gt;
The documentation is lacking for the current Beagle Bone platform interfacing with SPI. Additionally there exists virtually no documentation for using a Beagle device with the LPD8806 LED controller.&lt;br /&gt;
&lt;br /&gt;
In conclusion this project should help the Beagle community in general with information sharing and usable research.&lt;br /&gt;
&lt;br /&gt;
== Installation Instructions ==&lt;br /&gt;
&lt;br /&gt;
The kernel driver for SPI is installed in the A6A version of the beagle bone.&lt;br /&gt;
&lt;br /&gt;
We have integrated some code to work with a SPI radio device &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;(What radio device?)&amp;lt;/span&amp;gt;. The code is located at [https://github.com/larmorgs/ece497/tree/master/Project github].&lt;br /&gt;
&lt;br /&gt;
To get started hook up pins 30 (D12) and 31 (A13) to SPI Data (sometimes referred to as Master) and SPI clock. &lt;br /&gt;
&lt;br /&gt;
[[File:Bone_P9_pinout.jpg]]&lt;br /&gt;
&lt;br /&gt;
Then echo 0 into both:&lt;br /&gt;
 beagle$ '''echo 0 &amp;gt; /sys/kernel/debug/omap_mux/spi0_d1'''&lt;br /&gt;
 beagle$ '''echo 0 &amp;gt; /sys/kernel/debug/omap_mux/spi0_sclk''' &lt;br /&gt;
&lt;br /&gt;
to select the pin mux for SPI.&lt;br /&gt;
&lt;br /&gt;
== Work Breakdown ==&lt;br /&gt;
&lt;br /&gt;
So far we have done research on how Linux interfaces with SPI and we have integrated the SPI interface with current code that we have for an SPI radio. We also have explored methods of interfacing the SPI LED strip with a user to create a pleasant experience, such as creating a website to change the colors, or adding a possible twitter reader that would change the lights based on tweets.&lt;br /&gt;
&lt;br /&gt;
== Future Work ==&lt;br /&gt;
&lt;br /&gt;
We want to develop a driver that will interface with SPI and potentially create a sysfs userspace utility for the LED strip.&lt;br /&gt;
&lt;br /&gt;
== Conclusions ==&lt;br /&gt;
&lt;br /&gt;
The SPI interface is not well developed in Linux and can use some work progressing it. We have taken on the task of getting these two devices to work in an easier manner.&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE497_SPI_Project</id>
		<title>ECE497 SPI Project</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE497_SPI_Project"/>
				<updated>2012-11-08T20:08:27Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: /* Installation Instructions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECE497 |Project]]&lt;br /&gt;
Team members: [[user:Richarsm|Sean Richardson]], [[user:larmorgs|Greg Larmore]]&lt;br /&gt;
&lt;br /&gt;
== Grading Template ==&lt;br /&gt;
I'm using the following template to grade.  Each slot is 10 points.&lt;br /&gt;
0 = Missing, 5=OK, 10=Wow!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:red&amp;quot;&amp;gt;&lt;br /&gt;
05 Executive Summary (Good start)&lt;br /&gt;
02 Installation Instructions &lt;br /&gt;
00 User Instructions (Missing)&lt;br /&gt;
00 Highlights (Missing)&lt;br /&gt;
00 Theory of Operation (Missing)&lt;br /&gt;
00 Work Breakdown&lt;br /&gt;
00 Future Work&lt;br /&gt;
00 Conclusions&lt;br /&gt;
00 Demo&lt;br /&gt;
00 Late&lt;br /&gt;
Comments: I'm looking forward to seeing this.&lt;br /&gt;
&lt;br /&gt;
Score:  07/100&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Executive Summary ==&lt;br /&gt;
&lt;br /&gt;
For this project we want to further improve documentation available for SPI with the Beagle Bone. In the process of our information gathering we will connect two different products that use SPI, one being an SPI radio interface and the other being a SPI LED strand.&lt;br /&gt;
&lt;br /&gt;
So far there exists documentation for the [http://elinux.org/BeagleBoard/SPI BeagleBoard/SPI]. There also exists other documentation regarding the SPI specifications.&lt;br /&gt;
&lt;br /&gt;
The documentation is lacking for the current Beagle Bone platform interfacing with SPI. Additionally there exists virtually no documentation for using a Beagle device with the LPD8806 LED controller.&lt;br /&gt;
&lt;br /&gt;
In conclusion this project should help the Beagle community in general with information sharing and usable research.&lt;br /&gt;
&lt;br /&gt;
== Installation Instructions ==&lt;br /&gt;
&lt;br /&gt;
The kernel driver for SPI is installed in the A6A version of the beagle bone.&lt;br /&gt;
&lt;br /&gt;
We have integrated some code to work with a SPI radio device &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;(What radio device?)&amp;lt;/span&amp;gt;. The code is located at [https://github.com/larmorgs/ece497/tree/master/Project github].&lt;br /&gt;
&lt;br /&gt;
To get started hook up pins 30 (D12) and 31 (A13) to SPI Data (sometimes referred to as Master) and SPI clock. &lt;br /&gt;
&lt;br /&gt;
[[File:Bone_P9_pinout.jpg]]&lt;br /&gt;
&lt;br /&gt;
Then echo 0 into both:&lt;br /&gt;
 beagle$ '''echo 0 &amp;gt; /sys/kernel/debug/omap_mux/spi1_d1'''&lt;br /&gt;
 beagle$ '''echo 0 &amp;gt; /sys/kernel/debug/omap_mux/spi1_sclk''' &lt;br /&gt;
&lt;br /&gt;
to select the pin mux for SPI.&lt;br /&gt;
&lt;br /&gt;
== Work Breakdown ==&lt;br /&gt;
&lt;br /&gt;
So far we have done research on how Linux interfaces with SPI and we have integrated the SPI interface with current code that we have for an SPI radio. We also have explored methods of interfacing the SPI LED strip with a user to create a pleasant experience, such as creating a website to change the colors, or adding a possible twitter reader that would change the lights based on tweets.&lt;br /&gt;
&lt;br /&gt;
== Future Work ==&lt;br /&gt;
&lt;br /&gt;
We want to develop a driver that will interface with SPI and potentially create a sysfs userspace utility for the LED strip.&lt;br /&gt;
&lt;br /&gt;
== Conclusions ==&lt;br /&gt;
&lt;br /&gt;
The SPI interface is not well developed in Linux and can use some work progressing it. We have taken on the task of getting these two devices to work in an easier manner.&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/EBC_Exercise_25_Configuring_U-boot</id>
		<title>EBC Exercise 25 Configuring U-boot</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/EBC_Exercise_25_Configuring_U-boot"/>
				<updated>2012-11-08T16:12:10Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: /* Assignment */ spelling&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECE497]]&lt;br /&gt;
[[Category:BeagleBoard]]&lt;br /&gt;
{{YoderHead}}&lt;br /&gt;
&lt;br /&gt;
This follows the approach taken in [[EBC Exercise 13 Configuring the Kernel]].  We'll use '''bitbake''' to get the source files for U-boot and then we'll edit them.&lt;br /&gt;
&lt;br /&gt;
== bitbake ==&lt;br /&gt;
&lt;br /&gt;
When you did [[EBC Exercise 22 Cross-Compiling and Finding the Right Kernel]] u-boot was downloaded and compiled.  If you used the default configure, the source code was removed once it was done.  Check and see:&lt;br /&gt;
&lt;br /&gt;
 host$ '''cd ~/BeagleBoard/oe/build/tmp-angstrom_v2012_05-eglibc/work/beagleboard-angstrom-linux-gnueabi/'''&lt;br /&gt;
 host$ '''ls'''&lt;br /&gt;
&lt;br /&gt;
You should see a directory starting with &amp;lt;code&amp;gt;u-boot-&amp;lt;/code&amp;gt;.  The rest of the name tells what version you have.  Change to that directory and see what's there:&lt;br /&gt;
&lt;br /&gt;
 host$ '''cd u-boot-*'''&lt;br /&gt;
 host$ '''ls'''&lt;br /&gt;
&lt;br /&gt;
If you see a '''git''' directory, you are in luck. If you see just a '''temp''' directory you need to go back to [[EBC Exercise 22 Cross-Compiling and Finding the Right Kernel]] and get it installed.&lt;br /&gt;
&lt;br /&gt;
Once you have the '''git''' directory, ''cd'' to it and look around.&lt;br /&gt;
&lt;br /&gt;
== Compiling U-boot ==&lt;br /&gt;
&lt;br /&gt;
You can now compile U-boot. &lt;br /&gt;
&lt;br /&gt;
 host$ '''source ~/.oe/crossCompileEnv.sh'''&lt;br /&gt;
 host$ '''make'''&lt;br /&gt;
 host$ '''scp u-boot.bin root@beagle:.'''&lt;br /&gt;
&lt;br /&gt;
On the beagle, first be sure the FAT partition is mounted&lt;br /&gt;
 beagle$ '''cd /media/'''&lt;br /&gt;
 beagle$ '''mkdir mmcblk0p1'''&lt;br /&gt;
 beagle$ '''mount /dev/mmcblk0p1 mmcblk0p1/'''&lt;br /&gt;
 beagle$ '''cd mmcblk0p1/'''&lt;br /&gt;
 beagle$ '''ls -ls'''&lt;br /&gt;
 total 354&lt;br /&gt;
   2 drwxr-xr-x 4 root root   2048 May 16 15:29 Docs&lt;br /&gt;
   2 drwxr-xr-x 5 root root   2048 May 16 15:29 Drivers&lt;br /&gt;
   6 -rwxr-xr-x 1 root root   5829 Aug 14 10:10 LICENSE.txt&lt;br /&gt;
  84 -rwxr-xr-x 1 root root  85058 Aug 14 08:19 MLO&lt;br /&gt;
  14 -rwxr-xr-x 1 root root  13976 Aug 14 10:10 README.htm&lt;br /&gt;
   2 -rwxr-xr-x 1 root root     27 Aug 14 10:23 Uenv.txt&lt;br /&gt;
   2 -rwxr-xr-x 1 root root    178 Aug 14 10:10 autorun.inf&lt;br /&gt;
   2 -rwxr-xr-x 1 root root    171 Aug 14 10:10 info.txt&lt;br /&gt;
 238 -rwxr-xr-x 1 root root 241948 Aug 14 08:19 u-boot.img&lt;br /&gt;
   2 -rwxr-xr-x 1 root root     33 Aug 14 10:23 uEnv.txt.orig&lt;br /&gt;
&lt;br /&gt;
Make a backup of the original u-boot.&lt;br /&gt;
 beagle$ '''cp u-boot.bin u-boot.bin.orig'''&lt;br /&gt;
 beagle$ '''cp ~/u-boot.bin .'''&lt;br /&gt;
 beagle$ shutdown -r now&lt;br /&gt;
&lt;br /&gt;
You should now be running the new u-boot.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Assignment&amp;lt;/span&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Modify u-boot to include your initials in the prompt. (Hint:  Look for the '''omap3_beagle.h''' file for the xM or '''am335x_evm.h''' for the bone.)&lt;br /&gt;
# Learn what is done when the '''boot''' command is entered in u-boot.&lt;br /&gt;
# Find where the code for boot is defined in the u-boot source.&lt;br /&gt;
&lt;br /&gt;
Hint:&lt;br /&gt;
 u-boot# '''help boot'''&lt;br /&gt;
 boot - boot default, i.e., run 'bootcmd'&lt;br /&gt;
 &lt;br /&gt;
 Usage:&lt;br /&gt;
 boot &lt;br /&gt;
 u-boot# '''print bootcmd'''&lt;br /&gt;
 bootcmd=if mmc rescan ${mmcdev}; then if userbutton; then setenv bootenv user.txt;fi;echo SD/MMC found on device ${mmcdev};if run loadbootenv; then echo Loaded environment from ${bootenv};run importbootenv;fi;if test -n $uenvcmd; then echo Running uenvcmd ...;run uenvcmd;fi;if run loaduimage; then run mmcboot;fi;fi;run nandboot;&lt;br /&gt;
&lt;br /&gt;
{{YoderFoot}}&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE497_Contributions_and_Project_Status</id>
		<title>ECE497 Contributions and Project Status</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE497_Contributions_and_Project_Status"/>
				<updated>2012-11-06T16:51:06Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: /* Project Status */ added contributions for Sean&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECE497 |Contributions]]&lt;br /&gt;
{{YoderHead}}&lt;br /&gt;
&lt;br /&gt;
== Fall 2012 ==&lt;br /&gt;
&lt;br /&gt;
=== Project Status ===&lt;br /&gt;
&lt;br /&gt;
Please edit this page and add your project to this list. Copy my [[ECE497 Project Template]] to your own eLinux page and include the title of your project in the name of the page.  &lt;br /&gt;
&lt;br /&gt;
Please make the list alphabetical by family name.&lt;br /&gt;
&lt;br /&gt;
Take a look at what you and others have contributed.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|- &lt;br /&gt;
! Name&lt;br /&gt;
! Contributions&lt;br /&gt;
! Project&lt;br /&gt;
! git repository&lt;br /&gt;
|-&lt;br /&gt;
| [[User:atniptw | Tom Atnip]]&lt;br /&gt;
| &lt;br /&gt;
| [[ECE497 Beagle VNS | Beagle VNS]]&lt;br /&gt;
| [https://github.com/atniptw/ atniptw]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:larmorgs | Greg Larmore]]&lt;br /&gt;
| &lt;br /&gt;
| [[ECE497 SPI Project | SPI Project]]&lt;br /&gt;
| [https://github.com/larmorgs/ larmorgs]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:jessebrannon | Jesse Brannon]]&lt;br /&gt;
| &lt;br /&gt;
| [[ECE497 Project Rover | Rover]]&lt;br /&gt;
| [https://github.com/brannojs/ brannojs]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Xinyu1991 | Xinyu Cheng]]&lt;br /&gt;
| [[Special:Contributions/Xinyu1991|contrib]]&lt;br /&gt;
| [[ECE497_Project:_Kinect | Kinect]]&lt;br /&gt;
| [https://github.com/xinyu1991/ Xinyu Cheng]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:correlbn | Bryan Correll]]&lt;br /&gt;
| [[Special:Contributions/correlbn|contrib]]&lt;br /&gt;
| [[BeagleBone PRU | BeagleBone PRU]]&lt;br /&gt;
| [https://github.com/correlbn/My-Beagle-Project/ Correlbn]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:draneaw | Alex Drane]]&lt;br /&gt;
| &lt;br /&gt;
| [[ECE497 draneaw Project | My Beagle Project]]&lt;br /&gt;
| [https://github.com/draneaw/My-Beagle-Project draneaw]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:duganje | Josh Dugan]]&lt;br /&gt;
| [[Special:Contributions/duganje|contrib]]&lt;br /&gt;
| [[ECE497 Project: XBee|XBee]]&lt;br /&gt;
| [https://github.com/duganje/ duganje]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Geislekj | Kevin Geisler]]&lt;br /&gt;
| &lt;br /&gt;
| [[ECE497 Beagle VNS | Beagle VNS]]&lt;br /&gt;
| [https://github.com/geislekj/ geislekj]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [[User:chris.good | Christopher A Good]]&lt;br /&gt;
| [[Special:Contributions/Chris.good|contrib]]&lt;br /&gt;
| [[ECE497 Project RoverGUI | RoverGUI]]&lt;br /&gt;
| [https://github.com/goodca/ goodca]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [[User:hansenrl | Ross Hansen]]&lt;br /&gt;
| [[Special:Contributions/hansenrl|contrib]]&lt;br /&gt;
| [[ECE497 Project Rover | Rover]]&lt;br /&gt;
| [https://github.com/hansenrl/ Hansenrl]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [[User:jungeml | Michael Junge]]&lt;br /&gt;
| [[Special:Contributions/jungeml|contrib]]&lt;br /&gt;
| [[ECE497 Project Rover | Rover]]&lt;br /&gt;
| [https://github.com/jungeml/ Jungeml]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Lix | Xia Li]]&lt;br /&gt;
| [[Special:Contributions/Lix|contrib]]&lt;br /&gt;
| [[ECE497 Lix Project | My Beagle Project]]&lt;br /&gt;
| [https://github.com/1984xiali/ xiali]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:mmoravec | Matthew Moravec]]&lt;br /&gt;
| [[Special:Contributions/mmoravec|contrib]]&lt;br /&gt;
| [[ECE497 Project: XBee|XBee]]&lt;br /&gt;
| [https://github.com/mmoravec/ mmoravec]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:ngop | Peter Ngo]]&lt;br /&gt;
| &lt;br /&gt;
| [[ECE497 ngop Project: Beaglebone PRU|Beaglebone PRU]]&lt;br /&gt;
| [https://github.com/ngop/ ngop]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[User:shinnsm|Stephen Shinn]]&lt;br /&gt;
| [[Special:Contributions/shinnsm|contrib]]&lt;br /&gt;
| [[ECE497 Project: XBee|XBee]]&lt;br /&gt;
| [https://github.com/shinnsm shinnsm]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Yoder | Mark A. Yoder]]&lt;br /&gt;
| [[Special:Contributions/Yoder | contrib]]&lt;br /&gt;
| [[ECE497 Project Template | My Beagle Project]]&lt;br /&gt;
| [https://github.com/MarkAYoder MarkAYoder]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Popenhjc | James Popenhagen]]&lt;br /&gt;
| &lt;br /&gt;
| [[BeagleBone PRU | BeagleBone PRU]]&lt;br /&gt;
| [https://github.com/popenhjc/ popenhjc]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Whiteer | Elias White]]&lt;br /&gt;
| &lt;br /&gt;
| [[ECE497 SLAM via ROS | My Beagle Project]]&lt;br /&gt;
| [https://github.com/whiteer whiteer]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:ruff | Ruffin White]]&lt;br /&gt;
| &lt;br /&gt;
| [[ECE497 Beagle VNS | Beagle VNS]]&lt;br /&gt;
| [https://github.com/ruffsl/ ruffsl]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Richarsm | Sean Richardson]]&lt;br /&gt;
| [[Special:Contributions/Richarsm|contrib]]&lt;br /&gt;
| [[ECE497 SPI Project | SPI Project]]&lt;br /&gt;
| [https://github.com/seanrich Sean Richardson]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Millerap | Andrew Miller]]&lt;br /&gt;
|&lt;br /&gt;
| [[ECE 497 millerap Project | My Beagle Project]]&lt;br /&gt;
| [https://github.com/millerap millerap]&lt;br /&gt;
|-| &lt;br /&gt;
| [[User:Astroricks | Yue Zhang]]&lt;br /&gt;
| &lt;br /&gt;
| [[ECE497 Yue Zhang Project | My Beagle Project]]&lt;br /&gt;
| [https://github.com/Astroricks/Beagle-Project Yue Zhang]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Lobdeljt | John Lobdell]]&lt;br /&gt;
| &lt;br /&gt;
| [[ECE 497 lobdeljt Project | My Beagle Project]]&lt;br /&gt;
| [https://github.com/jtlobdell jtlobdell]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Winter 2011-2012 ==&lt;br /&gt;
&lt;br /&gt;
=== Contributions ===&lt;br /&gt;
&lt;br /&gt;
# [[Special:Contributions/Yuming | Yuming Cao]]&lt;br /&gt;
# [[Special:Contributions/Yifei | Yifei Li]]&lt;br /&gt;
# [[Special:Contributions/Harrisgw | Greg Harrison]]&lt;br /&gt;
# [[Special:Contributions/mac | Jack Ma]]&lt;br /&gt;
# [[Special:Contributions/Gemini91 | Guanqun Wang]]&lt;br /&gt;
# [[Special:Contributions/Yanj | Mona Yan]]&lt;br /&gt;
# [[Special:Contributions/Yoder | Mark A. Yoder]]&lt;br /&gt;
# [[Special:Contributions/Yuhasmj | Michael Yuhas]]&lt;br /&gt;
# [[Special:Contributions/Ziyi Zhang | Ziyi Zhang]]&lt;br /&gt;
# [[Special:Contributions/Zitnikdj | David Zitnik]]&lt;br /&gt;
# [[Special:Contributions/Zitnikdj | Alex Drane]]&lt;br /&gt;
# [[Special:Contributions/jessebrannon | Jesse Brannon]]&lt;br /&gt;
# [[Special:Contributions/larmorgs | Greg Larmore]]&lt;br /&gt;
# [[Special:Contributions/jungeml | Michael Junge]]&lt;br /&gt;
# [[Special:Contributions/millerap | Andrew Miller]]&lt;br /&gt;
# [[Special:Contributions/correlbn | Bryan Correll]]&lt;br /&gt;
&lt;br /&gt;
=== Project Status ===&lt;br /&gt;
&lt;br /&gt;
# [[User:Yoder | Mark A. Yoder]], [[ECE497 Project Template | My Beagle Project]]&lt;br /&gt;
# [[user:Yanj|Mona Yan]] and [[user:Harrisgw| Greg Harrison]], [[PS EYE QT PROJECT | Playstation Eye Audio with Qt]]&lt;br /&gt;
# [[user:Caogecym | Yuming Cao]] and [[user:Ziyi Zhang | Ziyi Zhang]], [[Node.js Weather Station]]&lt;br /&gt;
# [[user:Yifei| Yifei Li]] and [[user:Gemini91| Guanqun Wang]], [[ Kinect Project | Play games using Kinect on Beagleboard]]&lt;br /&gt;
# [[user:Yuhasmj| Michael J. Yuhas]] and [[user:mac | Jack Ma]], [[ Multiple Partitions via U-boot | Multiple Partitions via U-boot ]]&lt;br /&gt;
# [[user:Zitnikdj| David Zitnik]], [[ ECE497 Project: Twitter Java Application | Twitter Java Application ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{YoderFoot}}&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE497_Contributions_and_Project_Status</id>
		<title>ECE497 Contributions and Project Status</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE497_Contributions_and_Project_Status"/>
				<updated>2012-11-06T16:49:46Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: /* Project Status */  updated project for Sean and Greg&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECE497 |Contributions]]&lt;br /&gt;
{{YoderHead}}&lt;br /&gt;
&lt;br /&gt;
== Fall 2012 ==&lt;br /&gt;
&lt;br /&gt;
=== Project Status ===&lt;br /&gt;
&lt;br /&gt;
Please edit this page and add your project to this list. Copy my [[ECE497 Project Template]] to your own eLinux page and include the title of your project in the name of the page.  &lt;br /&gt;
&lt;br /&gt;
Please make the list alphabetical by family name.&lt;br /&gt;
&lt;br /&gt;
Take a look at what you and others have contributed.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|- &lt;br /&gt;
! Name&lt;br /&gt;
! Contributions&lt;br /&gt;
! Project&lt;br /&gt;
! git repository&lt;br /&gt;
|-&lt;br /&gt;
| [[User:atniptw | Tom Atnip]]&lt;br /&gt;
| &lt;br /&gt;
| [[ECE497 Beagle VNS | Beagle VNS]]&lt;br /&gt;
| [https://github.com/atniptw/ atniptw]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:larmorgs | Greg Larmore]]&lt;br /&gt;
| &lt;br /&gt;
| [[ECE497 SPI Project | SPI Project]]&lt;br /&gt;
| [https://github.com/larmorgs/ larmorgs]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:jessebrannon | Jesse Brannon]]&lt;br /&gt;
| &lt;br /&gt;
| [[ECE497 Project Rover | Rover]]&lt;br /&gt;
| [https://github.com/brannojs/ brannojs]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Xinyu1991 | Xinyu Cheng]]&lt;br /&gt;
| [[Special:Contributions/Xinyu1991|contrib]]&lt;br /&gt;
| [[ECE497_Project:_Kinect | Kinect]]&lt;br /&gt;
| [https://github.com/xinyu1991/ Xinyu Cheng]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:correlbn | Bryan Correll]]&lt;br /&gt;
| [[Special:Contributions/correlbn|contrib]]&lt;br /&gt;
| [[BeagleBone PRU | BeagleBone PRU]]&lt;br /&gt;
| [https://github.com/correlbn/My-Beagle-Project/ Correlbn]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:draneaw | Alex Drane]]&lt;br /&gt;
| &lt;br /&gt;
| [[ECE497 draneaw Project | My Beagle Project]]&lt;br /&gt;
| [https://github.com/draneaw/My-Beagle-Project draneaw]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:duganje | Josh Dugan]]&lt;br /&gt;
| [[Special:Contributions/duganje|contrib]]&lt;br /&gt;
| [[ECE497 Project: XBee|XBee]]&lt;br /&gt;
| [https://github.com/duganje/ duganje]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Geislekj | Kevin Geisler]]&lt;br /&gt;
| &lt;br /&gt;
| [[ECE497 Beagle VNS | Beagle VNS]]&lt;br /&gt;
| [https://github.com/geislekj/ geislekj]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [[User:chris.good | Christopher A Good]]&lt;br /&gt;
| [[Special:Contributions/Chris.good|contrib]]&lt;br /&gt;
| [[ECE497 Project RoverGUI | RoverGUI]]&lt;br /&gt;
| [https://github.com/goodca/ goodca]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [[User:hansenrl | Ross Hansen]]&lt;br /&gt;
| [[Special:Contributions/hansenrl|contrib]]&lt;br /&gt;
| [[ECE497 Project Rover | Rover]]&lt;br /&gt;
| [https://github.com/hansenrl/ Hansenrl]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [[User:jungeml | Michael Junge]]&lt;br /&gt;
| [[Special:Contributions/jungeml|contrib]]&lt;br /&gt;
| [[ECE497 Project Rover | Rover]]&lt;br /&gt;
| [https://github.com/jungeml/ Jungeml]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Lix | Xia Li]]&lt;br /&gt;
| [[Special:Contributions/Lix|contrib]]&lt;br /&gt;
| [[ECE497 Lix Project | My Beagle Project]]&lt;br /&gt;
| [https://github.com/1984xiali/ xiali]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:mmoravec | Matthew Moravec]]&lt;br /&gt;
| [[Special:Contributions/mmoravec|contrib]]&lt;br /&gt;
| [[ECE497 Project: XBee|XBee]]&lt;br /&gt;
| [https://github.com/mmoravec/ mmoravec]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:ngop | Peter Ngo]]&lt;br /&gt;
| &lt;br /&gt;
| [[ECE497 ngop Project: Beaglebone PRU|Beaglebone PRU]]&lt;br /&gt;
| [https://github.com/ngop/ ngop]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[User:shinnsm|Stephen Shinn]]&lt;br /&gt;
| [[Special:Contributions/shinnsm|contrib]]&lt;br /&gt;
| [[ECE497 Project: XBee|XBee]]&lt;br /&gt;
| [https://github.com/shinnsm shinnsm]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Yoder | Mark A. Yoder]]&lt;br /&gt;
| [[Special:Contributions/Yoder | contrib]]&lt;br /&gt;
| [[ECE497 Project Template | My Beagle Project]]&lt;br /&gt;
| [https://github.com/MarkAYoder MarkAYoder]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Popenhjc | James Popenhagen]]&lt;br /&gt;
| &lt;br /&gt;
| [[BeagleBone PRU | BeagleBone PRU]]&lt;br /&gt;
| [https://github.com/popenhjc/ popenhjc]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Whiteer | Elias White]]&lt;br /&gt;
| &lt;br /&gt;
| [[ECE497 SLAM via ROS | My Beagle Project]]&lt;br /&gt;
| [https://github.com/whiteer whiteer]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:ruff | Ruffin White]]&lt;br /&gt;
| &lt;br /&gt;
| [[ECE497 Beagle VNS | Beagle VNS]]&lt;br /&gt;
| [https://github.com/ruffsl/ ruffsl]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Richarsm | Sean Richardson]]&lt;br /&gt;
| &lt;br /&gt;
| [[ECE497 SPI Project | SPI Project]]&lt;br /&gt;
| [https://github.com/seanrich Sean Richardson]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Millerap | Andrew Miller]]&lt;br /&gt;
|&lt;br /&gt;
| [[ECE 497 millerap Project | My Beagle Project]]&lt;br /&gt;
| [https://github.com/millerap millerap]&lt;br /&gt;
|-| &lt;br /&gt;
| [[User:Astroricks | Yue Zhang]]&lt;br /&gt;
| &lt;br /&gt;
| [[ECE497 Yue Zhang Project | My Beagle Project]]&lt;br /&gt;
| [https://github.com/Astroricks/Beagle-Project Yue Zhang]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Lobdeljt | John Lobdell]]&lt;br /&gt;
| &lt;br /&gt;
| [[ECE 497 lobdeljt Project | My Beagle Project]]&lt;br /&gt;
| [https://github.com/jtlobdell jtlobdell]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Winter 2011-2012 ==&lt;br /&gt;
&lt;br /&gt;
=== Contributions ===&lt;br /&gt;
&lt;br /&gt;
# [[Special:Contributions/Yuming | Yuming Cao]]&lt;br /&gt;
# [[Special:Contributions/Yifei | Yifei Li]]&lt;br /&gt;
# [[Special:Contributions/Harrisgw | Greg Harrison]]&lt;br /&gt;
# [[Special:Contributions/mac | Jack Ma]]&lt;br /&gt;
# [[Special:Contributions/Gemini91 | Guanqun Wang]]&lt;br /&gt;
# [[Special:Contributions/Yanj | Mona Yan]]&lt;br /&gt;
# [[Special:Contributions/Yoder | Mark A. Yoder]]&lt;br /&gt;
# [[Special:Contributions/Yuhasmj | Michael Yuhas]]&lt;br /&gt;
# [[Special:Contributions/Ziyi Zhang | Ziyi Zhang]]&lt;br /&gt;
# [[Special:Contributions/Zitnikdj | David Zitnik]]&lt;br /&gt;
# [[Special:Contributions/Zitnikdj | Alex Drane]]&lt;br /&gt;
# [[Special:Contributions/jessebrannon | Jesse Brannon]]&lt;br /&gt;
# [[Special:Contributions/larmorgs | Greg Larmore]]&lt;br /&gt;
# [[Special:Contributions/jungeml | Michael Junge]]&lt;br /&gt;
# [[Special:Contributions/millerap | Andrew Miller]]&lt;br /&gt;
# [[Special:Contributions/correlbn | Bryan Correll]]&lt;br /&gt;
&lt;br /&gt;
=== Project Status ===&lt;br /&gt;
&lt;br /&gt;
# [[User:Yoder | Mark A. Yoder]], [[ECE497 Project Template | My Beagle Project]]&lt;br /&gt;
# [[user:Yanj|Mona Yan]] and [[user:Harrisgw| Greg Harrison]], [[PS EYE QT PROJECT | Playstation Eye Audio with Qt]]&lt;br /&gt;
# [[user:Caogecym | Yuming Cao]] and [[user:Ziyi Zhang | Ziyi Zhang]], [[Node.js Weather Station]]&lt;br /&gt;
# [[user:Yifei| Yifei Li]] and [[user:Gemini91| Guanqun Wang]], [[ Kinect Project | Play games using Kinect on Beagleboard]]&lt;br /&gt;
# [[user:Yuhasmj| Michael J. Yuhas]] and [[user:mac | Jack Ma]], [[ Multiple Partitions via U-boot | Multiple Partitions via U-boot ]]&lt;br /&gt;
# [[user:Zitnikdj| David Zitnik]], [[ ECE497 Project: Twitter Java Application | Twitter Java Application ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{YoderFoot}}&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/User:Richarsm</id>
		<title>User:Richarsm</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/User:Richarsm"/>
				<updated>2012-11-06T13:49:20Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Student in Embedded Linux ECE467.&lt;br /&gt;
&lt;br /&gt;
I also did [http://elinux.org/Adafruit:_LED_Strip_LPD8806 LED Strip LPD8806]&lt;br /&gt;
&lt;br /&gt;
[[Category:ECE497 |Ur]]&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/User:Richarsm</id>
		<title>User:Richarsm</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/User:Richarsm"/>
				<updated>2012-11-06T13:49:09Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Student in Embedded Linux ECE467.&lt;br /&gt;
&lt;br /&gt;
I also did [http://elinux.org/Adafruit:_LED_Strip_LPD8806 | LED Strip LPD8806]&lt;br /&gt;
&lt;br /&gt;
[[Category:ECE497 |Ur]]&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/User:Richarsm</id>
		<title>User:Richarsm</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/User:Richarsm"/>
				<updated>2012-11-06T13:48:54Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Student in Embedded Linux ECE467.&lt;br /&gt;
I also did [[http://elinux.org/Adafruit:_LED_Strip_LPD8806 | LED Strip LPD8806]]&lt;br /&gt;
&lt;br /&gt;
[[Category:ECE497 |Ur]]&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/User:Richarsm</id>
		<title>User:Richarsm</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/User:Richarsm"/>
				<updated>2012-11-06T13:48:27Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Student in Embedded Linux ECE467.&lt;br /&gt;
I also did [[http://elinux.org/Adafruit:_LED_Strip_LPD8806]]&lt;br /&gt;
&lt;br /&gt;
[[Category:ECE497 |Ur]]&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/User:Richarsm</id>
		<title>User:Richarsm</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/User:Richarsm"/>
				<updated>2012-11-06T13:46:43Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: updated category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Student in Embedded Linux ECE497.&lt;br /&gt;
&lt;br /&gt;
[[Category:ECE497 | Ur]]&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/EBC_Exercise_08_Installing_Development_Tools</id>
		<title>EBC Exercise 08 Installing Development Tools</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/EBC_Exercise_08_Installing_Development_Tools"/>
				<updated>2012-11-05T05:36:53Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: /* reboot */  we should use /dev/ttyUSB1 instead of USB0&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECE497]]&lt;br /&gt;
{{YoderHead}}&lt;br /&gt;
&lt;br /&gt;
Early in the class most of the exercises we will do will all run on the BeagleBoard. You'll be able to edit ([http://projects.gnome.org/gedit/ gedit]), compile ([http://gcc.gnu.org/ gcc]) and run all on the Beagle.  Later, when we start compiling the kernel [http://www.kernel.org/] or the boot loader, ([http://www.denx.de/wiki/U-Boot U-boot]) you will need to cross compile on a Linux machine and copy the results to the Beagle.&lt;br /&gt;
&lt;br /&gt;
The purpose of this exercise is to install all the tools needed for compiling on your host so they will be ready when you need them.&lt;br /&gt;
&lt;br /&gt;
Instructions for building Ångström are given [http://www.angstrom-distribution.org/building-angstrom here]; however there are a few changes you have to make.  Here's what I did.&lt;br /&gt;
&lt;br /&gt;
'''Tip:''' Run this exercise using a wired connection if you can. The Ubuntu wireless driver can be finicky, and if it stops working you'll have to restart some of this.&lt;br /&gt;
&lt;br /&gt;
== The Kernel ==&lt;br /&gt;
&lt;br /&gt;
These instructions have been tested for the 3.2.25 kernel.&lt;br /&gt;
&lt;br /&gt;
=== download ===&lt;br /&gt;
These are notes are based on [https://github.com/beagleboard/kernel/blob/6682025752d0b807119c1e363a0b1b9bfe2ab453/README.md Beagleboard kernel git site].&lt;br /&gt;
&lt;br /&gt;
First download the tools needed to compile the kernel.  This took about 25 seconds.&lt;br /&gt;
 host$ '''sudo apt-get install -y git lzop gcc-arm-linux-gnueabi uboot-mkimage'''&lt;br /&gt;
&lt;br /&gt;
Next download the tools to get the kernel and the patches needed to make it run on the beagle.  (2.5 seconds)&lt;br /&gt;
 host$ '''cd ~/BeagleBoard'''&lt;br /&gt;
 host$ '''git clone git://github.com/beagleboard/kernel.git'''&lt;br /&gt;
 host$ '''git checkout 6a7c4284a16fed3dae87f4aef78b59c902e4da84 -b beaglebone-3.2'''&lt;br /&gt;
&lt;br /&gt;
Next download the kernel and the patches.  Before running '''./patch/sh''', take a look at it.  Can you figure out what it's doing?  Also look at '''patch_script.sh''', it's where the details are. The downloading/patching process takes some 39 minutes.&lt;br /&gt;
 host$ '''less patch.sh patch_script.sh'''&lt;br /&gt;
 host$ '''./patch.sh'''&lt;br /&gt;
 host$ '''cp patches/beaglebone/defconfig kernel/arch/arm/configs/beaglebone_defconfig&lt;br /&gt;
 host$ '''wget http://arago-project.org/git/projects/?p=am33x-cm3.git\;a=blob_plain\;f=bin/am335x-pm-firmware.bin\;hb=HEAD -O kernel/firmware/am335x-pm-firmware.bin'''&lt;br /&gt;
 host$ '''md5sum kernel/firmware/am335x-pm-firmware.bin''' &lt;br /&gt;
 17d6a4c24d3cb720aa9ed4522cb891fc  kernel/firmware/am335x-pm-firmware.bin&lt;br /&gt;
&lt;br /&gt;
=== compile ===&lt;br /&gt;
Once patched you are ready to compile the kernel.  The first time takes a while.  Mine tool 4 minutes, but I was running on 8 cores.  Set the '''-j''X'' ''' to match the number of cores you have. '''uImage''' is the kernel!&lt;br /&gt;
 host$ '''cd kernel'''&lt;br /&gt;
 host$ '''make beaglebone_defconfig'''&lt;br /&gt;
&lt;br /&gt;
Now that you know it's working, let's compile it. First set the paths to find the cross-compiles. Put the following in a file, call it ~/.oe/'''crossCompile.sh'''.&lt;br /&gt;
&lt;br /&gt;
 export ARCH=arm&lt;br /&gt;
 export CROSS_COMPILE=arm-linux-gnueabi-&lt;br /&gt;
Do the above once&lt;br /&gt;
&lt;br /&gt;
Now ''source'' the file.&lt;br /&gt;
 host$ '''source ~/.oe/crossCompileEnv.sh'''&lt;br /&gt;
Do the above once per terminal session.&lt;br /&gt;
&lt;br /&gt;
 host$ '''make -j9'''&lt;br /&gt;
 host$ '''make uImage'''&lt;br /&gt;
Do the above every time you recompile the kernel&lt;br /&gt;
&lt;br /&gt;
You also need all the kernel modules.  Here we create a directory to install them in. (a few seconds)&lt;br /&gt;
 host$ '''mkdir ../rootfs'''&lt;br /&gt;
 host$ '''make INSTALL_MOD_PATH=../rootfs modules_install'''&lt;br /&gt;
&lt;br /&gt;
=== install ===&lt;br /&gt;
Copy the kernel and the modules to the Beagle.  (a minute or so)&lt;br /&gt;
 host$ '''cd ..'''&lt;br /&gt;
 host$ '''scp kernel/arch/arm/boot/uImage root@beagle:/boot/uImage-3.2.25+&lt;br /&gt;
 host$ '''cd rootfs'''&lt;br /&gt;
 host$ '''find -H -depth | cpio -o -H crc | ssh root@beagle 'cd /; cpio -id' '''&lt;br /&gt;
&lt;br /&gt;
Now log into the beagle and move some things around.&lt;br /&gt;
 host$ '''ssh root@beagle&lt;br /&gt;
&lt;br /&gt;
This will copy the kernel to the ext4 partition.&lt;br /&gt;
 beagle$ '''cd /boot'''&lt;br /&gt;
 beagle$ '''rm uImage'''&lt;br /&gt;
 beagle$ '''ln -s uImage-3.2.25+ uImage'''&lt;br /&gt;
&lt;br /&gt;
This will copy to the FAT partition.&lt;br /&gt;
 beagle$ '''mkdir /media/mmcblk0p1'''&lt;br /&gt;
 beagle$ '''mount /dev/mmcblk0p1 /media/mmcblk0p1'''&lt;br /&gt;
 beagle$ '''cp /boot/uImage-3.2.25+ /media/uImage'''&lt;br /&gt;
&lt;br /&gt;
=== reboot ===&lt;br /&gt;
Make sure screen is running on your host so you can see the shutdown and boot processes.&lt;br /&gt;
 host$ '''screen /dev/ttyUSB1 115200'''&lt;br /&gt;
&lt;br /&gt;
If you get an error try changing making yourself the owner of /dev/ttyUSB1.&lt;br /&gt;
 host$ '''sudo chown ''yoder:yoder'' /dev/ttyUSB1'''&lt;br /&gt;
 host$ '''screen /dev/ttyUSB1 115200'''&lt;br /&gt;
&lt;br /&gt;
Then restart you beagle&lt;br /&gt;
 beagle$ '''shutdown -r now'''&lt;br /&gt;
&lt;br /&gt;
If all goes well you will boot into your new kernel.&lt;br /&gt;
 beagle$ '''uname -a'''&lt;br /&gt;
 Linux beaglebone 3.2.25+ #1 Fri Oct 19 11:05:28 EDT 2012 armv7l GNU/Linux&lt;br /&gt;
&lt;br /&gt;
== DAS U-boot ==&lt;br /&gt;
These instructions came from [http://www.eewiki.net/display/linuxonarm/Home eewiki].&lt;br /&gt;
&lt;br /&gt;
=== download ===&lt;br /&gt;
While we're at it, let's get the boot loader we'll be using.  It takes some 3 minutes.&lt;br /&gt;
&lt;br /&gt;
 host$ '''cd ~/BeagleBoard'''&lt;br /&gt;
 host$ '''git clone git://git.denx.de/u-boot.git'''&lt;br /&gt;
 host$ '''cd u-boot/'''&lt;br /&gt;
 host$ '''git checkout v2012.10-rc2 -b tmp'''&lt;br /&gt;
&lt;br /&gt;
=== compile ===&lt;br /&gt;
Now configure and build.  The first time takes some 4 minutes.  After that it's only 5 seconds or so. (Replace '''am335x_evm_config''' with '''omap3_beagle_config''' if you are compiling for the xM.)&lt;br /&gt;
 host$ '''make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- am335x_evm_config'''&lt;br /&gt;
 host$ '''make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-'''&lt;br /&gt;
&lt;br /&gt;
=== install ===&lt;br /&gt;
&lt;br /&gt;
 host$ '''scp u-boot.img root@beagle:.'''&lt;br /&gt;
 beagle$ '''mkdir /media/mmcblk0p1'''&lt;br /&gt;
 beagle$ '''mount /dev/mmcblk0p1 /media/mmcblk0p1'''&lt;br /&gt;
 beagle$ '''cd /media/mmcblk0p1'''&lt;br /&gt;
 beagle$ '''mv u-boot.img u-boot.img.orig'''  # Save the working u-boot&lt;br /&gt;
 beagle$ '''cp ~/u-boot.img u-boot.img.new'''&lt;br /&gt;
 beagle$ '''cp u-boot.img.new u-boot.img'''&lt;br /&gt;
Once installed you are ready for u-boot work.&lt;br /&gt;
&lt;br /&gt;
{{YoderFoot}}&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE497_Calendar_and_Exercises</id>
		<title>ECE497 Calendar and Exercises</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE497_Calendar_and_Exercises"/>
				<updated>2012-11-05T03:37:41Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: /* Week 7 */ made a link for exercise 25&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECE497 |Calendar]]&lt;br /&gt;
[[Category:BeagleBoard]]&lt;br /&gt;
{{YoderHead}}&lt;br /&gt;
&lt;br /&gt;
Here's what you'll need to do for the class.  Unless stated otherwise these are individual exercises, not team.&lt;br /&gt;
&lt;br /&gt;
I'm updating this from last year, so be sure to check the year to be sure it's been refreshed. If the background is white, it hasn't been updated.&lt;br /&gt;
&lt;br /&gt;
'''All assignments are due the start of the following week.  Initially that is a Thursday!'''&lt;br /&gt;
&lt;br /&gt;
== Week 1 ==&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:blue; background-color:#ffffcc;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Day !! Date !! Reading !! Topic !! Exercise !! Assignment Links&lt;br /&gt;
|-&lt;br /&gt;
| 1-1&lt;br /&gt;
| 30-Aug-2012&lt;br /&gt;
| &lt;br /&gt;
| Introductions, Demos&lt;br /&gt;
| Fire up your Beagle and see it work. Do everything in Exercise 09. Due Friday.&lt;br /&gt;
'''[[EBC Exercise 01 Start Here]]''' gives an overview of what we'll be doing over the next few days.  Start setting up your Linux development computer now.  You can do either a native install, or a virtual machine. [[EBC Exercise 06 Notes on VirtualBox | Here]] and [[EBC Exercise 07 Notes on Installing Ubuntu in VMware Player | here]] are some notes in virtual machine installs.  They are out of date.  Feel free to update them.&lt;br /&gt;
&lt;br /&gt;
I suggest Ubuntu 12.04 LTS.  Some of the TI software may require it. I may not be able to help with other versions of distributions.&lt;br /&gt;
&lt;br /&gt;
| [[ECE497 - 32-bit Embedded Linux, Rose-Hulman]]&lt;br /&gt;
[[EBC_Exercise_01_Start_Here#The_Linux_host_computer | EBC Exercise 01 Start Here]]&lt;br /&gt;
&lt;br /&gt;
[[EBC Exercise 02 Out-of-the-Box, Bone]]&lt;br /&gt;
&lt;br /&gt;
[[EBC Exercise 09 Working With Open Source]]&lt;br /&gt;
|-&lt;br /&gt;
| 1-2&lt;br /&gt;
| 31&lt;br /&gt;
| &lt;br /&gt;
| General Purpose IO, LEDs and push buttons.&lt;br /&gt;
| Set up a Beagle, demo in class. Get reference manuals and clone git repository.&lt;br /&gt;
| [[EBC Exercise 03 Installing a Beagle OS]]&lt;br /&gt;
&lt;br /&gt;
[[EBC Exercise 05 Getting Exercise Support Materials]]&lt;br /&gt;
&lt;br /&gt;
[[EBC Exercise 10 Flashing an LED]]&lt;br /&gt;
|-&lt;br /&gt;
| 1-3&lt;br /&gt;
| 3-Sept-2012&lt;br /&gt;
| &lt;br /&gt;
| Interrupts and gpio&lt;br /&gt;
| &lt;br /&gt;
| [[EBC Exercise 08 Installing Development Tools]]&lt;br /&gt;
&lt;br /&gt;
[[EBC Exercise 11 gpio Polling and Interrupts]]&lt;br /&gt;
|-&lt;br /&gt;
| 1-4&lt;br /&gt;
| 4&lt;br /&gt;
|&lt;br /&gt;
| i2c, git&lt;br /&gt;
| &lt;br /&gt;
| [[EBC Exercise 16 git]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| &amp;quot;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Add your project ideas&lt;br /&gt;
| [[ECE497 Project Ideas]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Week 2 ==&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:blue; background-color:#eeffff;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Day !! Date !! Reading !! Topic !! Exercise !! Links&lt;br /&gt;
|- &lt;br /&gt;
| 2-1&lt;br /&gt;
| 6-Sept&lt;br /&gt;
| &lt;br /&gt;
| Pulse Width Modulation&lt;br /&gt;
| &lt;br /&gt;
| [[EBC Exercise 12 I2C]]&lt;br /&gt;
&lt;br /&gt;
[[EBC Exercise 13 Pulse Width Modulation]]&lt;br /&gt;
|-&lt;br /&gt;
| 2-2&lt;br /&gt;
| 7&lt;br /&gt;
| &lt;br /&gt;
| Lab Time, Mini Project 01&lt;br /&gt;
| Measure gpio and pwm with oscilloscope.&lt;br /&gt;
| [[EBC Mini Project 01]]&lt;br /&gt;
|-&lt;br /&gt;
| 2-3&lt;br /&gt;
| 10&lt;br /&gt;
|&lt;br /&gt;
| gdb, Lab Time&lt;br /&gt;
| &lt;br /&gt;
| [[EBC Exercise 14 gdb Debugging]]&lt;br /&gt;
|-&lt;br /&gt;
| 2-4&lt;br /&gt;
| 11&lt;br /&gt;
| &lt;br /&gt;
| Lab Time&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Week 3 ==&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:blue; background-color:#ffaaff;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Day !! Date !! Reading !! Topic !! Exercise !! Links&lt;br /&gt;
|-&lt;br /&gt;
| 3-1&lt;br /&gt;
| 13&lt;br /&gt;
| &lt;br /&gt;
| make, Mini Project 02&lt;br /&gt;
| Flash ETC 2012 image on SD card for xM&lt;br /&gt;
| [[EBC Exercise 15 make]]&lt;br /&gt;
&lt;br /&gt;
[[EBC Mini Project 02]]&lt;br /&gt;
&lt;br /&gt;
[[EBC Exercise 03 Installing a Beagle OS]]&lt;br /&gt;
|-&lt;br /&gt;
| 3-2&lt;br /&gt;
| 14&lt;br /&gt;
| &lt;br /&gt;
| Advanced Linux Sound Architecture (ALSA)&lt;br /&gt;
| &lt;br /&gt;
| [[EBC Exercise 17 Using ALSA for Audio Processing]]&lt;br /&gt;
|-&lt;br /&gt;
| 3-3&lt;br /&gt;
| 17&lt;br /&gt;
| &lt;br /&gt;
| Using the DSP (c6run)&lt;br /&gt;
| &lt;br /&gt;
| [[EBC Exercise 18 Using the DSP for Audio Processing]]&lt;br /&gt;
|-&lt;br /&gt;
| 3-4&lt;br /&gt;
| 18&lt;br /&gt;
| &lt;br /&gt;
| Lab Time, Mini Project 1 demo time&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Week 4 ==&lt;br /&gt;
&lt;br /&gt;
{|style=&amp;quot;color:blue; background-color:#ddffff;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Day !! Date !! Reading !! Topic !! Exercise !! Links&lt;br /&gt;
|-&lt;br /&gt;
| 4-1&lt;br /&gt;
| 20&lt;br /&gt;
| &lt;br /&gt;
| Video Processing&lt;br /&gt;
| &lt;br /&gt;
| [[EBC Exercise 19 DSS2 and sysfs]]&lt;br /&gt;
&lt;br /&gt;
[[EBC Exercise 20 The Display SubSystem (DSS)]]&lt;br /&gt;
|-&lt;br /&gt;
| 4-2&lt;br /&gt;
| 21&lt;br /&gt;
| &lt;br /&gt;
| Lab Time&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 4-3&lt;br /&gt;
| 24&lt;br /&gt;
| &lt;br /&gt;
| Threads&lt;br /&gt;
| &lt;br /&gt;
| [[EBC Exercise 21 Running Audio and Video]]&lt;br /&gt;
|-&lt;br /&gt;
| 4-4&lt;br /&gt;
| 25&lt;br /&gt;
| &lt;br /&gt;
| Lab Time&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Week 5 ==&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:blue; background-color:#ffffdd;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Day !! Date !! Reading !! Topic !! Exercise !! Links&lt;br /&gt;
|-&lt;br /&gt;
| 5-1&lt;br /&gt;
| 27-Sept-2012&lt;br /&gt;
| &lt;br /&gt;
| Graphical Interfaces and node.js&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 5-2&lt;br /&gt;
| 28&lt;br /&gt;
| &lt;br /&gt;
| Lab Time&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 5-3&lt;br /&gt;
| 1-Oct-2012&lt;br /&gt;
| 2.1-2.3.5, 3.2.13&lt;br /&gt;
| Booting, Memory Map, Cross-Development, Processor Basics, TI ARM&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 5-4&lt;br /&gt;
| 2&lt;br /&gt;
| 4.1-4.3.3&lt;br /&gt;
| The Kernel&lt;br /&gt;
| &lt;br /&gt;
| [[EBC Exercise 22 Cross-Compiling]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Week 6 ==&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:blue; background-color:#ffddff;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Day !! Date !! Reading !! Topic !! Exercise !! Links&lt;br /&gt;
|-&lt;br /&gt;
| 6-1&lt;br /&gt;
| 4&lt;br /&gt;
| 4.4-4.5, 5.1-5.2&lt;br /&gt;
| Adding to the Kernel makefile, Kernel Initialization&lt;br /&gt;
| Find the Beagle version of Figure 2-5 on page 25. Be sure to find a numeric value for the starting address of the POP SDRAM. Note where you found this information.&lt;br /&gt;
| [[EBC Exercise 23 Configuring the Kernel]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;&lt;br /&gt;
| &amp;quot;&lt;br /&gt;
| 5.3-5.6&lt;br /&gt;
| Command Line Processing, __setup Macro&lt;br /&gt;
| Configuring the Kernel Lab&lt;br /&gt;
| [[EBC Exercise 24 Kconfig Edits]]&lt;br /&gt;
|-&lt;br /&gt;
| 6-2&lt;br /&gt;
| 5&lt;br /&gt;
| &lt;br /&gt;
| Lab Time&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 6-3&lt;br /&gt;
| 8&lt;br /&gt;
| 6.1-6.3&lt;br /&gt;
| System Initialization&lt;br /&gt;
| Project Status Report, update your project status page.&lt;br /&gt;
| [[EBC Exercise 21a Boot Sequence]]&lt;br /&gt;
[[ECE497 Contributions and Project Status]]&lt;br /&gt;
|-&lt;br /&gt;
| 6-4&lt;br /&gt;
| 9&lt;br /&gt;
| 6.4-6.7&lt;br /&gt;
| Initial RAM Disk, Using initramfs&lt;br /&gt;
| &lt;br /&gt;
|  &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Week 7 ==&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:blue; background-color:#ffffff;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Day !! Date !! Reading !! Topic !! Exercise !! Links&lt;br /&gt;
|-&lt;br /&gt;
| 7-1&lt;br /&gt;
| 15&lt;br /&gt;
| 7.1-7.3&lt;br /&gt;
| Bootloaders, Das U-Boot&lt;br /&gt;
| &lt;br /&gt;
| [[EBC Exercise 25 Configuring U-boot]]&lt;br /&gt;
|-&lt;br /&gt;
| 7-2&lt;br /&gt;
| 16&lt;br /&gt;
| &lt;br /&gt;
| Demo and Work Day&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 7-3&lt;br /&gt;
| 18&lt;br /&gt;
| 8.1-8.4&lt;br /&gt;
| Device Driver Basics, Driver Methods&lt;br /&gt;
| &lt;br /&gt;
| [[EBC Exercise 08 Installing Development Tools]]&lt;br /&gt;
[[EBC Exercise 26 Device Drivers]]&lt;br /&gt;
|-&lt;br /&gt;
| 7-4&lt;br /&gt;
| 19&lt;br /&gt;
| 11.1-11.4&lt;br /&gt;
| BusyBox&lt;br /&gt;
| In B105&lt;br /&gt;
| [[EBC Exercise 27 BusyBox]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Week 8 ==&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:blue; background-color:#ddffff;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Day !! Date !! Reading !! Topic !! Exercise !! Links&lt;br /&gt;
|-&lt;br /&gt;
| 8-1&lt;br /&gt;
| 22&lt;br /&gt;
| [http://gstreamer.freedesktop.org/ GStreamer]&lt;br /&gt;
| GStreamer ([http://wiki.oz9aec.net/index.php/Gstreamer_cheat_sheet Cheat Sheet],&lt;br /&gt;
[http://www.oz9aec.net/index.php/gstreamer/345-a-weekend-with-gstreamer Weekend with GStreamer])&lt;br /&gt;
| Status Report&lt;br /&gt;
| [[EBC Exercise 29 GStreamer]] (optional)&lt;br /&gt;
|-&lt;br /&gt;
| 8-2&lt;br /&gt;
| 23&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
| Project Time&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 8-3&lt;br /&gt;
| 25&lt;br /&gt;
| &lt;br /&gt;
| Remote debugging with gdb, cbrowser/cscope and strace&lt;br /&gt;
| Project Time&lt;br /&gt;
| [[EBC Exercise 28 Remote gdb and more]] (optional)&lt;br /&gt;
|-&lt;br /&gt;
| 8-4&lt;br /&gt;
| 26&lt;br /&gt;
| &lt;br /&gt;
| Project Time&lt;br /&gt;
| &lt;br /&gt;
| [[ECE497 Contributions and Project Status]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Week 9 ==&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:blue; background-color:#ffffff;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Day !! Date !! Reading !! Topic !! Exercise !! Links&lt;br /&gt;
|-&lt;br /&gt;
| 9-1&lt;br /&gt;
| 29&lt;br /&gt;
| &lt;br /&gt;
| Project Time all week&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 9-2&lt;br /&gt;
| 30&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 9-3&lt;br /&gt;
| 1-Nov-2012&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 9-4&lt;br /&gt;
| 2&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Week 10 ==&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;color:blue; background-color:#ffffff;&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Day !! Date !! Reading !! Topic !! Exercise !! Links&lt;br /&gt;
|-&lt;br /&gt;
| 10-1&lt;br /&gt;
| 5&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Project Time all week&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 10-2&lt;br /&gt;
| 6&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 10-3&lt;br /&gt;
| 8&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 10-4&lt;br /&gt;
| 9&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
| Cathy Wicks?&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{YoderFoot}}&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/Adafruit:_LED_Strip_LPD8806</id>
		<title>Adafruit: LED Strip LPD8806</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/Adafruit:_LED_Strip_LPD8806"/>
				<updated>2012-11-05T03:35:54Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: /* Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECE497]]&lt;br /&gt;
[[Category:Adafruit]]&lt;br /&gt;
&lt;br /&gt;
The offical page can be found at [http://adafruit.com/products/306 Digital Addressable RGB LED w/ PWM waterproof flexi strip]&lt;br /&gt;
&lt;br /&gt;
[[File:digitalledstrip_LRG.jpg|200px|thumb|left|LPD8806]]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is an LED strip housed in waterproof material with 32 LEDs per meter. The LEDs are controlled by shift registers using LPD8806 controller that controls two LEDs at a time with pulse width modulation. This chip has built in 1.2 MHz high speed 7-bit PWM for each channel which relates to 21-bit color.  At each end is a 4-pin JST connector which is sealed in the 5 meter version. This needs to be powered by a 5V power source and should not go above 5.5V.&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
&lt;br /&gt;
https://github.com/adammhaile/RPi-LPD8806&lt;br /&gt;
&lt;br /&gt;
https://github.com/Sh4d/LPD8806&lt;br /&gt;
&lt;br /&gt;
http://www.kernel.org/doc/Documentation/spi/spidev_test.c&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
When I got the LED strip, it did not work as expected. Only the first two lights would stay lit and would only change based on random values that they would get when initialized with noise. After reading this thread on the Adafruit forums http://forums.adafruit.com/viewtopic.php?t=32825 we were able to get a working strip of LEDs.&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/Adafruit:_LED_Strip_LPD8806</id>
		<title>Adafruit: LED Strip LPD8806</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/Adafruit:_LED_Strip_LPD8806"/>
				<updated>2012-11-05T03:07:39Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: Added categories&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ECE497]]&lt;br /&gt;
[[Category:Adafruit]]&lt;br /&gt;
&lt;br /&gt;
The offical page can be found at [http://adafruit.com/products/306 Digital Addressable RGB LED w/ PWM waterproof flexi strip]&lt;br /&gt;
&lt;br /&gt;
[[File:digitalledstrip_LRG.jpg|200px|thumb|left|LPD8806]]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is an LED strip housed in waterproof material with 32 LEDs per meter. The LEDs are controlled by shift registers using LPD8806 controller that controls two LEDs at a time with pulse width modulation. This chip has built in 1.2 MHz high speed 7-bit PWM for each channel which relates to 21-bit color.  At each end is a 4-pin JST connector which is sealed in the 5 meter version. This needs to be powered by a 5V power source and should not go above 5.5V.&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
&lt;br /&gt;
https://github.com/adammhaile/RPi-LPD8806&lt;br /&gt;
https://github.com/Sh4d/LPD8806&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
When I got the LED strip, it did not work as expected. Only the first two lights would stay lit and would only change based on random values that they would get when initialized with noise. After reading this thread on the Adafruit forums http://forums.adafruit.com/viewtopic.php?t=32825 we were able to get a working strip of LEDs.&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/Adafruit:_LED_Strip_LPD8806</id>
		<title>Adafruit: LED Strip LPD8806</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/Adafruit:_LED_Strip_LPD8806"/>
				<updated>2012-11-05T03:07:06Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: Richarsm moved page Adafruit LPD8806 to Adafruit: LED Strip LPD8806: formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The offical page can be found at [http://adafruit.com/products/306 Digital Addressable RGB LED w/ PWM waterproof flexi strip]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:digitalledstrip_LRG.jpg|200px|thumb|left|LPD8806]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is an LED strip housed in waterproof material with 32 LEDs per meter. The LEDs are controlled by shift registers using LPD8806 controller that controls two LEDs at a time with pulse width modulation. This chip has built in 1.2 MHz high speed 7-bit PWM for each channel which relates to 21-bit color.  At each end is a 4-pin JST connector which is sealed in the 5 meter version. This needs to be powered by a 5V power source and should not go above 5.5V.&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
&lt;br /&gt;
https://github.com/adammhaile/RPi-LPD8806&lt;br /&gt;
https://github.com/Sh4d/LPD8806&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
When I got the LED strip, it did not work as expected. Only the first two lights would stay lit and would only change based on random values that they would get when initialized with noise. After reading this thread on the Adafruit forums http://forums.adafruit.com/viewtopic.php?t=32825 we were able to get a working strip of LEDs.&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/Adafruit_LPD8806</id>
		<title>Adafruit LPD8806</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/Adafruit_LPD8806"/>
				<updated>2012-11-05T03:07:06Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: Richarsm moved page Adafruit LPD8806 to Adafruit: LED Strip LPD8806: formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Adafruit: LED Strip LPD8806]]&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/Adafruit:_LED_Strip_LPD8806</id>
		<title>Adafruit: LED Strip LPD8806</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/Adafruit:_LED_Strip_LPD8806"/>
				<updated>2012-11-05T02:57:14Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: added subsections and code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The offical page can be found at [http://adafruit.com/products/306 Digital Addressable RGB LED w/ PWM waterproof flexi strip]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:digitalledstrip_LRG.jpg|200px|thumb|left|LPD8806]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is an LED strip housed in waterproof material with 32 LEDs per meter. The LEDs are controlled by shift registers using LPD8806 controller that controls two LEDs at a time with pulse width modulation. This chip has built in 1.2 MHz high speed 7-bit PWM for each channel which relates to 21-bit color.  At each end is a 4-pin JST connector which is sealed in the 5 meter version. This needs to be powered by a 5V power source and should not go above 5.5V.&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
&lt;br /&gt;
https://github.com/adammhaile/RPi-LPD8806&lt;br /&gt;
https://github.com/Sh4d/LPD8806&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
When I got the LED strip, it did not work as expected. Only the first two lights would stay lit and would only change based on random values that they would get when initialized with noise. After reading this thread on the Adafruit forums http://forums.adafruit.com/viewtopic.php?t=32825 we were able to get a working strip of LEDs.&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/Adafruit:_LED_Strip_LPD8806</id>
		<title>Adafruit: LED Strip LPD8806</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/Adafruit:_LED_Strip_LPD8806"/>
				<updated>2012-11-05T02:46:13Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The offical page can be found at [http://adafruit.com/products/306 Digital Addressable RGB LED w/ PWM waterproof flexi strip]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:digitalledstrip_LRG.jpg|200px|thumb|left|LPD8806]]&lt;br /&gt;
&lt;br /&gt;
This is an LED strip housed in waterproof material with 32 LEDs per meter. The LEDs are controlled by shift registers using LPD8806 controller that controls two LEDs at a time with pulse width modulation. This chip has built in 1.2 MHz high speed 7-bit PWM for each channel which relates to 21-bit color.  At each end is a 4-pin JST connector which is sealed in the 5 meter version. This needs to be powered by a 5V power source and should not go above 5.5V.&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/Adafruit:_LED_Strip_LPD8806</id>
		<title>Adafruit: LED Strip LPD8806</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/Adafruit:_LED_Strip_LPD8806"/>
				<updated>2012-11-05T02:45:58Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The offical page can be found at [http://adafruit.com/products/306 Adafruit &amp;quot;Digital Addressable RGB LED w/ PWM waterproof flexi strip&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:digitalledstrip_LRG.jpg|200px|thumb|left|LPD8806]]&lt;br /&gt;
&lt;br /&gt;
This is an LED strip housed in waterproof material with 32 LEDs per meter. The LEDs are controlled by shift registers using LPD8806 controller that controls two LEDs at a time with pulse width modulation. This chip has built in 1.2 MHz high speed 7-bit PWM for each channel which relates to 21-bit color.  At each end is a 4-pin JST connector which is sealed in the 5 meter version. This needs to be powered by a 5V power source and should not go above 5.5V.&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/Adafruit:_LED_Strip_LPD8806</id>
		<title>Adafruit: LED Strip LPD8806</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/Adafruit:_LED_Strip_LPD8806"/>
				<updated>2012-11-05T02:45:25Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The offical page can be found at [http://adafruit.com/products/306 Adafruit &amp;quot;Digital Addressable RGB LED w/ PWM waterproof flexi strip&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:digitalledstrip_LRG.jpg|200px|thumb|left|alt text]]&lt;br /&gt;
&lt;br /&gt;
This is an LED strip housed in waterproof material with 32 LEDs per meter. The LEDs are controlled by shift registers using LPD8806 controller that controls two LEDs at a time with pulse width modulation. This chip has built in 1.2 MHz high speed 7-bit PWM for each channel which relates to 21-bit color.  At each end is a 4-pin JST connector which is sealed in the 5 meter version. This needs to be powered by a 5V power source and should not go above 5.5V.&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/Adafruit:_LED_Strip_LPD8806</id>
		<title>Adafruit: LED Strip LPD8806</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/Adafruit:_LED_Strip_LPD8806"/>
				<updated>2012-11-05T02:45:02Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The offical page can be found at [http://adafruit.com/products/306 Adafruit &amp;quot;Digital Addressable RGB LED w/ PWM waterproof flexi strip&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:http://www.adafruit.com/images/large/digitalledstrip_LRG.jpg|200px|thumb|left|alt text]]&lt;br /&gt;
&lt;br /&gt;
This is an LED strip housed in waterproof material with 32 LEDs per meter. The LEDs are controlled by shift registers using LPD8806 controller that controls two LEDs at a time with pulse width modulation. This chip has built in 1.2 MHz high speed 7-bit PWM for each channel which relates to 21-bit color.  At each end is a 4-pin JST connector which is sealed in the 5 meter version. This needs to be powered by a 5V power source and should not go above 5.5V.&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/Adafruit:_LED_Strip_LPD8806</id>
		<title>Adafruit: LED Strip LPD8806</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/Adafruit:_LED_Strip_LPD8806"/>
				<updated>2012-11-05T02:44:07Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Adafruit LPD8806&lt;br /&gt;
http://adafruit.com/products/306&lt;br /&gt;
&lt;br /&gt;
[[File:http://www.adafruit.com/images/large/digitalledstrip_LRG.jpg|200px|thumb|left|alt text]]&lt;br /&gt;
&lt;br /&gt;
This is an LED strip housed in waterproof material with 32 LEDs per meter. The LEDs are controlled by shift registers using LPD8806 controller that controls two LEDs at a time with pulse width modulation. This chip has built in 1.2 MHz high speed 7-bit PWM for each channel which relates to 21-bit color.  At each end is a 4-pin JST connector which is sealed in the 5 meter version. This needs to be powered by a 5V power source and should not go above 5.5V.&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/File:Digitalledstrip_LRG.jpg</id>
		<title>File:Digitalledstrip LRG.jpg</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/File:Digitalledstrip_LRG.jpg"/>
				<updated>2012-11-05T02:43:10Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	<entry>
		<id>http://elinux.org/ECE497_richarsm_Project</id>
		<title>ECE497 richarsm Project</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/ECE497_richarsm_Project"/>
				<updated>2012-11-05T02:42:12Z</updated>
		
		<summary type="html">&lt;p&gt;Richarsm: Richarsm moved page ECE497 richarsm Project to Adafruit LPD8806: Make it so it's more generic.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Adafruit LPD8806]]&lt;/div&gt;</summary>
		<author><name>Richarsm</name></author>	</entry>

	</feed>