1
\$\begingroup\$

I just start Working on Stm32F070RBT6.I am using CubeMx to Configure Keil and And Keil uVision5 to simulate.I tried Blinky Example and run it in simulator mode.But The Example Is not working perfectly.I tried all the procedure available on internet but Still It is not working.After That I used Breakpoints and Step Debugging and I found That the problem is in Clock Configuration and my Program Stop At some kind of Error Handler.I can't find any solution for that.Pleas Help. Below I am posting the Point where my Program enter into Error Handler.

 RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI; RCC_OscInitStruct.HSIState = RCC_HSI_ON; RCC_OscInitStruct.HSICalibrationValue = 16; RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI; RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL12; RCC_OscInitStruct.PLL.PREDIV = RCC_PREDIV_DIV1; if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) { _Error_Handler(__FILE__, __LINE__); } 
\$\endgroup\$
1
  • 2
    \$\begingroup\$ forget about the simulators of such a complex uCs. Use the actual hardware. \$\endgroup\$ Commented Nov 23, 2017 at 15:06

1 Answer 1

1
\$\begingroup\$

Yes! You have configured the clock wrong! HSI RC in stm32f070RB is 8 MHz and you are using the PLLMul as 12, which makes the PCKL clock to run at 96MHz that is simply double its maximum capability!! You can at max have PLLMul as 6. Hope this helps!

\$\endgroup\$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.