I am trying to overclock my STM32F303VC. Unfortunately I can't due to a HARD FAULT EXCEPTION. Could you help me to find the error?
I also attached the code.
RCC->CR|=1<<16;
while(((RCC->CR)&(1<<17))!=(1<<17));//HSEON
RCC->CFGR|=(1<<18)|(1<<19)|(1<<20);//PLLMUL
RCC->CFGR|=(1<<13);//PPRE2
RCC->CFGR|=(1<<10);//PPRE1
RCC->CFGR|=(1<<8);//PPRE1
RCC->CFGR|=(1<<16);//PLLSRC
RCC->CR|=(1<<24);
while(((RCC->CR)&(1<<25))!=(1<<25));//PLLON
RCC->CFGR|=(1<<1);//SWS E SW
while(((RCC->CFGR)&(1<<3))!=(1<<3));