[beagleboard] Re: Beagle Bone Black PRU Cape

2014-09-11 Thread jstampfl


More info at:  http://www.ti.com/lit/ug/tidu426/tidu426.pdf



-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] BBB A6 B running slow, C ok

2014-09-11 Thread jstampfl
From dmesg:

A6 - Debian bone 60 -  vdd-mpu  1100 mV, Bogomips 545
B  -  Debian bone 60 -  vdd-mpu  1100 mV, Bogomips 545
C  -  Debian bone 60 -  vdd-mpu  1325 mV, Bogomips 993

Also:

A6 - Angstrom 3.8.13 - vdd-mpu  1100 mV, Bogomips 545
B   - Angstrom 3.8.13 - vdd-mpu  1100 mV, Bogomips 545
C  -  Debian bone47  -   vdd-mpu  1325 mV, Bogomips 993

Do this mean that the A6  B boards are running at 500 or 600 MHz?


-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] 3.8.13-bone64 dd_mpu: 925 -- 1325 mV at 1100 mV

2014-09-09 Thread jstampfl
I am unable to connect from my PC to the BBB via USB.

Using the 2MG Console, running on SDcard.

Noticed the power from dmesg.

[0.00] Linux version 3.8.13-bone64 (root@a5-imx6q-wandboard-2gb) (gcc 
version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Thu Aug 21 21:24:58 UTC 2014

[0.00] Kernel command line: console=tty0 console=ttyO0,115200n8 
root=/dev/mmcblk0p1 rootfstype=ext4 rootwait quiet init=/lib/systemd/systemd 
mpurate=1000

[0.154929] vdd_mpu: 925 -- 1325 mV at 1100 mV 
[0.155986] vdd_core: 925 -- 1150 mV at 1100 mV 


as you can see I tried the mpurate=1000 on the command line.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: Booting off Micro SD Card

2014-09-01 Thread jstampfl
You said you couldn't add the microSD card - did you follow the 
instructions at: http://elinux.org/Beagleboard:MicroSD_As_Extra_Storage

Actually, you can format the microSD card on another machine (I used 
windows xp).  Then put the uEnv.txt file in partition 0.  I you just 
formated the 32GB as one partion, then just copy the uEnv.txt file.  See 
the above webpage for the contents of the uEnv.txt file.


-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: Booting off Micro SD Card

2014-09-01 Thread jstampfl
Check your mount options.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] customize cap-universal-00A0.dts

2014-08-08 Thread jstampfl
I have prepared cape-univ-hdmi-00A0.dts , but I don't know how to 
indicate that it is available.  ie.  a git push request?

It is in my local copy of beaglebone-universal-io.






-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] PRU eCAP timer with interrupt example

2014-08-01 Thread jstampfl
The example is similar to the IEP example.

Uses the local eCAP timer.

https://github.com/jstampfl/PruECAP_Int

The PRU local timers are:

the Cycle counter.  The IEP timer and the eCAP timer.

The IEP and eCAP timers have compare registers and can generate various 
interrupts.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: PRU IEP interrupt example

2014-07-25 Thread jstampfl
Added example using two compare match interrupts to toggle the pin.   CMP0 
match sends interrupt and resets the counter. CMP1 match sends an interrupt.

Full code at:  https://github.com/jstampfl/PruIEP_Int



-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] PRU IEP interrupt example

2014-07-24 Thread jstampfl
Full code at:  https://github.com/jstampfl/PruIEP_Int

Also for example of using PRU IEP see:

https://github.com/cdsteinkuehler/linuxcnc/blob/MachineKit-ubc/configs/ARM/PRU-Debugger/pruexample.p

Here is the p code:

//iepx.p   -  set up IEP interrupt on CMP0 hitting compare value.
//toggles pin p9.31 -  attached to r30.t0 - mode 5 output
//
//Depends on call linux program to initialize the INTC 
//
.setcallreg r2.w0  //  Going to use r30
.origin 0
.entrypoint TB
TB:
   set r30,r30, 0 //turn on 
   jmp ISET//this is the routine to setup

