cancel
Showing results for 
Search instead for 
Did you mean: 

Let me know SPI communication in Register Level operation

SKim.1761
Associate III

Hi I am trying stm32f429zi discovery board for testing SPI communication

I've successed transmitting and receiving data on ADC chip

But I want know "How do these datas going so well?"

So I checked __HAL_SPI_TRANSMIT function

So I found that

hspi->instance->DR  = *((uint16_t *)hspi->pTxBuffPtr);

So that says DR is going to be a value about pTxBuffPtr right? so I pushed a value about pData which is incomming value __HAL_SPI_TRANSMIT name as pTxBuffPtr.

But I dont understand why this processing make spi data transmitting where i can found that informations?

Thanks

1 REPLY 1
JoniS
Senior

Spi "DR" is Dataregister, if you write to it, it will transmit out the data written. If you read from it, you will get received data.

And as always Reference manual of your mcu should tell you all you need to know about SPI periephal or any other periephal.