Other Parts Discussed in Thread: RM44L920
Tool/software: Code Composer Studio
Hi,
I designed communicate function between CPUs (RM44L920) though SCI, use DMA mode to send and receive data efficiently. However,the DMA doesn‘t work when move the SCI Rd to the destination ram。
Here is my design: connecting DMA request[30] , SCI receiver request to DMA CHANAN 0, while DMA request[31] , sci send request to DMA CHANNEL 1.
My control packets are defined as following:
[SCI Rx] ---RD has received successfully, but DMA didn't move the RD to the destination ram.
SADD = 0xfff7e538; [RD] /* source address */
DADD = RamAdd; /* destination address */
CHCTRL = 0; /* channel control */
FRCNT = 1; /* frame count */
ELCNT = dsize; /* element count */
ELDOFFSET = 1; /* element destination offset */
ELSOFFSET = 0; /* element source offset */
FRDOFFSET = 1; /* frame destination offset */
FRSOFFSET = 0; /* frame source offset */
ADDMODERD = ADDR_FIXED; /* address mode read, source */
ADDMODEWR = ADDR_INC1; /* address mode write ,dest */
PORTASGN = 4; /* port b */
RDSIZE = ACCESS_8_BIT; /* read size */
WRSIZE = ACCESS_8_BIT; /* write size */
TTYPE = FRAME_TRANSFER ; /* transfer type */
AUTOINIT = AUTOINIT_OFF; /* autoinit */
[SCI Tx] ---Sending data OK
SADD = RamAdd; /* source address */
DADD = 0xfff7e538; [TD] /* destination address */
CHCTRL = 0; /* channel control */
FRCNT = 1; /* frame count */
ELCNT = dsize; /* element count */
ELDOFFSET = 0; /* element destination offset */
ELSOFFSET = 1; /* element source offset */
FRDOFFSET = 0; /* frame destination offset */
FRSOFFSET = 1; /* frame source offset */
ADDMODERD = ADDR_INC1; /* address mode read,source */
ADDMODEWR = ADDR_FIXED; /* address mode write,dest */
PORTASGN = 4; /* port b */
RDSIZE = ACCESS_8_BIT; /* read size */
WRSIZE = ACCESS_8_BIT; /* write size */
TTYPE = FRAME_TRANSFER ; /* transfer type */
AUTOINIT = AUTOINIT_OFF; /* autoinit */
there are two question:
1. The registers of DMA channel 0/1,CSADDR/CDADDR/CTCOUNT, can't be showed in CCS
while the firmware is running.
2. The DMA function of SCI sending data does work,but DMA function of SCI receiving data does't go well.
Note: the length of receiving data isn't fixed every time.
Would you tell me how I could find the reason and solve it?
Best regards.