Somehow I found the error causing, The entropy initialization causing that issue, so i commented it. But after that when I build the project i got error like undefined functions, C files are there but i am unable to link them in stm32CubeIDE i also went through some post and did try, but it doesn't resolve it.