How to configure SPI2 as a slave?

You can try use GPIO as CS. Have reference to below relative topic.