TB1:
   ldi r17,0 // init loop counter
   call RSET // routine to clear  enable interrupts

TB2:
   qbbc TB2,r31.t30 // spin here for interrupt
   xor r30,r30,1//toggle
   call RSET// clear, enable
   add r17,r17,1//loop counter
   qblt TB9,r17,50  //loop 50 times
   jmp TB2


TB9://  exit point 
   mov r31,35  //trigger host interrupt for Linux
   HALT

ISET: //  This section is to initialize the interrupts

//INITIALIZE IEP INTERRUPTS

   mov r14,0xFF   //For CMP0, compare trigger
   sbco r14,c26,0x48,4
   mov r14,0x3// enable CMP0, and enable
   sbco r14,c26,0x40,4// counter reset on event
   mov r14,0x1
   sbco r14,c26,0x44,4// clear status for CMP0
   lbco r14,c26,0x4,4
   sbco r14,c26,0x4,4 // clear GLOBAL status, overflow
   mov r14,0x111  // enable IEP counter, inc 1
   sbco r14,c26,0,4

//DONE WITH IEP SETUP

//SETUP CHANNEL MAP
//map SysEvent to Channel 0, leave 16 - 23 alone set by Linux
   mov r15,0x400//set up Channel map
   mov r14,0x09090909   // first map all unused events to
   sbco r14,c0,r15,4//  Channel 9
   mov r15,0x408
   sbco r14,c0,r15,4
   mov r15,0x40C// skiping offsets 410  414, they
   sbco r14,c0,r15,4// were set by the C program via prussdrv
   mov r18,0x43C// end for loop
   mov r15,0x414// start -4 for loop
TB43:
   add r15,r15,4
   sbco r14,c0,r15,4
   qbgt TB43,r15,r18
   mov r14,0x00090909   // map SysEvt 7 to channel 0
   mov r15,0x404// now do 404, which has the
   sbco r14,c0,r15,4// entries for 4,5,6,7

//   Done with Channel Map, Host Interrupt Map now
   // Host Interrupt 0 - 3 were setup by Linux   

   mov r14,0x09090909   // map channels 4,5,6,7 to Host Int 9 
   mov r15,0x804
   sbco r14,c0,r15,4
   mov r14,0x0909   // map channel 8  9 to Host Int 9
   mov r15,0x808
   sbco r14,c0,r15,4

   ldi r15, 0x24 //clear all events
   call ALLEVT


   ldi r15,0x28  // enable all events
   call ALLEVT
   jmp TB1

RSET:  // Routine to clear  enable system events, also host interrupts
   mov r24,r2   // Save return address
// so can call ALLEVT
   lbco r14,c26,0x4,4   // clear GLOBAL_STATUS
   sbco r14,c26,0x4,4
   lbco r14,c26,0x44,4  // clear CMP_STATUS
   sbco r14,c26,0x44,4
   lbco r14,c26,0x44,4
   mov r15,0x24 //  to clear system event
   call ALLEVT
   mov r15,0x28 //  to enable system event
   call ALLEVT

   mov r2,r24// restore return address
   ret
   
ALLEVT:  //Insert the system envent in the proper INTC register
 // register r15 must have the register offset
 // will only work with registers that take the event number
 // if you want to handle multiple events, just add 
 //   ldi r14,sys event no.
 //   sbco r14, c0 ,r15,4

   ldi r14,0x7
   sbco r14, c0 ,r15,4
   ret

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] PRU IEP Timer to time pulse from HC-SR04

2014-07-22 Thread jstampfl
This example repeats the Prutimer example that used the cycle counter. 
 This example uses the IEP timer.
Code at:  https://github.com/jstampfl/Prutimer_IEP

/ pi.p

