Where are you getting R30 from?
Grab your book (SPRUHF8A "AM335x PRU-ICSS Reference Guide") and follow
along in-line.
Charles,
Success! Thanks very much. To be clear all I did was to write:
#define CONST_PRUCFG C4
This is creating a human-readable version of a constant table entry.
The constants are defined in table 9 section 5.2.1, page 25.
#define is documented in section 5.3.2.2.3, page 41.
LBCO r0, CONST_PRUCFG, 4, 4
According to section 5.3.4.2.6 on page 64, this will copy 4 bytes into
Register 0, starting with the address C4 + 4. From the constant table,
above, we know that C4 = 0x0002_6000 or the start of the PRU_ICSS_CFG
registers (section 10).
Section 10.1 on page 272 indicates that offset 4 into the PRU_ICSS_CFG
register bank is the SYSCFG register.
CLR r0, r0, 4
Section 10.1.2 on page 274 indicates bit 4 is the STANDBY_INIT bit for
the initiator (the hardware that lets the PRU read and write data from
the SoC). Clearing this bit enables the interface.
SBCO r0, CONST_PRUCFG, 4, 4
This is the corollary to the LBCO instruction, above, and writes 4 bytes
from R0 into the SYSCFG register, enabling the desired change.
From what I've read this clears a bit in R30, yes? If so does that
conflict w/ R30.w0 when used as a return from a CALL?
You do have to be careful about messing with R30 (or whichever register
you use as the CALL register...see section 5.3.2.1.4 if you want to
change it). Remember there's no stack (unless you make one), so you
can't nest calls and returns.
Nothing in the above code modifies R30, however.