Hi @yexiaoer
Since the pin has been configured as SPI PCS, its control is handled through the SPI driver. The DIO driver can only modify the state of pins that are configured as GPIO.
If you need to manually control the PCS signal, the best approach is to reconfigure the desired pin as a GPIO, and in the SPI driver settings, change the SpiCsSelection parameter from CS_VIA_PERIPHERAL_ENGINE to CS_VIA_GPIO.
BR, VaneB