Hello @parth kothiya ,
Thanks for your question,
You can configure the STM32 chip through STM32CubeMX, first, you need to enter your exactly part number that will be used and press Start project:
You can set/configure all the available peripherals, Clock and all the other options and parameters according to your need:
And then, you should choose the IDE to finally generate your configuration made in the previous step:
For your own code, please add it in the preserved user sections.
Hope my answer helped you :) When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.
Thanks, Khouloud