This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
下面给出了我的 DMA SPI 代码、但问题是我无法使用函数传输单字节数据。 如果我在 funcion 中做了一些错误、请帮助我。
void SPI_DMATx (uint8_t* SrcAddr、uint16_t Len) { DMACTL0 = DMA0TSEL_23; // DMA 中断触发器为 SPI_B1 __data16_write_addr ((无符号短整型)&DMA0SA、(无符号长整型)&SrcAddr[1]); //源块地址 __data16_write_addr ((无符号短整型)&DMA0DA,(无符号长整型)&UCB1TXBUF); //目标单地址 DMA0SZ = Len-1; //块大小 DMA0CTL = DMASRCINCR_3|DMASBDB|DMADD_0;// inc src DMA0CTL |=DMAEN; UCB1TXBUF=SrcAddr[0]; while (DMA1CTL 和 DMAEN); }