2017-07-21 03:59 PM
I have been using an STM32F030C6 and configuring it with STM32CubeMX and have had success running the chip using the 8MHz HSI and an external 16MHz crystal. I would like to run at 48MHz but I have not had any luck enabling the PLL, at any multiplier.
If I enable the PLL in CubeMX, select any multiplier, and upload the unmodified generated code I can only get as far as ''__HAL_RCC_PLL_ENABLE();'' in the debugger (using Atollic TrueStudio free version) before the target stops responding. I get the same result using an internal or external clock source. I have attached a screenshot of my CubeMX clock settings below along with the generated project.
Using CubeMX 4.22.0 and STM32F0 1.8.0 firmware package.
Are there some other settings that I'm missing somewhere or chip limitations that I am not aware of?
#cubemx #stm32f030 #pllSolved! Go to Solution.
2017-07-23 11:01 AM
Hi
ahren.penner
,Check your VDDs and VDDA pins if all connected. Then to not forget to set flash wait state to 1 instead of 0. Starting from 24MHz flash will not respond well to 0 wait -states. Sorry I did not see your code yet .
Cheers,
STOne -32
2017-07-22 06:34 AM
Unless I'm confused this is setting 96 MHz
void SystemClock_Config(void)
{RCC_OscInitTypeDef RCC_OscInitStruct;
RCC_ClkInitTypeDef RCC_ClkInitStruct;/**Initializes the CPU, AHB and APB busses clocks
*/ 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; // This should beRCC_PREDIV_DIV2
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) { _Error_Handler(__FILE__, __LINE__); }2017-07-23 11:01 AM
Hi
ahren.penner
,Check your VDDs and VDDA pins if all connected. Then to not forget to set flash wait state to 1 instead of 0. Starting from 24MHz flash will not respond well to 0 wait -states. Sorry I did not see your code yet .
Cheers,
STOne -32
2017-07-24 11:52 AM
Looks like it was a rookie mistake on my part, the problem was with the VDDA connection. Working flawlessly now. Thanks.