//  To get the echo pulse on pin P8 15.
//  assemble:  pasm -v3 -b pt.p(could be pasm_2 if you follow 
directions )
.setcallreg r2.w0//   
.origin 0
.entrypoint T811
#define CTRL 0x22000 //Start of control registers.
#define IEP  0x2E000 //Start of IEP registers.
T811:
   ldi r11,0
   ldi r12,0 //pointer to data memory
   mov r7, 0x111 // value to enable the IEP
 // GLOBAL_CONFIG
 //0x1 to enable
 //0x10 to set default increment
 //0x100 to set compensation increment
 // compensation is not used here 
   mov r5,IEP// pointer to IEP registers
   ldi r6,0  // index for IEP registers
   ldi r3, 0 // zero to disable IEP
   sbbo r3,r5,r6,4   // Disable the IEP count
   ldi r6,0xC// Offset for IEP counter
   ldi r4,1
   sbbo r4,r5,r6,4   // zero the counter
TB1:
  qbbs TB1,r31,15// wait here for echo line to go low

// WAIT FOR THE ECHO PULSE

TB2:

  qbbc TB2,r31,15// wait here for echo line to go high
 //  - start of pulse
 
// START THE IEP COUNTER

   sbbo r7,r5,0,4 // enable IEP 

// WAIT FOR THE PULSE TO END

TB3:

   qbbs TB3,r31,15// wait here until echo line goes low.

// GET THE CYCLE COUNT AND PUT IN PRU0 LOCAL DATA MEMORY

  lbbo r11,r5,0xC,4   // get the count
  sbbo r10,r12,0,8   // put r10  r11 (the unused signal
 //  cycle count) in pru0 data memory
// STOP THE IEP COUNTER

  sbbo r3,r5,0,4 // put back
  sbbo r3,r5,0xC,4// Zero the cycle count

//  SEND INTERRUPT SIGNAL TO LINUX SIDE

  mov r31.b0,35  //Send interrupt to Linux side

  lbbo r11,r12,8,4   // Check for end flag from Linux side
  qbne TB1,r11,2 // go back for more

TB4:
  halt

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] PRU Uart read using Rx interrupt

2014-07-21 Thread jstampfl
I have modified my earlier read program to use interrupts from the PRU Uart 
to the PRU.

See the Code at:https://github.com/jstampfl/PruUart_Int

The program for the PRU depends on the C program to do some of the 
initialization of the PRU interrupts.  The PRU code initializes the Uart Rx 
interrupt which is System Event 6.  The System Event 6 is mapped to channel 
0 which is mapped to Host Interrupt 0 which appears on r31.t30 of the PRU.

.setcallreg r2.w0  //  Just out of habit.
.origin 0
.entrypoint TB
TB:
   ldi r20,0
   ldi r21,0
   ldi r22,0
   mov r0,0
   sbbo r0,r20,r21,4
   zero r0,64 //zero 16 registers
TB05:
   sbbo r0,r20,r21,64  //zero some of pru0 local memory
   add r21,r21,64  // for linux string functions
   add r22,r22,1
   qbgt TB05,r22,20

   jmp ISET//this is the routine to setup
   //interrupts

TB1:
// See section 8.2.1 in the AM335x PRU-ICSS Reference Guide
//for formula to compute the Uart divisor
   ldi r3,4   //Uart divisor  =1250 = 0x04E2
   sbco r3,c7,0x24,4  // 9600 at 16x
   ldi r3,0xE2//in DLL  DLH
   sbco r3,c7,0x20,4

   ldi r3,1
   sbco r3,c7,4,4// turn on receiver interupts
   lbco r3,c7,8,4//read IIR to clear

   ldi r3,0x3 //LCR = 3, 8 none  1
   sbco r3,c7,0x0C,4  //

   mov r3,0x6001  //Power 
   sbco r3,c7,0x30,4  // = tx on, rx on  Free to enable
   mov r5,0xFF
   ldi r4,0
   
   ldi r4,0  //zero some registers
   ldi r5,0
   ldi r3,0
   ldi r20,0
   ldi r21,0
   mov r9,276
   ldi r11,0

   ldi r24,0
   call RSET // routine to clear  enable interrupts
 //  and  get a character.

