my system is WinCE6.0
I had config done for the burst, then testValue = *(DWORD*)(BasicAddress[inValue->baseCs]+inValue->Paddress); just read 2 words
so I try to use SDMA to read the data,but read nothing .
DmaConfigInfo_t RxDmaSettings = {
// element width
// valid values are:
// DMA_CSDP_DATA_TYPE_S8
// DMA_CSDP_DATA_TYPE_S16
// DMA_CSDP_DATA_TYPE_S32
//
DMA_CSDP_DATATYPE_S16,
// source element index
// valid values are:
// [-32768, 32768]
//
0,
// source frame index
// valid values are:
// [-2147483648, 2147483647] : non-packet mode
// [-32768, 32768] : packet mode
//
0,
// source addressing mode
// valid values are:
// DMA_CCR_SRC_AMODE_DOUBLE
// DMA_CCR_SRC_AMODE_SINGLE
// DMA_CCR_SRC_AMODE_POST_INC
// DMA_CCR_SRC_AMODE_CONST
//
DMA_CCR_DST_AMODE_POST_INC,
// destination element index
// valid values are:
// [-32768, 32767]
//
1,
// destination frame index
// valid values are:
// [-2147483648, 2147483647] : non-packet mode
// [-32768, 32768] : packet mode
//
1,
// destination addressing mode
// valid values are:
// DMA_CCR_DST_AMODE_DOUBLE
// DMA_CCR_DST_AMODE_SINGLE
// DMA_CCR_DST_AMODE_POST_INC
// DMA_CCR_DST_AMODE_CONST
//
DMA_CCR_DST_AMODE_POST_INC,
// dma priority level
// valid values are
// DMA_PRIORITY : high priority
// FALSE : low priority
//
DMA_PRIORITY,
// synch mode
// valid values are
// DMA_SYNCH_TRIGGER_NONE : dma is asynchronous
// DMA_SYNCH_TRIGGER_DST : dma to synchronize on destination
// DMA_SYNCH_TRIGGER_SRC : dma to synchronize on source
//
DMA_SYNCH_TRIGGER_SRC,
// synch mode
// valid values are
// DMA_SYNCH_NONE : no synch mode
// DMA_SYNCH_FRAME : write/read entire frames
// DMA_SYNCH_BLOCK : write/read entire blocks
// DMA_SYNCH_PACKET : write/read entire packets
//
DMA_SYNCH_PACKET,
// dma interrupt mask
// may be any combination of:
// DMA_CICR_PKT_IE
// DMA_CICR_BLOCK_IE
// DMA_CICR_LAST_IE
// DMA_CICR_FRAME_IE
// DMA_CICR_HALF_IE
// DMA_CICR_DROP_IE
// DMA_CICR_MISALIGNED_ERR_IE
// DMA_CICR_SUPERVISOR_ERR_IE
// DMA_CICR_SECURE_ERR_IE
// DMA_CICR_TRANS_ERR_IE
0 //DMA_CICR_FRAME_IE
};
void GPMC_InitInputDMA(DWORD elementCout,ULONG src_pyAddr,PVOID src_viAddr,ULONG dst_pyAddr,PVOID dst_viAddr)
{
DWORD dwChannel, dwAddr;
dwChannel = SDMA_REQ_GPMC;
RxDmaSettings.elemSize = DMA_CSDP_SRC_BURST_16BYTES_4x32_2x64|DMA_CSDP_DST_BURST_16BYTES_4x32_2x64|DMA_CSDP_SRC_PACKED|DMA_CSDP_DST_PACKED;
DmaConfigure (m_hRxDmaChannel,
&RxDmaSettings, dwChannel, m_RxDmaInfo);
RETAILMSG(1, (L"GPMC_InitInputDMA (0x%08x)\r\n", elementCout));
// set up for Rx buffer as 1 frames
DmaSetElementAndFrameCount (m_RxDmaInfo,
(UINT16)elementCout,
1);
DmaSetDstBuffer (m_RxDmaInfo,(UINT8 *)dst_viAddr,dst_pyAddr);
DmaSetSrcBuffer(m_RxDmaInfo,(UINT8 *)src_viAddr,src_pyAddr);
}
with this setups I call
GPMC_InitInputDMA(inValue->length,(ULONG)(pa_BasicAddress[inValue->baseCs]+inValue->Paddress),(BasicAddress[inValue->baseCs]+inValue->Paddress),p_gpmcDmaAddr,v_gpmcDmaAddr);
GPMC_StartInputDMA();
but no trigger on the OE and CS,so I didn't know whether I need us (testValue = *(DWORD*)(BasicAddress[inValue->baseCs]+inValue->Paddress);) to trigger.