Hi David zhou,
From the reference manual, you can get that, PTB10, mux=2 is SPI1_PCS0, it is the SPI cs function.
If you want to configure the PTB10 as the GPIO, you must choose MUX=1, this is the GPIO function.
Wish it helps you!
If you still have question, please contact me!
Have a great day,
Jingjing
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------