TB2:
   qbbc TB2,r31.t30 // spin here for interrupt

   call RSET// clear, enable  read

   sbbo r3,r5,r4,1// and put in buffer
   add r4,r4,1

   qbne TB2,r3,0xA// do until nl received
   sbbo r20,r5,r4,1   // put null to terminate
   ldi r4,0   // zero buffer pointer
   mov r31.b0,35  // signal linux
   jmp TB2

TB9:// an exit point used in debugging.  Not used here
   ldi r18,332// offset to write errno
   sbbo r23,r18,0,4   // used for debugging
   HALT

ISET: //  This section is to initialize the interrupts
   mov r19,336//point to printf in mem
   lbco r13,c4,4,4//enable OCP master port
   clr r13,r13,4
   sbco r13,c4,4,4

   lbco r13,c4,0x2C,4//disable MII_RT Events
   ldi r13,0 // MII_RT Register in Pru cfg
   sbco r13,c4,0x2C,4

   mov  r15,0x10//Turn off global interrupts
   lbco r14,c0,r15,4
   clr r14,r14,0
   sbco r14,c0,r15,4

   mov r15,0x400//set up Channel map
   mov r14,0x09090909   // first map all unused events to
   sbco r14,c0,r15,4//  Channel 9
   mov r15,0x408
   sbco r14,c0,r15,4
   mov r15,0x40C// skiping offsets 410  414, they
   sbco r14,c0,r15,4// were set by the C program via prussdrv
   mov r18,0x43C
   mov r15,0x414
TB43:
   add r15,r15,4
   sbco r14,c0,r15,4
   qbgt TB43,r15,r18
   mov r14,0x0909
   mov r15,0x400// now do offset 400
   sbco r14,c0,r15,4// only allow events 2  3
   mov r14,0x0900
   mov r15,0x404// now do 404, which has the
   sbco r14,c0,r15,4// entries for 4,5,6 the Uart interrupts

   ldi r15, 0x24 //clear all events
   call ALLEVT

   mov  r15,0x10
   ldi r14,0x1
   sbco r14,c0,r15,4

   ldi r15,0x28  // enable all events
   call ALLEVT
   jmp TB1

RSET:  // Routine to clear  enalbe system events, also host interrupts
   //  and read IIR in the Uart registers to clear the interrupt from
   // the Uart.  Also gets the character from the Uart buffer.
   mov r24,r2   // Save return address
// so can call ALLEVT
   mov r15,0x24 //  to clear system event
   call ALLEVT
   mov r15,0x28 //  to enable system event
   call ALLEVT
   lbco r3,c7,8,4//read IIR to clear
   lbco r3,c7,0,4 //data is ready, get from RBR
   ldi r17,1
   sbco r17,c7,4,4// turn on receive interupts
   mov r15,0x34  //HIEISR  to enable host interrupt
   ldi r14,0
   sbco r14,c0,r15,4
   mov r15,0x34  //HIEISR  to enable host interrupt
   ldi r14,2
   sbco r14,c0,r15,4
   mov r15,0x34  //HIEISR  to enable host interrupt
   ldi r14,3
   sbco r14,c0,r15,4
   mov r2,r24// restore return address
   ret
   
ALLEVT

[beagleboard] Re: Are there any PRU scratch pad examples (or source) out there?

2014-07-19 Thread jstampfl
Kent:

1.  Can you share some code showing PRU0 - PRU1 interrupts?

2.  Did you get the XIN/XOUT transfers between PRUs to work,  can you 
share the code?






-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] 2014-07-16/lxde/bone-debian-7.6-lxde-armhf-2014-07-16-4gb - devicetree not loading

2014-07-18 Thread jstampfl
From ID.txt:  BeagleBoard.org BeagleBone Debian Image 2014-07-16


I am unable to load .dtbo files:

