AnsweredAssumed Answered

DMA related interrupt settings in ADI DSP 21489 SHARC processor.

Question asked by caoleiwe on Jul 16, 2018
Latest reply on Jul 27, 2018 by Jithul_Janardhanan

Hi everyone,

 

I am a novice of DSP software development. Recently, I have been having a knowledge of details of SDRAM test of ADSP-21489 EZ-Board of "Power-On-Self-Test" project in the CCES IDE. I am confused with the interrupt settings in the SDRAM test. The below source code come from the "sdram_test.c" file in the "Power-On-Self-Test" project.

 

/*******************************************************************
* Function: Init_DMA
* Description: initialize DMA registers
*******************************************************************/
void Init_DMA(void)
{
sysreg_bit_set(sysreg_IRPTL, P9IMSK ); /* enable the external port DMA0 interrupt */
sysreg_bit_set(sysreg_MODE1, IRPTEN ); /* enable global interrupts */

*pDMAC0 = 0x0; /* good idea to clear it out first */
}

 

From the help page of CCES, I know that the sysreg_bit_set function sets all the bits of the nominated system register that are also set in the supplied bit mask. But I don't know that "sysreg_IRPTL" and "sysreg_MODE1" represent which system register. I find the definition of "sysreg_IRPTL" and "sysreg_MODE1" in the "sysreg.h" file . That is listed below. I still don't know that "sysreg_IRPTL" and "sysreg_MODE1" represent which system register. Further, What the statements in the "Init_DMA" function achieve?

 

enum {
/* the following can be used in word-sized sysreg reads and writes */
sysreg_I6,
sysreg_I7,
sysreg_B6,
sysreg_B7,
sysreg_ASTAT,
sysreg_ASTATX,
sysreg_ASTATY,
sysreg_USTAT1,
sysreg_USTAT3,
sysreg_USTAT2,
sysreg_USTAT4,
sysreg_MODE1,
sysreg_MODE2,
#if defined(__ADSP215xx__)
sysreg_MODE1STK,
#else
__unsupported_sysreg_1,
#endif
sysreg_IRPTL,
sysreg_IMASK,
sysreg_IMASKP,
#if !defined(__ADSP215xx__)
sysreg_LIRPTL,
#else
__unsupported_sysreg_2,
#endif
sysreg_MMASK,
sysreg_FLAGS,
sysreg_PCSTKP,
sysreg_PCSTK,
sysreg_CURLCNTR,
sysreg_LADDR,
sysreg_STKY,
sysreg_STKYX,
sysreg_STKYY,
__num_SysRegs
};

Outcomes