Hi there,
I have just read the comments above and got one question.
What exactly do you mean with "but i use rcc & gpio function"?
RCC is an HAL functionality to provide easy setup of the clock configuration. Normally all RCC settings do not have any relations to GPIO's except of when you are using HSE as source. In our standard build environment we are using the external clock source (HSE). So, to be sure that the RCC configuration cause this problem, could you please try to switch to an HSE initialisation.
Therefore I recommend to use the code within "SystemClock_Config( void )" of a new downloaded Embedded Wizard Build Environment. If the problem then will gone away, I recommend to use ST's documentation about how to configure the RSI clock source correctly.
I hope this helps.
Kind regards
Tim