I have installed on 8GB microSDcard, modified the uEnv.txt file to boot 
from the SDcard.

Hardware: BBB A5
from dmesg:

[ 0.00] Kernel command line: console=tty0 console=ttyO0,115200n8 
capemgr.enable_partno=ADAFRUIT-UART1 root=/dev/mmcblk0p2 ro rootfstype=ext4 
rootwait quiet init=/lib/systemd/systemd
[ 1.026722] bone-capemgr bone_capemgr.9: enabled_partno part_number 
'ADAFRUIT-UART1', version 'N/A', prio '0'
[ 1.026794] bone-capemgr bone_capemgr.9: slot #7: 'Override Board 
Name,00A0,Override Manuf,ADAFRUIT-UART1'
[ 1.033025] bone-capemgr bone_capemgr.9: loader: before slot-7 
ADAFRUIT-UART1:00A0 (prio 0)
[ 1.033050] bone-capemgr bone_capemgr.9: loader: check slot-7 
ADAFRUIT-UART1:00A0 (prio 0)
[ 1.033075] bone-capemgr bone_capemgr.9: loader: after slot-7 
ADAFRUIT-UART1:00A0 (prio 0)
[ 1.033101] bone-capemgr bone_capemgr.9: slot #7: Requesting part 
number/version based 'ADAFRUIT-UART1-00A0.dtbo
[ 1.033128] bone-capemgr bone_capemgr.9: slot #7: Requesting firmware 
'ADAFRUIT-UART1-00A0.dtbo' for board-name 'Override Board Name', version 
'00A0'
[ 1.417574] bone-capemgr bone_capemgr.9: failed to load firmware 
'ADAFRUIT-UART1-00A0.dtbo'
[ 1.426407] bone-capemgr bone_capemgr.9: loader: failed to load slot-7 
ADAFRUIT-UART1:00A0 (prio 0)


I tried other .dtbo files that work on Angstrom, with same result.

Any ideas how to fix this?


-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] 2014-07-16/lxde/bone-debian-7.6-lxde-armhf-2014-07-16-4gb - devicetree not loading

2014-07-18 Thread jstampfl


thanks, works great.


I think this is better than editing the uEnv.txt file.

Thanks for all your good work. 

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] eMMC pins on P8 question about section 8.1.2 of Rev C.1 reference manual

2014-07-18 Thread jstampfl
GPIO1_[0-5]  show up as mode 1 in the pins file.




-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] eMMC pins on P8 question about section 8.1.2 of Rev C.1 reference manual

2014-07-18 Thread jstampfl
From the BBB wiki page:

Onboard HDMI
 The onboard HDMI driver uses the LCD pins. They are still connected to the 
 expansion header, but in some cases, they could cause an LCD cape to have 
 some noise issues unless the cape has a buffer.
 A buffer should take care of this issue. If you want to use these pins as 
 GPIO pins, you may be limited in speed due to the capacitance caused by the 
 loadig of the pins by the HDMI driver.
 They should function fine in most applications.


 

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: question about uart

2014-07-17 Thread jstampfl

Go to the Adafruit forum and search for Ultimate GPS, C programming

example to connect the Adafruit GPS to the BBB

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] PRUSS uart to read from ADAFRUIT Ultimate GPS

2014-07-15 Thread jstampfl
Example of reading data with PRUSS Uart.

Full code at:  https://github.com/jstampfl/Pruuart

/ pu.p V1

 // Use PRUSS uart to read data from ADAFRUIT Ultimate GPS
// reads data to nl, put in buffer and signal linux side.
.setcallreg r2.w0 // Going to use r31 for interrupt
.origin 0
.entrypoint TB
TB:
 ldi r20,0
 ldi r21,0
 ldi r22,0
 mov r0,0
 sbbo r0,r20,r21,4
 zero r0,64 //zero 16 registers
TB05:
 sbbo r0,r20,r21,64 //zero some of pru0 local memory
 add r21,r21,64 // for linux string functions
 add r22,r22,1
 qbgt TB05,r22,20
