本帖最后由 sandou2013 于 2014-7-8 14:10 编辑
SPI前段已做了初始化,怎么SPI接收不到数据?请各位大牛指教一下,是哪里还需要配置吗?
SPI2->FF_CTL = SPI_FFCTL_RX_THRESHOLD_L1
| SPI_FFCTL_TX_CLR
| SPI_FFCTL_RX_CLR ;
PDMA_Init();
PDMAGCR->CSR |= PDMAGCR_CSR_CLK2 ;
PDMAGCR->PDSSR0 = (PDMAGCR->PDSSR0 & 0xFF00FFFF )
| PDMA_CH2_SPI2_TX ;
PDMA2->SAR = (uint32_t)LCD_SHOW_ALL ;
PDMA2->DAR = (uint32_t)(&SPI2->RX0) ;
PDMA2->CSR = PDMA_CSR_APB_TWS_8BIT
| PDMA_CSR_DAD_FIX
| PDMA_CSR_SAD_INC
| PDMA_CSR_MEM2IP
| PDMA_CSR_CEN ;
PDMA2->BCR = 32*128 ;
NVIC_EnableIRQ(PDMA_IRQn);
PDMA2->CSR |= PDMA_CSR_TRIG_EN ;
SPI2->PDMA |= SPI_PDMA_TX_DMA_EN ; |