Fred: Using the PRU interface is faster. I think my students measured it as being a couple times faster. Using the PRU interface you can toggle a pin every 5ns.
--Mark On Tuesday, November 20, 2018 at 8:22:58 AM UTC-5, Fred Gomes wrote: > > Oh, sorry, my bad. It was related with the pin's configurations. > Can you tell me what's the difference between using the OCP interface or > usual PRU interface? Both allow to controlling the pins at the same speed > rate? > > Thanks, > Fred Gomes > > Mark A. Yoder <[email protected] <javascript:>> escreveu no dia > segunda, 19/11/2018 à(s) 17:12: > >> Fred: >> It's odd that you have the code from chapter 2 working, but not the >> code in chapter 6. How is the LED wired to P9_11? >> Did you config-pin P9_11 for gpio and not pruout? Is P9_11 configgid for >> output? >> >> The Technical Reference Manual has a link in the *References * section >> at the beginning of chapter 6. ( >> https://www.ti.com/lit/ug/spruh73p/spruh73p.pdf) >> >> Can you show the commands you used to run the example? >> >> --Mark >> >> On Sunday, November 18, 2018 at 3:35:52 PM UTC-5, Fred Gomes wrote: >>> >>> Hi Jason, >>> >>> Thank you very much for your answer. >>> I think we are running similar versions of the kernel since our PRU >>> configurations seem to be about the same. >>> >>> So, I installed the Debian 9.5 2018-10-07 4GB SD IoT image and I am >>> using the 4.14 kernel version. >>> >>> I took a look at the article from you have sent me and it seems to work. >>> In the section "02start" I could set the USR3 led blinking, although in the >>> section "06io" I couldn't >>> set the P9.11 LED blinking, I follow his instructions and it didn't >>> work, do you have any inkling what might I do wrong? >>> >>> From what I have seen, he separates the registers by addresses, as >>> described above: >>> >>> #define GPIO0 0x44e07000 // GPIO Bank 0 >>> #define GPIO1 0x4804c000 // GPIO Bank 1 >>> #define GPIO2 0x481ac000 // GPIO Bank 2 >>> #define GPIO3 0x481ae000 //GPIO Bank 3 >>> >>> He says to check the Table 2.2 of TRM, do you know where it is? I think >>> the failure might be in the address for accessing the GPIO0, which might >>> be different on my kernel version. >>> >>> Additionally, can you tell me what you've done with PRU? ... What I do >>> want to achieve is to build an SPI slave interface (for reading data from >>> image sensors). >>> >>> Thank you very much for your help, >>> Fred Gomes >>> >>> >>> Jason Kridner <[email protected]> escreveu no dia quinta, >>> 15/11/2018 à(s) 18:57: >>> >>>> On Thu, Nov 15, 2018 at 9:38 AM Bill Bitner <[email protected]> wrote: >>>> > >>>> > Hi Fred! >>>> > >>>> > What version of the linux kernel are you using? It makes a large >>>> > difference as the kernel interfaces have changed. >>>> > My experience may not apply to your's but I can share it with you. >>>> > I have a beagle board black. The board booted fine and then I >>>> installed >>>> > the latest at the time "debian 9.4 lxqt". The board booted fine. >>>> The PRU >>>> > compilers where *already* installed. However, I could not access >>>> the PRU >>>> > from the device tree. From >>>> > https://markayoder.github.io/PRUCookbook/ >>>> > In Mark's excellent guide, I was able to see the following >>>> instructions >>>> > in the Makefile. >>>> > """ >>>> > # Lookup PRU by address >>>> > ifeq ($(PRUN),0) >>>> > PRU_ADDR=4a334000 >>>> > endif >>>> > ifeq ($(PRUN),1) >>>> > PRU_ADDR=4a338000 >>>> > endif >>>> > >>>> > PRU_DIR=$(wildcard >>>> /sys/devices/platform/ocp/4a32600*.pruss-soc-bus/4a300000.pruss/$(PRU_ADDR).*/remoteproc/remoteproc*) >>>> > """ >>>> > >>>> > I could not see these addresses despite modifications to the uEnv.txt >>>> file. I finally discovered that despite booting from the SD card, >>>> > the boot process would use information from the built-in flash chip. >>>> Once I zeroed out the on-board flash chip, (using the following) >>>> > sudo dd if=/dev/zero of=/dev/mmcblk1 count=1 seek=1 bs=128k >>>> > I could make changes to the uEnv.txt file and everything started >>>> working as one would expect. >>>> >>>> Typically (unless the bootloader on the microSD also tries to load >>>> from eMMC), you can hold down the BOOT/SD/S2 button when applying >>>> power (release right after applying power) and it will force the >>>> bootloader on the eMMC to be ignored. >>>> >>>> > >>>> > Bill Bitner >>>> > >>>> > On Wed, Nov 14, 2018 at 8:19 PM <[email protected]> wrote: >>>> >> >>>> >> Hi guys, >>>> >> >>>> >> I am having some problems in getting started with PRU. >>>> >> >>>> >> So, first of all, I installed one PRU compiler (CSS) (I follow this >>>> article: >>>> http://processors.wiki.ti.com/index.php/PRU_Training:_Hands-on_Labs >>>> >> >>>> >> After having the compiled the file, and from what I've read >>>> throughout the internet, I thought that in order to run a program into the >>>> PRU I should simply do: >>>> >> >>>> >> - cp mycode.out /lib/firmware/am335x-pru0-fw >>>> >> - echo 'start' > /sys/class/remoteproc/remoteproc1/state >>>> >> >>>> >> However, If I try it with a code to blink a led it does nothing >>>> (example of the code for blinking a LED above). >>>> >> >>>> >> volatile register unsigned int __R30; >>>> >> >>>> >> int main(void) { >>>> >> __R30 = SET_MASK; >>>> >> >>>> >> while(1) { >>>> >> __R30 = __R30 & ~(SET_MASK); >>>> >> __delay_cycles(100000000); // half-second delay >>>> >> } >>>> >> } >>>> >> >>>> >> I've also tried to follow this tutorial: >>>> http://www.righto.com/2016/09/how-to-run-c-programs-on-beaglebones.html >>>> >> and I get an error when I do: ./loader text.bin data.bin, it says >>>> an error message of "prudrv failed to open". But I can't quit understand >>>> what that program does. >>>> >> >>>> >> Can anyone tell me what am I doing wrong ? >>>> >> >>>> >> Thanks you very much, >>>> >> Fred Gomes >>>> >> >>>> >> -- >>>> >> 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 [email protected]. >>>> >> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/beagleboard/467fd871-1c67-489b-9fad-82104bfd7ba2%40googlegroups.com >>>> . >>>> >> For more options, visit https://groups.google.com/d/optout. >>>> > >>>> > -- >>>> > 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 [email protected]. >>>> > To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/beagleboard/CAOYP4di%2BoF5UDX2pv1yd9A5FGyogt31yi_ekXUokFjfxYMq%3DFA%40mail.gmail.com >>>> . >>>> > For more options, visit https://groups.google.com/d/optout. >>>> >>>> -- >>>> For more options, visit http://beagleboard.org/discuss >>>> --- >>>> You received this message because you are subscribed to a topic in the >>>> Google Groups "BeagleBoard" group. >>>> To unsubscribe from this topic, visit >>>> https://groups.google.com/d/topic/beagleboard/2M6ae9KCfiM/unsubscribe. >>>> To unsubscribe from this group and all its topics, send an email to >>>> [email protected]. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/beagleboard/CA%2BT6QPn8uYRZr-W%3DYm8FBtp_2sZbghR%3Du3KiwuUnsOq_SvRc8Q%40mail.gmail.com >>>> . >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> -- >> For more options, visit http://beagleboard.org/discuss >> --- >> You received this message because you are subscribed to a topic in the >> Google Groups "BeagleBoard" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/beagleboard/2M6ae9KCfiM/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> [email protected] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/beagleboard/2ebcd20f-e7e2-4a68-af72-8207c0a06db4%40googlegroups.com >> >> <https://groups.google.com/d/msgid/beagleboard/2ebcd20f-e7e2-4a68-af72-8207c0a06db4%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/30d8c61f-cbd4-4af3-bca8-bc257be6a8c1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