TB1:
 ldi r3,4 //Uart divisor =1250 = 0x04E2
 sbco r3,c7,0x24,4 // 9600 at 16x
 ldi r3,0xE2 //in DLL  DLH
 sbco r3,c7,0x20,4

 ldi r3,0x3 //LCR = 3, 8 none  1
 sbco r3,c7,0x0C,4 //

 mov r3,0x6001 //Power 
 sbco r3,c7,0x30,4 // = tx on, rx on  Free ot enable
 ldi r4,0
 ldi r5,0
 ldi r3,0
 ldi r20,0
 ldi r21,0
TB2:
 // r5 points to start of buffer
 // r4 is offset into buffer
 lbco r3,c7,0x14,4 //check LSR for date ready
 qbbc TB2,r3.t0

 lbco r3,c7,0,4 //data is ready, get from RBR
 sbbo r3,r5,r4,1 // and put in buffer
 add r4,r4,1

 qbne TB2,r3,0xA // do until nl received
 sbbo r20,r5,r4,1 // put null to terminate
 ldi r4,0 // zero buffer pointer
 mov r31.b0,35 // signal linux
 jmp TB2
TB9:
 
 mov r31.b0,35
 ldi r4,0x
 ldi r5,0
TB10:
 add r5,r5,1
 qbgt TB10,r5,r4 

 HALT
 


-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] PRUSS Uart write function added

2014-07-15 Thread jstampfl
Code at:  https://github.com/jstampfl/Pruuart


-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: PRUSS uart to read from ADAFRUIT Ultimate GPS

2014-07-15 Thread jstampfl
PRUSS Uart write function added.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] CYCLE counter to time pulse w/ HC-SR04

2014-07-12 Thread jstampfl
Here is an example of using the PRUSS cycle counter to time a pulse.

Files at:   github.org/jstampfl/Prutimer

here is the PRUSS code:

/ pt.p

 // To get the echo pulse on pin P8 15.
// assemble: pasm -v3 -b pt.p (could be pasm_2 if you follow directions
.setcallreg r29.w0 // Going to use r31 for interrupt
.origin 0
.entrypoint T811
#define CTRL 0x22000 //Start of control registers.
T811:
 mov r8,CTRL //set r8 for the lbbo 
 ldi r12, 0 // Local memory address for pru0 data memory
 ldi r2, 0 // zero to zero the cycle counter
TB1:
 qbbs TB1,r31,15 // wait here for echo line to go low

// WAIT FOR THE ECHO PULSE TB2:

 qbbc TB2,r31,15 // wait here for echo line to go high - start of pulse

// START THE CYCLE COUNTER

 lbbo r9,r8,0,4 // Get the control register
 set r9,3 // Set the cycle counter enable
 sbbo r9,r8,0,4 // Put back to the register to start

// WAIT FOR THE PULSE TO END

TB3:
 qbbs TB3,r31,15 // wait here until echo line goes low.

// STOP THE CYCLE COUNTER
 lbbo r9,r8,0,4 // get control register
 clr r9,3 // clear counter to disable
 sbbo r9,r8,0,4 // put back
 ldi r10,1 // not neccessary, was going to use as signal

// GET THE CYCLE COUNT AND PUT IN PRU0 LOCAL DATA MEMORY

 lbbo r11,r8,12,4 // get the CYCLE count
 sbbo r10,r12,0,8 // put r10  r11 (the unused signal  cycle count) in
 // pru0 data memory
 sbbo r2,r8,12,4 // Zero the cycle count

// SEND INTERRUPT SIGNAL TO LINUX SIDE

 mov r31.b0,35 //Send interrupt to Linux side

 lbbo r11,r12,8,4 // Check for end flag from Linux side
 qbne TB1,r11,2 // go back for more
TB4:
 halt
 

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] debian-7.5-console-armhf-2014-07-06.tar.xz

