PRU Assembly Question.

I have had some experience with Microchip Assembly (PIC) language in the past and am trying to familiarize myself better with the TI PRU instruction set. One particular feature the PIC had was the ‘movlw’ instruction (or literal to work register), which allowed you to basically turn on or off a whole bank of associated GPIO pins in a single instruction (i.e. movlw b’101010’).

Does anyone know if the TI instruction set has something similar (and perhaps I am missing it) ? Or does each register need to be configured/turned on/off one by one ?

In order to familiarize yourself with the PRU, the AM335x PRU-ICSS Reference Guide is a must (see https://github.com/beagleboard/am335x_pru_package). In the reference guide section 5.2.2 it describes the control of all GPIO pins accessible directly from the PRU — they are all set and cleared using the bits of CPU register r30. This means that any instruction that can affect register r30 can be used to affect the state of the GPIO pins.

If you are talking about the GPIO pins beyond those that are directly tied to the PRU, you will find that they are updated the same way from the PRU as they are from the ARM processor.

All pru GPIO are accessible via a single register, so it's one tick,just like any other register (two for loading a 32 bit immediate value).

Arm GPIO are never accessible in a single tick since there way outside the Pru and have to go over the OCP bus. See http://nomel.tumblr.com/post/30006622413/beaglebone-tutorial-accessing-main-memory-from-the-pru

All pru GPIO are accessible via a single register, so it’s one tick,just like any other register (two for loading a 32 bit immediate value).

Arm GPIO are never accessible in a single tick since there way outside the Pru and have to go over the OCP bus. See http://nomel.tumblr.com/post/30006622413/beaglebone-tutorial-accessing-main-memory-from-the-pru

Thanks. There is a wiki linked from http://beagleboard.org/pru you might want to examine/edit.