2016-05-24 03:23 AM
Hi
I am having problems getting the external crystal oscillator to run correctly. It has a dc offset of approx. 1.5V but a peak to peak of only 380mV. The circuit is based on the STM32F429 Discovery board which produces a very healthy clock. Can anybody suggest what may be the cause of this issue. The clock config code is__PWR_CLK_ENABLE();
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
?
//Configure HSE clock for main system clock
RCC_OscInitStruct.
OscillatorType
= RCC_OSCILLATORTYPE_HSE;RCC_OscInitStruct.
HSEState
= RCC_HSE_ON;RCC_OscInitStruct.
PLL
.
PLLState
= RCC_PLL_ON;RCC_OscInitStruct.
PLL
.
PLLSource
= RCC_PLLSOURCE_HSE;RCC_OscInitStruct.
PLL
.
PLLM
= 8;RCC_OscInitStruct.
PLL
.
PLLN
= 336;RCC_OscInitStruct.
PLL
.
PLLP
= RCC_PLLP_DIV2;RCC_OscInitStruct.
PLL
.
PLLQ
= 7;HAL_RCC_OscConfig(&RCC_OscInitStruct);
#hse2016-05-24 05:18 AM
Hi regan.david,
I recommend you to have a look to the RCC example under the STM32F4 cube firmware package, it may be helpful:STM32Cube_FW_F4_V1.11.0\Projects\STM32F429IDiscovery\Examples\RCC\RCC_ClockConfig-Syrine-2016-05-24 05:39 AM
Let's assume for a second it is not the software..
Most DISCO boards provide a rail-to-rail HSE from the ST-LINK's part.The crystal isn't going to do that, but is dependent on the characteristics of the specific crystal chosen, and the parts surrounding it. You should measure indirectly via the MCO (PA8) pin, route HSE out of that, and put that on a scope.Review the crystal data sheet, and review the STM32 oscillator app note.2016-05-24 11:33 PM
Hi Clive
Thanks for responding. The discovery board is as delivered with default solder bubbles, hence X3 crystal etc is being used. I have probed directly on C20 and seen the clock oscillating between 0.5V and 2.4V. I have also swapped in our crystal which gives similar results. Our board tracking checks out. Am I missing something?2016-05-24 11:46 PM
Don't know what happened?
Doesn't seem to accept text when entered from my mobile phone!!!