2014-07-11 Thread jstampfl
Ok, use -dtb beaglebone (but that has the wrong   conf_board setting.

Also, I am not clear if I should copy the download to the Debian release on 
my SD card and execute there.




-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] debian-7.5-console-armhf-2014-07-06.tar.xz

2014-07-10 Thread jstampfl
Looking at the directions to install:

I am not sure where to copy this download to begin the install.

I have a rev A5 BBB with the standard Angstrom software and a 8GB SD card 
with the ...7.5-2014-5-14... release installed.

I want to leave the Angstrom in place and install the 07-06 Debian on the 
SD card.

Do I copy to Debian running from the SDcard and follow the install steps?

Also looking in the hwpak folder, I see two possible conf files:  
beaglebone.conf and bbb-empty-eprom.conf.  For my case, Debian on SDcard, 
which should I use.

Also note that there is a difference in the beaglebone.conf file:

#!/bin/bash
#--dtb beaglebone (BeagleBone  BeagleBone Black:supported)

SYSTEM=bone

#Bootloader:
conf_board=am335x_evm



The 'conf_board=am335x_evm'   differs from the settings in other conf 
files;

for example:  bbb-empty-eprom.conf has:

#!/bin/bash
#--dtb beaglebone (BeagleBone  BeagleBone Black:supported)

SYSTEM=bone

#Bootloader:
conf_board=am335x_boneblack



-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: RFC: Universal Device Tree

2014-06-29 Thread jstampfl
Comment on PRUSS support:

in the Current (just downloaded June 30):

 /* P9_30 (ZCZ ball D12) */

(...)
P9_30_pruout_pin: pinmux_P9_30_pruout_pin {
pinctrl-single,pins = 0x198  0x25; }; /* Mode 5, 
Pull-Down, RxActive */
P9_30_pruin_pin: pinmux_P9_30_pruin_pin {
pinctrl-single,pins = 0x198  0x26; }; /* Mode 6, 
Pull-Down, RxActive */


I think that the pruout pin line should be:  0x198   0x05;  ];   
/*Mode 5,  Pull-Down, TxActive *


-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: GPIO dev/mem (mmap) on Beaglebone

2014-06-16 Thread jstampfl
I cannot get this mmap to work.  I think you left out a few steps.  For 
example what is the overlay you used for the DT?



On Friday, December 6, 2013 7:48:18 AM UTC+8, anuv...@gmail.com wrote:

 check this out:
 http://chiragnagpal.github.io/examples.html
 I have explained how to use /dev/mmap in beaglebone black


-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: where is omap! Beagle Bone Black rev C [HMC5883L 3-axis digital compass help]

2014-06-16 Thread jstampfl
Look at HMC5883L, C programming on the Adafruit BBB forum

On Sunday, June 15, 2014 9:25:45 AM UTC+8, Swazoo Claybon wrote:


 So I have been trying to interface a digital compass (Sainsmart 3-Axis 
 Digital Compass IC HMC5883L)*. *In order to do so I have been learning 
 about I2C devices and using Derek Molloy's [Beaglebone: An I2C tutorial - 
 Interfacing to a BMA180 Accelerometer] tutorial. He came to a part where he 
 went into /sys/devices/platform/omap from root. He did this to determine 
 whether or not the device has been hooked up properly as I have been trying 
 to do. Unfortunately, I don't have an omap. Does anyone know why, or if I 
 can get it from somewhere like github. 

 This is what shows up for me:

 
 root@beaglebone:/sys/devices/platform# ls
 alarmtimeromap-mailboxpower  uevent
 arm-pmu  omap-pcm-audioreg-dummy
 edma-dma-engine.0omap_hwspinlock.0serial8250
 nop_usb_xceivomapfbsnd-soc-dummy

 -

 Also if anybody has any resources on how to use the HMC5883L 3-axis 
 digital compass with Python, that would be much appreciated.


-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: GPIO dev/mem (mmap) on Beaglebone

2014-06-16 Thread jstampfl
Now working.  Just operator error.  Plugged into the wrong header.

I will share what I have:

overlay file  Modified from BB-GPIOHELP-00A0.dts for just P9.12.

*

* Copyright (C) 2013 Pantelis Antoniou pa...@antoniou-consulting.com
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
/dts-v1/;
/plugin/;

/ {
compatible = ti,beaglebone, ti,beaglebone-black;

/* identification */
part-number = BB-GPIOP912;
version = 00A0;

