I would like to ask for some help getting the PRUs working on my BeagleBone Black Rev C. I have a very simple C loader program using the PRU Linux Appication Loader API, which looks like this:
#define PRU_NUM 0
const tpruss_intc_initdata pruss_intc_initdata=PRUSS_INTC_INITDATA;
printf(“prussdrv_init() returned %d\n”, retval);
printf(“prussdrv_open() returned %d\n”, retval);
printf(“prussdrv_pruintc_init() returned %d\n”, retval);
printf(“prussdrv_exec_program() returned %d\n”, retval);
printf(“PRU program completed, event number: %d\n”, n);
“asmtest2.bin” is the binary which should be loaded onto PRU0 and it consist of a single HALT instruction, for testing purposes.
Basically, my loader program fails at prussdrv_open(), which returns -1, i.e. it fails. The next function call, “prussdrv_pruintc_init()” causes a segmentation fault. Please note that the PRU program (asmtest2.bin) is not causing the problem since the loader program does not even get to the line which contains its name.
I beleive that I have enabled the PRU, because I uncommented the following line in /boot/uEnv.txt (and then rebooted):
I have also tried uncommenting or adding these lines in the same file:
The DTBO files indicated above exist.
I have also tried running the loader application as an administrator. None of these had any effect.
Can you help me figure out what is causing the problem?
My Linux version is: Linux version 4.9.82-ti-r102 (root@b2-am57xx-beagle-x15-2gb) (gcc version 6.3.0 20170516 (Debian 6.3.0-18) )
Thanks and regards