cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F091VB HSE probem

fabricepeden
Associate II
Posted on July 22, 2016 at 09:26

Hi everybody,

On my project, I'm using a STM32F091VB but I have a problem with the crystal ( ref 7B-000MEEQ-T brand : TXC). I have measured voltage between GND and crystal and I have 1.9V (so I think this one is working). I used also two capacitors of 20pF (I have tried with 10pF) but it seems not to work. My pin BOOT0 is tied to GND with 10k resistor (I have also check the voltage on this pin). My configuration was made by STM32CubeMX. When I go step by step, my fimware does :

RCC_OscInitTypeDef RCC_OscInitStruct;
RCC_ClkInitTypeDef RCC_ClkInitStruct;
RCC_PeriphCLKInitTypeDef PeriphClkInit;
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI | RCC_OSCILLATORTYPE_HSI14|RCC_OSCILLATORTYPE_HSE
|RCC_OSCILLATORTYPE_LSE;
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
RCC_OscInitStruct.LSEState = RCC_LSE_ON;
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
RCC_OscInitStruct.HSI14State = RCC_HSI14_ON;
RCC_OscInitStruct.HSICalibrationValue = 16;
RCC_OscInitStruct.HSI14CalibrationValue = 16;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_OFF;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL4;
RCC_OscInitStruct.PLL.PREDIV = RCC_PREDIV_DIV1;
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
{
Error_Handler();
}

and When it goes HAL_RCC_OscConfig(), the function HAL_GetTick always sends 0, uwTick is never incrementing. If you have any suggestions, thank you in advance. #stm32f091-hse-crystal
1 REPLY 1
fabricepeden
Associate II
Posted on July 22, 2016 at 13:35

I have found my problem, it was on my board. But I have another question.

In the datahseet, it's mentionned that pin BOOT 0 can be in high impedance state, if you set BOOT_SEL bit and nBOOT bit, it can start on flash memory. I have tried to do that, but I cannot change the value of BOOT_SEL bit, it seems to stay at 0. I just change the code below :

#if defined(FLASH_OBR_BOOT_SEL)
assert_param(IS_OB_BOOT_SEL((UserConfig&OB_BOOT_SEL_RESET)));
assert_param(IS_OB_BOOT0((UserConfig&OB_BOOT0_SET)));
#endif /* FLASH_OBR_BOOT_SEL */

Is somebody has already done this operation ? If you have any suggestions ? Thank you