Dear,
I is debuging MPC5746R for DMA. But When I use S32DS debug MPC5746R, the DMA register cannot be written or read. The debuger is USB Multilink Universal.
code:
DMA_0.TCD[7].WORD_1.B.SMOD = 0;
DMA_0.TCD[7].WORD_1.B.SSIZE = 0x2; /* 32-bit */
DMA_0.TCD[7].WORD_1.B.DMOD = 0;
DMA_0.TCD[7].WORD_1.B.DSIZE = 0x2; /* 32-bit */
DMA_0.TCD[7].WORD_1.B.SOFF = 0x4; //Source address signed offset
DMA_0.TCD[7].WORD_2.NBYTES.B.NBYTES = 64; /* Minor Byte Transfer Count (16x32-bits)/8=64byte */
DMA_0.TCD[7].WORD_3.B.SLAST = -64;
DMA_0.TCD[7].WORD_4.B.DADDR = (uint32)&DMA_save_result0;
DMA_0.TCD[7].WORD_5.B.CITER_E_LINK = 0; //The channel-to-channel linking is disabled
//DMA_0.TCD[0].WORD_5.B.LINKCH_CITER = 0;
DMA_0.TCD[7].WORD_5.B.CITER = 1;
DMA_0.TCD[7].WORD_5.B.DOFF = 0x4; //Destination address signed offset
DMA_0.TCD[7].WORD_6.B.DLAST_SGA= -64;
DMA_0.TCD[7].WORD_7.B.BITER = 1; //
DMA_0.TCD[7].WORD_7.B.BITER_E_LINK = 0; //0=The channel-to-channel linking is disabled
//DMA_0.TCD[0].WORD_7.B.BITER_BITER_LINKCH = 0;
DMA_0.TCD[7].WORD_7.B.BWC = 0;
DMA_0.TCD[7].WORD_7.B.MAJOR_LINKCH = 1; /* Link to channel 1 */
DMA_0.TCD[7].WORD_7.B.MAJOR_E_LINK = 1; /* Enable channel linking */
DMA_0.TCD[7].WORD_7.B.E_SG = 0;
DMA_0.TCD[7].WORD_7.B.DREQ = 0;
DMA_0.TCD[7].WORD_7.B.INT_HALF = 0;
DMA_0.TCD[7].WORD_7.B.INT_MAJOR = 0;
Error:
MPC574xR Device detected.
Unable to go into background mode.
PE-ERROR: Warning. Can't read registers while part is running.
PE-ERROR: Warning. Can't read memory while part is running. @0 (4 bytes)
PE-ERROR: Warning. Can't read memory while part is running. @0 (4 bytes)
I try to access DMA_0 register other Byte,the result is same.
why can't access DMA_0 register,i need help
Kind regards,
CGJ