One question 

On what pru you are running your code? 0 or 1?
For p9_27 must be pru0

There was something on dmesg?

Sent from my iPhone


> Em 17 de jan. de 2021, à(s) 19:54, Pedro Henrique Fonseca Bertoleti 
> <[email protected]> escreveu:
> 
> 
> Hi Vinicius. The code I've used is the same as available here: 
> https://github.com/derekmolloy/exploringBB/blob/version2/chp15/pru/blinkLED/blinkLED.c
> 
> And yes, I've confirmed and P9_27 (GPIO to wire the LED) was configured as 
> pruout.
> 
> 
> Best Regards,
> Pedro Bertoleti
> 
>> Em dom., 17 de jan. de 2021 às 18:14, Vinicius Juvinski 
>> <[email protected]> escreveu:
>> Could you please share your code ?
>> 
>> Have you checked with confit-pin or show-pins to confirm there are as pru 
>> out ?
>> 
>> Sent from my iPhone
>> 
>> 
>>> Em 17 de jan. de 2021, à(s) 18:40, Pedro Henrique Fonseca Bertoleti 
>>> <[email protected]> escreveu:
>>> 
>>> 
>>> Hi Vinicius.
>>> 
>>> Some minutes ago I was able to make it work. I tried to compile a custom 
>>> firmware, flash it to pru (through remoteproc) and start it, and I've got 
>>> success innchange state value.
>>> 
>>> However, I'm not able to control (on/off) a LED in BeagleBone Green 
>>> Wireless. I've set in config_pin the gpio P9_27 to pruout successfully, but 
>>> I've got no lucky in controlling the LED I've wired to this gpio. I'll try 
>>> to do it in BeagleBone Black, and I'll follow pru cook book as you 
>>> recommended.
>>> 
>>> Thanks!
>>> 
>>> Em dom, 17 de jan de 2021 18:32, Vinicius Juvinski 
>>> <[email protected]> escreveu:
>>>> Hi Pedro,
>>>> 
>>>> I didn't find the source code for this firmware.
>>>> I recommend you install the TI's Code Composer Studio 
>>>> (https://www.ti.com/design-resources/embedded-development/ccs-development-tools.html)
>>>> And follow the PRU cookbook. The book from Derek's if is the first edition 
>>>> if I am not wrong, is focused on kernel 3.18, I bought the second edition 
>>>> and this is updated to 4.14 version.
>>>> So to start with PRU I really recommend the PRUCookbook + CCS.
>>>> 
>>>> Best regards.
>>>> 
>>>>> Em dom., 17 de jan. de 2021 às 14:27, phfbertoleti 
>>>>> <[email protected]> escreveu:
>>>>> Vinicius, here follows the output of version.sh:
>>>>> 
>>>>> 
>>>>> -----------
>>>>> debian@beaglebone:/opt/scripts/tools$ sudo ./version.sh 
>>>>> [sudo] password for debian: 
>>>>> git:/opt/scripts/:[b39ec679648a6be8f25f48bd1c9784c1fc5a0c46]
>>>>> eeprom:[A335BNLTGW1ABBGW16054623]
>>>>> model:[TI_AM335x_BeagleBone_Green_Wireless]
>>>>> dogtag:[BeagleBoard.org Debian Buster IoT Image 2020-04-06]
>>>>> bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 
>>>>> 2019.04-00002-g07d5700e21]:[location: dd MBR]
>>>>> UBOOT: Booted Device-Tree:[am335x-bonegreen-wireless-uboot-univ.dts]
>>>>> UBOOT: Loaded Overlay:[AM335X-PRU-RPROC-4-19-TI-00A0]
>>>>> UBOOT: Loaded Overlay:[BB-ADC-00A0]
>>>>> UBOOT: Loaded Overlay:[BB-BBGW-WL1835-00A0]
>>>>> UBOOT: Loaded Overlay:[BB-BONE-eMMC1-01-00A0]
>>>>> kernel:[4.19.94-ti-r42]
>>>>> nodejs:[v10.15.2]
>>>>> /boot/uEnv.txt Settings:
>>>>> uboot_overlay_options:[enable_uboot_overlays=1]
>>>>> uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-19-TI-00A0.dtbo]
>>>>> uboot_overlay_options:[enable_uboot_cape_universal=1]
>>>>> pkg check: to individually upgrade run: [sudo apt install --only-upgrade 
>>>>> <pkg>]
>>>>> pkg:[bb-cape-overlays]:[4.14.20200814.0-0~buster+20200814]
>>>>> pkg:[bb-wl18xx-firmware]:[1.20200813.1-0~buster+20200813]
>>>>> pkg:[kmod]:[26-1]
>>>>> pkg:[librobotcontrol]:[1.0.5-git20200715.0-0~buster+20200716]
>>>>> pkg:[firmware-ti-connectivity]:[20190717-2rcnee1~buster+20200305]
>>>>> groups:[debian : debian adm kmem dialout cdrom floppy audio dip video 
>>>>> plugdev users systemd-journal bluetooth netdev i2c gpio pwm eqep 
>>>>> remoteproc admin spi iio docker tisdk weston-launch xenomai cloud9ide]
>>>>> cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 
>>>>> root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M 
>>>>> net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet]
>>>>> dmesg | grep remote
>>>>> [   11.585512] remoteproc remoteproc0: 4a334000.pru is available
>>>>> [   11.605383] remoteproc remoteproc1: 4a338000.pru is available
>>>>> [   60.745582] remoteproc remoteproc2: wkup_m3 is available
>>>>> [   60.840333] remoteproc remoteproc2: powering up wkup_m3
>>>>> [   60.840364] remoteproc remoteproc2: Booting fw image 
>>>>> am335x-pm-firmware.elf, size 217168
>>>>> [   60.840611] remoteproc remoteproc2: remote processor wkup_m3 is now up
>>>>> dmesg | grep pru
>>>>> [   11.585512] remoteproc remoteproc0: 4a334000.pru is available
>>>>> [   11.585705] pru-rproc 4a334000.pru: PRU rproc node pru@4a334000 probed 
>>>>> successfully
>>>>> [   11.605383] remoteproc remoteproc1: 4a338000.pru is available
>>>>> [   11.605571] pru-rproc 4a338000.pru: PRU rproc node pru@4a338000 probed 
>>>>> successfully
>>>>> dmesg | grep pinctrl-single
>>>>> [    0.945761] pinctrl-single 44e10800.pinmux: 142 pins, size 568
>>>>> dmesg | grep gpio-of-helper
>>>>> [    0.958228] gpio-of-helper ocp:cape-universal: ready
>>>>> lsusb
>>>>> Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
>>>>> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>>>>> END
>>>>> -----------
>>>>> 
>>>>>> Em domingo, 17 de janeiro de 2021 às 02:11:21 UTC-4, 
>>>>>> [email protected] escreveu:
>>>>>> 
>>>>>> Please send the result of version.sh under opt/scripts
>>>>>>> Em dom., 17 de jan. de 2021 às 03:07, Pedro Henrique Fonseca Bertoleti 
>>>>>>> <[email protected]> escreveu:
>>>>>>> Thanks!
>>>>>>> 
>>>>>>> In this reference, I can see a custom firmware has been developes and a 
>>>>>>> header file was missing in its code. However, in my case, I'm using a 
>>>>>>> firmware which is in /lib/firmware by default (am335x-pru1-fw). I 
>>>>>>> assume this firmware works, once it comes with distro (I'm using 
>>>>>>> official image provided in BeagleBone site).
>>>>>>> 
>>>>>>> Why am I getting this error with a firmware it's supposed to work? 
>>>>>>> Please, would you shed some light on it? 
>>>>>>> 
>>>>>>> 
>>>>>>> Best Regards.
>>>>>>> 
>>>>>>> Em dom, 17 de jan de 2021 03:00, Vinicius Juvinski 
>>>>>>> <[email protected]> escreveu:
>>>>>>> 
>>>>>>>> Yes ,the answer is there - 4.2
>>>>>>>> 
>>>>>>>>> Em dom., 17 de jan. de 2021 às 01:55, Pedro Henrique Fonseca 
>>>>>>>>> Bertoleti <[email protected]> escreveu:
>>>>>>>>> Sorry, I couldn't find any information on this error 22 on PRU cook 
>>>>>>>>> book. Please, anyone can help me on handling this error?
>>>>>>>>> 
>>>>>>>>> Em dom, 17 de jan de 2021 01:46, Vinicius Juvinski 
>>>>>>>>> <[email protected]> escreveu:
>>>>>>>>> 
>>>>>>>>>> Hi Pedro,
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> You are having error 22 - I don’t remember right now the cause , the 
>>>>>>>>>> prucookbook has the explanation and how to fix :)
>>>>>>>>>> 
>>>>>>>>>>> Em dom., 17 de jan. de 2021 às 00:59, phfbertoleti 
>>>>>>>>>>> <[email protected]> escreveu:
>>>>>>>>>>> Hi vinicius. 
>>>>>>>>>>> 
>>>>>>>>>>> First of all, thanks for the reply and for indicating me PRU cook 
>>>>>>>>>>> book. 
>>>>>>>>>>> Regarding dmesg messages, yes, I've checked them (as shown below). 
>>>>>>>>>>> It seems PRUs are available for use, am I right?
>>>>>>>>>>> What do you recommend as a hello world test for PRU? 
>>>>>>>>>>> 
>>>>>>>>>>> ---------------------
>>>>>>>>>>> [   11.169923] remoteproc remoteproc0: 4a334000.pru is available
>>>>>>>>>>> [   11.171927] remoteproc remoteproc1: 4a338000.pru is available
>>>>>>>>>>> [   60.948771] remoteproc remoteproc2: wkup_m3 is available
>>>>>>>>>>> [   60.956133] remoteproc remoteproc2: powering up wkup_m3
>>>>>>>>>>> [   60.956160] remoteproc remoteproc2: Booting fw image 
>>>>>>>>>>> am335x-pm-firmware.elf, size 217168
>>>>>>>>>>> [   60.956412] remoteproc remoteproc2: remote processor wkup_m3 is 
>>>>>>>>>>> now up
>>>>>>>>>>> [  454.023370] remoteproc remoteproc1: powering up 4a338000.pru
>>>>>>>>>>> [  454.027965] remoteproc remoteproc1: loading 
>>>>>>>>>>> /lib/firmware/am335x-pru1-fw failed with error -22
>>>>>>>>>>> [  454.027986] remoteproc remoteproc1: Direct firmware load for 
>>>>>>>>>>> am335x-pru1-fw failed with error -22
>>>>>>>>>>> [  454.028006] remoteproc remoteproc1: request_firmware failed: -22
>>>>>>>>>>> [  454.043116] remoteproc remoteproc1: Boot failed: -22
>>>>>>>>>>> ---------------------
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> Best Regards,
>>>>>>>>>>> Pedro Bertoleti
>>>>>>>>>>> 
>>>>>>>>>>>>> Em sábado, 16 de janeiro de 2021 às 23:05:07 UTC-4, 
>>>>>>>>>>>>> [email protected] escreveu:
>>>>>>>>>>>>> Hi Pedro,
>>>>>>>>>>>>> 
>>>>>>>>>>>>> I recommend you take a look at 
>>>>>>>>>>>>> https://markayoder.github.io/PRUCookbook/
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Have you checked the dmesg to see what is happening at kernel 
>>>>>>>>>>>>> level ?
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Em sáb., 16 de jan. de 2021 às 23:25, phfbertoleti 
>>>>>>>>>>>>> <[email protected]> escreveu:
>>>>>>>>>>>>> Hi everyone.
>>>>>>>>>>>>> 
>>>>>>>>>>>>> My name is Pedro and I'm from Brazil. I'm trying to learn how to 
>>>>>>>>>>>>> use PRUs in BeagleBone (I'm using BeagleBone Green Wireless now) 
>>>>>>>>>>>>> and I'm facing a problem I cannot solve.
>>>>>>>>>>>>> 
>>>>>>>>>>>>> I'm reading Derek Molloy's book (Exploring BeagleBone) and one of 
>>>>>>>>>>>>> the first examples / "hello world"-like is checking which 
>>>>>>>>>>>>> firmware is loaded in PRU0 and start it. However, when I try to 
>>>>>>>>>>>>> do this, I get "write error: Invalid argument" as error output:
>>>>>>>>>>>>> 
>>>>>>>>>>>>> debian@beaglebone:/sys/class/remoteproc/remoteproc1$ cat firmware 
>>>>>>>>>>>>> am335x-pru1-fw
>>>>>>>>>>>>> debian@beaglebone:/sys/class/remoteproc/remoteproc1$ echo 'start' 
>>>>>>>>>>>>> > state
>>>>>>>>>>>>> -bash: echo: write error: Invalid argument
>>>>>>>>>>>>> 
>>>>>>>>>>>>> What am I doing wrong? I would like to see "running" at state 
>>>>>>>>>>>>> value, in order to be sure PRU0 is working.
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Here follows some useful information:
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Kernel version: 4.19.94-ti-r42
>>>>>>>>>>>>> Dmesg output related to remoteproc:
>>>>>>>>>>>>> 
>>>>>>>>>>>>> ---------------------
>>>>>>>>>>>>> [   11.169923] remoteproc remoteproc0: 4a334000.pru is available
>>>>>>>>>>>>> [   11.171927] remoteproc remoteproc1: 4a338000.pru is available
>>>>>>>>>>>>> [   60.948771] remoteproc remoteproc2: wkup_m3 is available
>>>>>>>>>>>>> [   60.956133] remoteproc remoteproc2: powering up wkup_m3
>>>>>>>>>>>>> [   60.956160] remoteproc remoteproc2: Booting fw image 
>>>>>>>>>>>>> am335x-pm-firmware.elf, size 217168
>>>>>>>>>>>>> [   60.956412] remoteproc remoteproc2: remote processor wkup_m3 
>>>>>>>>>>>>> is now up
>>>>>>>>>>>>> [  454.023370] remoteproc remoteproc1: powering up 4a338000.pru
>>>>>>>>>>>>> [  454.027965] remoteproc remoteproc1: loading 
>>>>>>>>>>>>> /lib/firmware/am335x-pru1-fw failed with error -22
>>>>>>>>>>>>> [  454.027986] remoteproc remoteproc1: Direct firmware load for 
>>>>>>>>>>>>> am335x-pru1-fw failed with error -22
>>>>>>>>>>>>> [  454.028006] remoteproc remoteproc1: request_firmware failed: 
>>>>>>>>>>>>> -22
>>>>>>>>>>>>> [  454.043116] remoteproc remoteproc1: Boot failed: -22
>>>>>>>>>>>>> ---------------------
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Thanks in advance.
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Best Regards,
>>>>>>>>>>>>> Pedro Bertoleti
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>>>> -- 
>>>>>>>>>>>>> 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/7c2be7bd-63f3-4798-85dd-e5be63d86831n%40googlegroups.com.
>>>>>>>>>>> 
>>>>>>>>>>> -- 
>>>>>>>>>>> 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/8e94c2a0-287a-4c6c-8342-87a7f6a9fcabn%40googlegroups.com.
>>>>>>>>>> 
>>>>>>>>>> -- 
>>>>>>>>>> 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/CAB6xwCr3DMGwQD0%2Be5dxHMZJHy6roXgRDHYAvYpJJuqTPw175w%40mail.gmail.com.
>>>>>>>>> 
>>>>>>>>> -- 
>>>>>>>>> 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/CAJK9pqdUcG%2Bi9zZBzqU5VFQDJM2R5Hu0WYwFc2jwT4q7M8nnkg%40mail.gmail.com.
>>>>>>>> 
>>>>>>>> -- 
>>>>>>>> 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/CAB6xwCqFvpRVanfBe4w-1y3vomgrb1Jax%2BzPBfJ%2BNrXsir4vgQ%40mail.gmail.com.
>>>>>>> 
>>>>>>> -- 
>>>>>>> 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/CAJK9pqe7H1Ty9uJ%2BJt64SS-NQPXxsYYKFDtyE5w2PejDttx6rA%40mail.gmail.com.
>>>>> 
>>>>> -- 
>>>>> 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/817c90c7-bae5-451c-a23e-63328b5e5ba5n%40googlegroups.com.
>>>> 
>>>> -- 
>>>> 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/CAB6xwCrAGGhftOKszVGwSC6b0_rqZ3zgsM72B3nFWfAY5hq%3D4g%40mail.gmail.com.
>>> 
>>> -- 
>>> 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/CAJK9pqe6xKAMptg08fgEJOErb_asnXjGr8%3D_PE17ouJS7MVEeA%40mail.gmail.com.
>> 
>> -- 
>> 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/A1A206EB-7F82-4CA8-A75E-4CBC3AB8D6FB%40gmail.com.
> 
> 
> -- 
> Atenciosamente,
> 
> Pedro Bertoleti
> (http://pedrobertoleti.com.br/)
> -- 
> 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/CAJK9pqfG1z9b9DRi4Cjq9aWxFUySe0vYn9ycVgK41ffNkgBZ6A%40mail.gmail.com.

-- 
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/FD5712BD-A767-4133-ADF8-1C68F8866854%40gmail.com.

Reply via email to