/* state the resources this cape uses */
exclusive-use =
/* the pin header uses */
P9.12,/* gpio */
/* the hardware IP uses */
gpio1_28;

fragment@0 {
target = am33xx_pinmux;
__overlay__ {
gpio_helper_pins: pinmux_gpio_helper_pins {
pinctrl-single,pins = 
0x078 0x07  /* P9.12 GPIO1_28:  
MODE7 | OUTPUT */
;
};
};  
};

fragment@2 {
target = ocp;
__overlay__ {

gpio_helper {
compatible = gpio-of-helper;
status = okay;
pinctrl-names = default;
pinctrl-0 = gpio_helper_pins;

/* declare your gpios */
test_led {
gpio-name = test_led;
gpio = gpio2 12 0x00;/* 
gpio2 is gpio1 */
output;
};

};
};
};
};


===
next the uEnv.txt file:

optargs=quiet drm.debug=7 capemgr.enable_partno=BB-GPIOP912


===

next the c program:  added the sleep(1) printf in between toggles.
this program was written by:  Chirag Nagpal


#include stdio.h
#include stdlib.h
#include sys/mman.h
#include sys/stat.h
#include fcntl.h 
#include beaglebone_gpio.h

int main(int argc, char *argv[]) {
volatile void *gpio_addr = NULL;
volatile unsigned int *gpio_oe_addr = NULL;
volatile unsigned int *gpio_setdataout_addr = NULL;
volatile unsigned int *gpio_cleardataout_addr = NULL;
unsigned int reg;
  
  int fd = open(/dev/mem, O_RDWR);

printf(Mapping %X - %X (size: %X)\n, GPIO1_START_ADDR, 
GPIO1_END_ADDR, GPIO1_SIZE);

gpio_addr = mmap(0, GPIO1_SIZE, PROT_READ | PROT_WRITE, 
MAP_SHARED, fd, GPIO1_START_ADDR);

gpio_oe_addr = gpio_addr + GPIO_OE;
gpio_setdataout_addr = gpio_addr + GPIO_SETDATAOUT;
gpio_cleardataout_addr = gpio_addr + GPIO_CLEARDATAOUT;

if(gpio_addr == MAP_FAILED) {
printf(Unable to map GPIO\n);
exit(1);
}
printf(GPIO mapped to %p\n, gpio_addr);
printf(GPIO OE mapped to %p\n, gpio_oe_addr);
printf(GPIO SETDATAOUTADDR mapped to %p\n, 
gpio_setdataout_addr);
printf(GPIO CLEARDATAOUT mapped to %p\n, 
gpio_cleardataout_addr);

reg = *gpio_oe_addr;
printf(GPIO1 configuration: %X\n, reg);
reg = reg  (0x - PIN);
*gpio_oe_addr = reg;
printf(GPIO1 configuration: %X\n, reg);

printf(Start toggling PIN \n);
while(1) {

*gpio_setdataout_addr= PIN;
printf(on\n);
sleep(1);
*gpio_cleardataout_addr = PIN;
printf(off\n);
sleep(1);
  }

close(fd);
return 0;
}



On Monday, June 16, 2014 8:36:35 PM UTC+8, jsta...@gmail.com wrote:

 I cannot get this mmap to work.  I think you left out a few steps.  For 
 example what is the overlay you used for the DT?



 On Friday, December 6, 2013 7:48:18 AM UTC+8, anuv...@gmail.com wrote:

 check this out:
 http://chiragnagpal.github.io/examples.html
 I have explained how to use /dev/mmap in beaglebone black



-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.