Programming

hi
does through Spi both planning and data transfer can be done?

With the SPI performs both the setting of the device and data transfer.
You have to set the device with some registers and registers to write into TX buffer and registers to read from the RX buffer.
From the point of view of the source throughout much cleaner and efficient than using a USART and very similar to a writing in parallel mode.
I hope I understood your question.