I am trying to communicate with AD7791 with STM32.
What are the minimum commands that I must send for the correct startup?
We have a reference driver that you can use as a reference for starting your code.
Reading an ID register is a simplest way and a first step of checking that you are communicating with the device. But there could still be a series of next/ steps to confirm that you are indeed communicating properly with the device. Writing to and reading back the same register is also recommended.
I suggest to see this FAQ as you may find it helpful to make your SPI interface more robust. Item 4 also discuss the recommended routine for initialization.