SPRUIM2H May 2020 – October 2023 AM2431 , AM2432 , AM2434 , AM6411 , AM6412 , AM6421 , AM6422 , AM6441 , AM6442
The PRU uses the R30 and R31 registers to interface with the Peripheral I/F. Table 6-423 shows the R31 and R30 interface for the Peripheral I/F RX mode, and Table 6-424 shows the comparable interface for the TX mode.
Register | Bits | Field name | Description |
---|---|---|---|
R31 | 31-30 | Reserved | PRU Host Interrupts 1/0 from local INTC |
29 | ovf2 | Overflow Flag for Channel 2. Write 1 to clear. | |
28 | ovf1 | Overflow Flag for Channel 1. Write 1 to clear. | |
27 | ovf0 | Overflow Flag for Channel 0. Write 1 to clear. | |
26 | val2 | Valid Flag for Channel 2. Write 1 to clear. | |
25 | val1 | Valid Flag for Channel 1. Write 1 to clear. | |
24 | val0 | Valid Flag for Channel 0. Write 1 to clear. | |
23-16 | rx_data_out2 | Oversampled Data Output for Channel 2. Note: These bits are shared with the TX Interface. When TX_FIFO has stopped transmission, RX data will be selected. | |
15-8 | rx_data_out1 | Oversampled Data Output for Channel 1. Note: These bits are shared with the TX Interface. When TX_FIFO has stopped transmission, RX data will be selected. | |
7:0 | rx_data_out0 | Oversampled Data Output for Channel 0. Note: These bits are shared with the TX Interface. When TX_FIFO has stopped transmission, RX data will be selected. | |
R30 | 31-27 | Reserved | |
26 | rx_en2 | RX Enable for Channel 2. 0h: Channel not enabled, all counters/flags will get reset 1h: Channel is enabled |
|
25 | rx_en1 | RX Enable for Channel 1. 0h: Channel not enabled, all counters/flags will get reset 1h: Channel is enabled |
|
24 | rx_en0 | RX Enable for Channel 0. 0h: Channel not enabled, all counters/flags will get reset 1h: Channel is enabled |
|
23-0 | Reserved |
Register | Bits | Field name | Description |
---|---|---|---|
R31 | 31-30 | Reserved | |
29-22 | Reserved | ||
21 | tx_global_reinit_active/ busy2 | Tx_global_reinit action has some latency do to
clocking. This status shows if action is completed. 1h: Active 0h: Done For non reinit case, this bit states that last bit is on tx wire. It does not mean the clock is off. 1h: Last bit is not done 0h: Last bit on tx wire Note that by using rx auto arm feature, the observation is lost at rx enable. This can be used to determine when to enable rx during non-auto arm case. |
|
20-18(1) | tx_fifo_sts2 | TX FIFO occupancy status for Channel 2. 0 :0 Empty 1h: 1 word 2h: 2 words 3h: 3 words 4h: Full 5h-7h: Reserved |
|
20(2) | tx_global_go | TX global start of all channels. Note: FIFO must not be empty. If empty, transmit will not start. |
|
19(2) | tx_global_reinit | Reinit all channels into default mode. This clears
all flags and state machines for all channels. Note: Sequence should be assert tx_global_reinit then de-assert rx_en. This will ensure TX and RX are in reset/default state. User must assert this after the frame has been sent and TX is not busy. |
|
18(2) | tx_channel_go | TX start the channel transmit (selected by
tx_ch_sel). Note: FIFO must not be empty. |
|
17 | unr2 | Under Run Flag for Channel 2. This flag is only set when the tx_frame_count is nonzero and FIFO is empty at time to send data. | |
16 | ovr2 | Over Run Flag for Channel 2 | |
15-14 | Reserved | ||
13 | tx_global_reinit_active/ busy1 | Tx_global_reinit action has some latency do to
clocking. This status shows if action is completed. 1h: Active 0h: Done For non reinit case, this bit states that last bit is on tx wire. It does not mean the clock is off. 1h: Last bit is not done 0h: Last bit on tx wire Note that by using rx auto arm feature, the observation is lost at rx enable. This can be used to determine when to enable rx during non-auto arm case. |
|
12-10 | tx_fifo_sts1 | TX FIFO occupancy status for Channel 1. 0 :0 Empty 1h: 1 word 2h: 2 words 3h: 3 words 4h: Full 5h-7h: Reserved |
|
9 | unr1 | Under Run Flag for Channel 1. This flag is only set when the tx_frame_count is nonzero and FIFO is empty at time to send data. | |
8 | ovr1 | Over Run Flag for Channel 1 | |
7-6 | Reserved | ||
5 | tx_global_reinit_active/ busy0 | Tx_global_reinit action has some latency do to
clocking. This status shows if action is completed. 1h: Active 0h: Done For non reinit case, this bit states that last bit is on tx wire. It does not mean the clock is off. 1h: Last bit is not done 0h: Last bit on tx wire Note that by using rx auto arm feature, the observation is lost at rx enable. This can be used to determine when to enable rx during non-auto arm case. |
|
4-2 | tx_fifo_sts0 | TX FIFO occupancy status for Channel 0. 0h: Empty 1h: 1 word 2h: 2 words 3h: 3 words 4h: Full 5h-7h: Reserved |
|
1 | unr0 | Under Run Flag for Channel 0. This flag is only set when the tx_frame_count is nonzero and FIFO is empty at time to send data. | |
0 | ovr0 | Over Run Flag for Channel 0 | |
R30 | 31-21 | Reserved | |
20-19 | clk_mode | CLK_OUT mode. 0h: Free-running/stop-low. Clock will remain free-running until the receive module has received the number of bits indicated in rx_frame_counter and then the clock will stop low. 1h: Free-running/stop-high (default). Clock will remain free-running until the receive module has received the number of bits indicated in rx_frame_counter and then the clock will stop high. Note: This is the default/reset state, and a hardware reset or reinit will return clk_mode to this state. Note: The initial state of the clock will be high, but the clock will not start until TX GO event. 2h: Free-run. NOTE: You must do a reinit to get out of this clock mode then you can update clk_mode to a different mode. Also if you do multiple TX GO, the 2nd go should have tst_delay and wire_delay zero since the clock is free running after the first go. 3h: Stop high after transmit. Clock will run until the last TX bit is sent and stops high. |
|
18 | Reserved | ||
17-16 | tx_ch_sel | TX channel select. 0h: Channel 0 1h: Channel 1 2h: Channel 2 3h: Reserved |
|
15-9 | Reserved | ||
7-0 | tx_data | TX data for FIFO. Notes: FIFO transmits MSB first and is 32-bits deep. TX_FIFO_SWAP_BITS bit in the PRU_ICSSG CFG register space can be used to flip the load order of bits. The FIFO has 2 modes of operation: 1. Preload and Go. This should be done for EnDAT and frames less than 32-bits. 2. Continuous mode. This should be done for frames bigger than 32-bits. In continuous mode, software needs to keep up with the line rate and ensure that the FIFO is never empty. When the FIFO is at 2 byte level, software needs to load the next 2 bytes. If software waits till the end of the empty state, it is possible to get the TX into a bad state. The FIFO state can be recovered via re-init. |
The PRU_ICSSG CFG register space has additional registers for controlling the Peripheral I/F module.