Question
simple spi on F103 have little problem
hi
i use two spi and connect together
spi 1 send(Full D Master) and 2 receive(Full D slave ) all in dma
if i change send buffer, in receive first array not change. it was first init that send dma
uint8_t TXBuf[]={0,1,2,3,4,5,6,7,8,9};
uint8_t RXBuf[10];
int main(void)
{
HAL_Init();
SystemClock_Config();
MX_GPIO_Init();
MX_DMA_Init();
MX_SPI1_Init();
MX_SPI2_Init();
HAL_SPI_Receive_DMA(&hspi2,RXBuf,10);
HAL_SPI_Transmit_DMA(&hspi1,TXBuf,10);
TXBuf[0]=9;
TXBuf[1]=8;
TXBuf[2]=7;
TXBuf[3]=6;
TXBuf[4]=5;
TXBuf[5]=4;
TXBuf[6]=3;
TXBuf[7]=2;
TXBuf[8]=1;
TXBuf[9]=0;
HAL_GPIO_TogglePin(LED_GPIO_Port,LED_Pin);
while (1)
{
}
}in this code RXBuf[0]=0
TXBuf[0] one time send according to first init
other byte OK and changeable if TXBuf[1:9] change i see that in RXBuf[1:9]