SPRUI30H November 2015 – May 2024 DRA745 , DRA746 , DRA750 , DRA756
After initialization, each channel requires periodic servicing. Table 24-1486 shows the steps which can be performed concurrently and in any order.
Step | Crossreference |
---|---|
Servicing the DMA Interrupts | Table 24-1487 |
Servicing MLB Interrupts | Table 24-1489 |
Polling for MediaLB System Commands | Table 24-1490 |
Servicing the DMA Interrupts
The steps to be followed are shown in Table 24-1487
Step | Register/ Bit Field/ Programming Model/ Comments | Value |
---|---|---|
1. Enable (unmask) the interrupts from all active DMA channels | MLB_DCMR0 and MLB_DCMR1 | 0x1 for each bit associated with an active DMA channel |
2. Select the status clear method | MLB_DCTL[0] SCE | 0x- |
3. Select one (MLB_IRQ_SYS_INT0 only) or two (MLB_IRQ_SYS_INT0 and MLB_IRQ_SYS_INT1) interrupt signals | MLB_DCTL[1] SMX | 0x- |
4. Wait for an interrupt from MLB_IRQ_SYS_INT0 and/or MLB_IRQ_SYS_INT1 line | - | - |
5. Determine which channel or channels are causing an interrupt | Read the MLB_DCSR0 and MLB_DCSR1 registers | 0x- |
6. IF: MLB_DCTL[0] SCE = 0x1 (software clears the interrupts) | ||
Write the results of step 5 back to the MLB_DCSR0 and MLB_DCSR1 registers to clear the interrupt | MLB_DCSR0 and MLB_DCSR1 | MLB_DCSR0 and MLB_DCSR1 |
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 24-1488 | - |
9. Reprogram the expired or broken DMA page/pages via steps 3 and 4 of Table 24-1482 | - | - |
10. Repeat steps 6-9 for all channels with pending interrupts | - | - |
11. Repeat steps 4-10 while there are active channels | - | - |
The MLB_DCSR0, MLB_DCSR1, MLB_DCMR0 and MLB_DCMR1 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 | 0x- |
Determine which page/pages are done | Use the DNE1 and DNE2 bits | 0x1 |
Determine which channels encountered a DMA error | Use the ERR1 and ERR2 bits | 0x1 |
Determine which asynchronous and control Rx channel pages contain a packet start | Use the PS1 and PS2 bits | 0x1 |
Servicing MLB Interrupts
To service the MLB interrupts, the steps desctibed in Table 24-1489 should be followed.
Step | Register/ Bit Field/ Programming Model/ Comments | Value |
---|---|---|
Clear the appropriate MediaLB channel status bits | MLB_MS0 and MLB_MS1 registers | 0x0 |
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 | 0x1 0x1 0x1 0x1 0x1 0x1 |
Wait for an interrupt on the MLB_IRQ_SYS line | ||
Determine which channel/channels are causing the interrupt | Read the MLB_MS0 and MLB_MS1 registers | 0x1 |
Determine the interrupt type | Read the RSTS and WSTS bits of the appropriate channel descriptor tables | 0x- |
IF: Synchronous channels | ||
Clear WSTS errors to resume channel operation | WSTS[3] | 0x0 |
ENDIF | ||
IF: Isochronous channels | ||
Clear WSTS errors to resume channel operation | WSTS[2:1] | 0x0 |
ENDIF | ||
IF: Asynchronous and control channels | ||
Clear RSTS and WSTS errors to resume channel operation | RSTS[4], WSTS[4], RSTS[2] and WSTS[2] | 0x0 |
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 MLB automatically sends the appropriate system response to the MediaLB Controller. Software should follow the procedure shown in Table 24-1490.
Step | Register/ Bit Field/ Programming Model/ Comments | Value |
---|---|---|
Poll periodically for a system command received from the MediaLB controller | MLB_MSS | 0x- |
Clear the appropriate bits in MLB_MSS register after the application finishes the servicing | MLB_MSS | 0x0 |
IF: Software system command is detected | MLB_MSS[4] SWSYSCMD | 0x1 |
Read the MLB_MSD register to receive the system data sent from MediaLB Controller | MLB_MSD | 0x- |
ENDIF |