SPRUJC6A December 2024 – July 2025 AM2752-Q1 , AM2754-Q1
After initialization, each channel requires periodic servicing. Table 12-71 shows the steps which can be performed concurrently and in any order.
| Step | Crossreference |
|---|---|
| Servicing the DMA Interrupts | Table 12-72 |
| Servicing MLBSS Interrupts | Table 12-74 |
| Polling for MediaLB System Commands | Table 12-75 |
Servicing the DMA Interrupts
The steps to be followed are shown in Table 12-72
| Step | Register/ Bit Field/ Programming Model/ Comments | Value |
|---|---|---|
| 1. Enable (unmask) the interrupts from all active DMA channels | MLB_ACMR0 and MLB_ACMR1 | 1h for each bit associated with an active DMA channel |
| 2. Select the status clear method | MLB_ACTL[0] SCE | -h |
| 3. Select one (MLB0_MLBSS_MLB_AHB_INT_0 only) or two (MLB0_MLBSS_MLB_AHB_INT_0 and MLB0_MLBSS_MLB_AHB_INT_1) interrupt signals | MLB_ACTL[1] SMX | -h |
| 4. Wait for an interrupt from MLB0_MLBSS_MLB_AHB_INT_0 and/or MLB0_MLBSS_MLB_AHB_INT_1 line | - | - |
| 5. Determine which channel or channels are causing an interrupt | Read the MLB_ACSR0 and MLB_ACSR1 registers | -h |
| 6. IF: MLB_ACTL[0] SCE = 1h (software clears the interrupts) | ||
| Write the results of step 5 back to the MLB_ACSR0 and MLB_ACSR1 registers to clear the interrupt | MLB_ACSR0 and MLB_ACSR1 | MLB_ACSR0 and MLB_ACSR1 |
| ENDIF | ||
| 7. Select a logical channel (N = 0-63) with an interrupt to service | - | - |
| 8. Read the DMA descriptor table entry for channel N | See Table 12-73 | - |
| 9. Reprogram the expired or broken DMA page/pages via steps 3 and 4 of Table 12-67 | - | - |
| 10. Repeat steps 6-9 for all channels with pending interrupts | - | - |
| 11. Repeat steps 4-10 while there are active channels | - | - |
The MLB_ACSR0, MLB_ACSR1, MLB_ACMR0 and MLB_ACMR1 register bits correspond to the DMA channel address for a particular logical channel. This should not be confused with the MLB channel address.
Channels that receive a DMA error response are disabled (CE = 0) by hardware.
| Step | Register/ Bit Field/ Programming Model/ Comments | Value |
|---|---|---|
| Determine the active page (ping or pong) | Use the PG bit | -h |
| Determine which page/pages are done | Use the DNE1 and DNE2 bits | 1h |
| Determine which channels encountered a DMA error | Use the ERR1 and ERR2 bits | 1h |
| Determine which asynchronous and control Rx channel pages contain a packet start | Use the PS1 and PS2 bits | 1h |
Servicing MLBSS Interrupts
To service the MLBSS interrupts, the steps desctibed in Table 12-74 should be followed.
| Step | Register/ Bit Field/ Programming Model/ Comments | Value |
|---|---|---|
| Clear the appropriate MediaLB channel status bits | MLB_MS0 and MLB_MS1 registers | 0h |
| Enable protocol error interrupts for all active MediaLB channels | MLB_MIEN[28] CTX_PE MLB_MIEN[25] CRX_PE MLB_MIEN[21] ATX_PE MLB_MIEN[18] ARX_PE MLB_MIEN[16] SYNC_PE MLB_MIEN[0] ISOC_PE | 1h 1h 1h 1h 1h 1h |
| Wait for an interrupt on the MLB0_MLBSS_MLB_INT_0 line | ||
| Determine which channel/channels are causing the interrupt | Read the MLB_MS0 and MLB_MS1 registers | 1h |
| Determine the interrupt type | Read the RSTS and WSTS bits of the appropriate channel descriptor tables | -h |
| IF: Synchronous channels | ||
| Clear WSTS errors to resume channel operation | WSTS[3] | 0h |
| ENDIF | ||
| IF: Isochronous channels | ||
| Clear WSTS errors to resume channel operation | WSTS[2-1] | 0h |
| ENDIF | ||
| IF: Asynchronous and control channels | ||
| Clear RSTS and WSTS errors to resume channel operation | RSTS[4], WSTS[4], RSTS[2] and WSTS[2] | 0h |
| ENDIF |
Polling For MediaLB System Commands
The MediaLB core supports the MediaLB system commands (MlbScan, MlbReset, MOST_Unlock). The MLB_MSS register is used to detect a system command received from the MediaLB controller. The MLBSS automatically sends the appropriate system response to the MediaLB Controller. Software should follow the procedure shown in Table 12-75.
| Step | Register/ Bit Field/ Programming Model/ Comments | Value |
|---|---|---|
| Poll periodically for a system command received from the MediaLB controller | MLB_MSS | -h |
| Clear the appropriate bits in MLB_MSS register after the application finishes the servicing | MLB_MSS | 0h |
| IF: Software system command is detected | MLB_MSS[4] SWSYSCMD | 1h |
| Read the MLB_MSD register to receive the system data sent from MediaLB Controller | MLB_MSD | -h |
| ENDIF |