PRU Peripheral Registers Offsets

Hello,

I’m trying to get PRU0 on my BBB to access UART1. I’m pretty confused as to what register offsets I should be using. The offsets listed in the PRU Reference Guide and theAM335x Technical Reference Manual for the UART’s are fairly different.

For example, if I was to try access the UART Mode Definition registers, according to the PRU ref guide its at offset 0x34 and according to the AM335x TRM there is three of these registers located at 0x20, 0x24, 0x80.

Can someone clarify which registers offsets are correct to use?

they are different because they are different peripherals. offset 0x34 is for an integrated peripheral in the PRUSS. The other register offsets are for the UART/ IrDA module.

So am I right in assuming that the PRU can access the peripherals on the L4_PER memory map. Otherwise why would the constant table exist?

How does the PRU distinguish between which offsets to use for UART access?

Simplest way would be to use the UART integrated in the PRUSS as it uses the same pins as UART1. Use the register offsets given in the PRU Reference Manual