AnsweredAssumed Answered

About the programming problem

Question asked by exceedsky on Mar 18, 2013
Latest reply on Mar 20, 2013 by Prashant

I am using BF609.  EPPI1 and MDA33 has already been initialized.

 

uint8_t RxBuffer[2][1448];

uint16_t RxAV1line[480];

uint8_t RxBufferAV1[480][1448];

 

static void InitDMA33(void)
{
*pREG_DMA33_ADDRSTART = (void*)RxBuffer[0];
*pREG_DMA33_XCNT = 1448/4;
*pREG_DMA33_XMOD = 0x4;
*pREG_DMA33_YCNT = 1;
*pREG_DMA33_YMOD = 0x4;

*pREG_DMA33_CFG = ENUM_DMA_CFG_WRITE   |
       ENUM_DMA_CFG_MSIZE04 |
       ENUM_DMA_CFG_PSIZE04 |
       ENUM_DMA_CFG_ADDR2D  |
       ENUM_DMA_CFG_SYNC    |
       ENUM_DMA_CFG_STOP    |
       ENUM_DMA_CFG_YCNT_INT ; //浜х敓涓柇

adi_int_InstallHandler((uint32_t)INTR_EPPI1_CH0_DMA, PpiCallback, (void*)NULL , true);
}

 

static void InitEppi1(void)
{

*pREG_EPPI1_FRAME = 1;
*pREG_EPPI1_LINE = 1448;

*pREG_EPPI1_CTL = ENUM_EPPI_CTL_RXMODE |
       ENUM_EPPI_CTL_ACTIVE656 |
       ENUM_EPPI_CTL_SYNC0 |
       ENUM_EPPI_CTL_FLDSEL_HI |
       ENUM_EPPI_CTL_PROGRESSIVE |
       ENUM_EPPI_CTL_EXTCLK |
       ENUM_EPPI_CTL_POLC11 |
       ENUM_EPPI_CTL_PACK_EN;
ssync();

}

PpiCallback process the conversion of RxBuffer[0] and RxBuffer[1] two cache .

 

Now, I have the following statement in a function.

 

line = ((uint16_t)(RxBuffer[0][2] & 0x03) << 7) | (uint16_t)(RxBuffer[0][4] & 0x7f);

RxAV1line[AV1line] = line;

SetMDMA1((void*)&RxBuffer[0],(void*)RxBufferAV1[AV1line]);                      //Memory copy  from RxBuffer[0] to RxBufferAV1

EnableMDMA1();

if (AV1line == 479)

        AV1line = 0;

else

        AV1line++;

 

Debug results are as follows

无标题.png

无标题1.png无标题2.png无标题3.png

Now,RxBufferAV1 data is correct.But The RxAV1line data are all the same.Be equal to RxBuffer[0] data in debug suspended.Why?

捕获.PNG

Outcomes