本帖最后由 sandou2013 于 2014-7-2 14:03 编辑
往SPIPort 地址写屏显数据。请教下是哪里配置不对?
//PDMA
SPIPort = SPI2_BASE + 0x20;
/* PDMA Init */
PDMA_Init();
PDMA_SPI2_RX_TO_CH1();
/* PDMA Setting - disable channel 1 service selection */
// PDMA_DISABLE_CH1();
/* CH1 Setting */
PDMA_EnableChannelClock(PDMAGCR_CSR_CLK1);/* Enable Channel 1 Clock */
sPDMA.SrcAddr = (uint32_t)LCD_SHOW_ALL;
sPDMA.DestAddr = SPIPort;
sPDMA.SrcCtrl = PDMA_CSR_SAD_INC;
sPDMA.DestCtrl = PDMA_CSR_DAD_INC;
sPDMA.TransWidth = PDMA_CSR_APB_TWS_8BIT;
sPDMA.Mode = PDMA_CSR_MEM2IP;
sPDMA.ByteCnt = 128*64;
sPDMA.IsTimeOutEnable = 0;
PDMA_Open(PDMA1, &sPDMA);
/* Enable Channel 1 INT - transfer block done */
PDMA_EnableInt(PDMA1, PDMA_IER_TD);
/* Trigger PDMA Channel 1 */
PDMA_CHEnableTransfer(PDMA1);
|