Hi,
I've recently started using the PRUs on my beaglebone. To start with, I want to write to the PRU GPOs and read from PRU GPIs which are pinned out to the p8 and P9 headers on the beaglebone. So far, I managed to get the writing to the GPOs part working. It's the reading from the GPIs, I'm having trouble with.
For example, say I want to read from P8 header pin #46 to which I input a square wave with a function generator. This corresponds to the signal GPIO_2_7.
I set the multiplexing of this signal to use the signal: pr1_pru1_pru_r31_1 which corresponds to multiplex mode 6. Then, in my PRU code, I try to read R31 and write it into PRU1 local DRAM as follows:
MOV r0, R31
SBCO r0, CONST_PRUDRAM, 0, 4
I expect to see the value at the memory location in the memory browser to toggle between 0x00000000 and 0x00000002 (toggling of bit 1). But, this is not happening and the value at the memory location stays at 0x00000000. There is no toggling as apparently I'm not reading the signal which is coming to that pin.
Can anyone point out if I'm missing something crucial ? I really don't see why this is not working. I did a very similar thing the other way around to toggle the GPO of the PRUs and measured it with an oscilloscope...
Thanks