Greg,

Suman added a simple debug interface for remoteproc at 
'/sys/kernel/debug/remoteproc/'.

On the BBB (AM335x) there are three devices available at that folder: 
remoteproc0 (the wakeup M3 core), remoteproc1 (PRU0), and remoteproc2 
(PRU1). You can verify which is which by the 'name' file in each folder:
cat /sys/kernel/debug/remoteproc/remoteproc1/name

You can dump some control registers (CTRL, Program Counter, etc.) while the 
PRU is running by reading the 'regs' file:
cat /sys/kernel/debug/remoteproc/remoteproc1/regs

To halt a PRU, write a 1 to the single_step file. This will halt the PRU 
and allow you to dump the full register set:
echo 1 > /sys/kernel/debug/remoteproc/remoteproc1/single_step
cat /sys/kernel/debug/remoteproc/remoteproc1/regs

You can continue single stepping through code and dumping the registers by 
repeating the two lines above.

To run the PRU core again just write a 0 to the single_step file:
echo 0 > /sys/kernel/debug/remoteproc/remoteproc1/single_step

Jason Reeder



On Wednesday, December 21, 2016 at 8:21:14 AM UTC-6, Greg wrote:
>
> Hello, a quick question on operating PRUs via the RemoteProc framework on 
> Beaglebone:
>
> Is there a command via RemoteProc which will stop execution of firmwares 
> running on the PRU(s)?
>
> There are bind and unbind capability in sys:
>
> echo "4a334000.pru0" > /sys/bus/platform/drivers/pru-rproc/bind
> echo "4a338000.pru1" > /sys/bus/platform/drivers/pru-rproc/bind
>
> echo "4a334000.pru0" > /sys/bus/platform/drivers/pru-rproc/unbind
> echo "4a338000.pru1"  > /sys/bus/platform/drivers/pru-rproc/unbind
>
> The unbind appears to disconnect RPMsg (character devices gone), but it 
> does not halt the PRU!
>
> So after unbind, I am doing this:
>
> sudo rmmod pru_rproc
> sudo rmmod pruss
>
> So after removing pruss the PRUs appear to halt.
> So that is a total of 3 commands to halt a PRU.
>
> So what I am looking for is a RemoteProc framework capability to halt the 
> PRU(s) from user-space.
> If there is none, I will use the rmmod commands as above.  I'm hoping I am 
> missing a simpler method.
>
> Regards,
> Greg
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/c7700470-495f-442e-a427-f6d41476a035%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to