i am on Ubuntu 20.04 on RPI4. I am driving a 4 PWM motor driver using PWM on pins 22,23,26,27. When i turn off the raspberry, the driver being still powered, go off. I suppose some of this pins change state to HI. Is there a way to power off the RPI4 assuring the pins stay LOW ? Thanks
Your Question asks about "pin state after shutdown" - in general pins retain their state if powered.
You later state "i turn off the raspberry" - if unpowered the pins obviously have no voltage so state is meaningless.
It is unclear what you have done or WHY you would want to turn off power while apparently leaving the motor driver powered.