Good morning, thanks for the answer but this is not possible on my board.
I have used SWD pins for another function and they are not connected in a SWD connector so I can't access them.
I have read that SWD is only for debugging while I need a flash programmer for production, not for debugging.
I suppose there are many other designers with my problem so I wonder if there is another solution.
Best regards.