hello sir,
Now i am facing problems in receive. I want to receive 4 bytes and store in the buffer but the buffer is loaded with same value. below i have written my code please go through it .
//Receive Function
{
DMA_SADDR_REG(dmach , ch) =0;
DMA_SADDR_REG(dmach , ch)|= DMA_SADDR_SADDR(0x4006B007); // CONFIGURING SOURCE ADDRESS
DMA_SOFF_REG(dmach,ch) =0;
DMA_ATTR_REG(dmach , ch) = (DMA_ATTR_SSIZE(0) | DMA_ATTR_DSIZE(0)); //CONFIGURING SOURCE ADDRESS SIZE
DMA_NBYTES_MLNO_REG(dmach , ch) = 0;
DMA_NBYTES_MLNO_REG(dmach , ch)|= (DMA_NBYTES_MLNO_NBYTES(0x04));
DMA_DADDR_REG(dmach , ch) = 0;
DMA_DADDR_REG(dmach , ch) |= DMA_DADDR_DADDR(val); //CONFIGURING DESTINATION ADDRESS ADDRESS
DMA_DOFF_REG(dmach , ch) = DMA_DOFF_DOFF(0x01);
DMA_BITER_ELINKNO_REG(dmach , ch) =0;
DMA_BITER_ELINKNO_REG(dmach , ch) = DMA_BITER_ELINKNO_BITER(0x4); //STARTING MAJOR ITERATION COUNT
DMA_CITER_ELINKNO_REG(dmach , ch) =0;
DMA_CITER_ELINKNO_REG(dmach , ch) = DMA_CITER_ELINKNO_CITER(0x4); // CURRENT MAJOR ITERATION COUNT
DMA_SERQ |= DMA_SERQ_SERQ_MASK;
DMA_CSR_REG(dmach , ch) = DMA_CSR_START_MASK; // START THE DMA
}