Texas Instruments TMS320C645X Musical Instrument Amplifier User Manual


 
www.ti.com
4.7InterruptHandling
InterruptConditions
Figure57.INTDSTn_RATE_CNTLInterruptRateControlRegister
310
32-bitCountDownValue
R/W-0
LEGEND:R=Read,W=Write,n=valueatreset
Offsets:
INTDST00x0320
INTDST10x0324
INTDST20x0328
INTDST30x032C
INTDST40x0330
INTDST50x0334
INTDST60x0338
INTDST70x033C
InterruptsareeithersignaledexternallythroughRapidIOpackets,orinternallybystatemachinesinthe
peripheral.CPUservicinginterruptsaresignaledexternallybytheDOORBELLRapidIOpacketinDirect
I/Omode,orinternallybytheCPPImodule(describedinsection8)inthemessagepassingmode.Error
Statusinterruptsaresignaledwhenerrorcountinglogicwithintheperipheralhavereachedtheir
thresholds.Ineithercase,itistheperipheralthatsignalstheinterruptandsetsthecorrespondingstatus
bits.
WhentheCPUisinterrupted,itreadstheICSRregisterstodeterminethesourceoftheinterruptand
appropriateactiontotake.Forexample,ifitisaDOORBELLinterrupt,theCPUwillreadfromanL2
addressthatisspecifiedbyitscircularbufferreadpointerthatismanagedbysoftware.Theremaybe
morethanonecircularbufferforeachcore.Thecorrectcircularbuffertoreadfromandincrement
dependsonthebitsetintheICSRregister.TheCPUthenclearsthestatusbit.
ForErrorStatusinterrupts,theperipheralmustindicatetoalltheCPUsthatoneofthelinkportshas
reachedtheerrorthreshold.Inthiscase,theperipheralsetsthestatusbitindicatingdegradedorfailed
limitshavebeenreached,andaninterruptisgeneratedtoeachcorethroughtheICRRmapping.The
corescanthenscantheICSRregisterstodeterminetheportwiththeerrorproblems.Furtheractioncan
thenbetakenasdeterminedbytheapplication.
InterruptHandler
temp1=SRIO_REGS->TX_CPPI_ICSR;
if((temp1&0x00000001)==0x00000001)
{
SRIO_REGS->Queue0_TxDMA_CP=(int)TX_DESCP0_0;
}
temp2=SRIO_REGS->RX_CPPI_ICSR;
if((temp2&0x00000001)==0x00000001)
{
SRIO_REGS->Queue0_RXDMA_CP=(int)RX_DESCP0_0;
}
interruptStatus[0]=SRIO_REGS->DOORBELL3_ICSR;
interruptStatus[1]=SRIO_REGS->DOORBELL3_ICCR;
interruptStatus[2]=SRIO_REGS->LSU_ICSR;
interruptStatus[3]=SRIO_REGS->LSU_ICCR;
interruptStatus[4]=SRIO_REGS->DOORBELL3_ICRR;
interruptStatus[5]=SRIO_REGS->DOORBELL3_ICRR2;
interruptStatus[6]=SRIO_REGS->LSU_ICRR;
interruptStatus[7]=SRIO_REGS->LSU_ICRR2;
interruptStatus[8]=SRIO_REGS->INTDST0_Decode;
interruptStatus[9]=SRIO_REGS->ERR_RST_EVNT_ICRR;
interruptStatus[10]=SRIO_REGS->INTDST0_Rate_CNTL;
86SerialRapidIO(SRIO)SPRU976March2006
SubmitDocumentationFeedback