The following steps are performed by the PRU firmware to write to the BS RAM:
- Configure RAM_Address and AutoIndexEn
- Load RAM_Address and AutoIndexEn into R10
- Store RAM_Address and AutoIndexEn to BS RAM using XOUT instruction with the following parameters:
- Device ID = 30h (PRU) or 1Eh (RTU_PRU)
- Base register = R10
- Size = 2
- Write Data to BS RAM
- Load Data to be written into R2-R9
- Store Data to BS RAM using XOUT instruction with the following parameters:
- Device ID = See Table 6-434, ID depends on mode.
- Base register = Register with start of data (R2-R10)
- Size = Data size (number of bytes)
- If AutoIndexEn = 1h, repeat Step 2 to write additional data.
- If AutoIndexEn = 0h,
- Load new address into R10
- Repeat Step 1b
- Repeat Step 2
The following steps are performed by the PRU firmware to read to the BS RAM:
- Configure RAM_Address and AutoIndexEn
- Load RAM_Address and AutoIndexEn into R10
- Store RAM_Address and AutoIndexEn to BS RAM using XOUT instruction with the following parameters:
- Device ID = 30h (PRU) or 1Eh (RTU_PRU)
- Base register = R10
- Size = 2
- Read Data from BS RAM
- Load Data to be
written into R2-R9
- Load Data to PRU/
RTU_PRU BS RAM using XIN instruction with the following parameters:
- Device ID = See Table 6-434, ID depends on mode.
- Base
register = Register destination for start of data
(R2-R10)
- Size = Data size
(number of bytes)
- If AutoIndexEn = 1h, repeat Step 2 to read additional data.
- If AutoIndexEn = 0,
- Load new address into R10
- Repeat Step 1b
- Repeat Step 2