How should I do if I want to change the SWD to GPIO after a few minutes of power on?
few minutes，do you mean a specified N minutes?
If not, generally, you can config SWD IO to be GPIO mode, then SWD IO will change to GPIO after power on boot.
The customer want to change the SWD to normal GPIO in 5 minutes later of power on.
This may be possible in theory but can you tell the use case? After changed bo GPIO, what would you use these GPIO for? Whether need tie them to any external circuit?