2014-10-26 12:01 PM
Hi,
I am looking for some info regarding the external clock bypass conditions for STM32F417IG. There was not sufficient info in the datasheet. But, in the reference manual I could find some related data regarding how it can be done. Another problem was the Clock Config tool does not support the external clock bypass conditions. So, that was a problem in generating the required related C code to dump. I just wanted to confirm if the following changes in the system_stm32f4xx.h header file would be sufficient to use the chip in bypass conditions by feeding it using an external single ended clock source and have it communicating with the computer with VCP: I set it to pll_source_hse_bypass. and RCC->CR |= ((uint32_t)(RCC_CR_HSEON | RCC_CR_HSEBYP)); RCC->CR |= ((uint32_t)RCC_CR_HSEON); In the main.c: I have the following config- &sharpdefine HSE_VALUE((uint 32_t)8000000) should I leave it as it is or make any changes to this in main? I request you to please provide any other samples/code/reference design if available about the same conditions. I already tried with the modifications mentioned above and I think I partially bricked one of the device. I am able to program the flash but it is not able to communicate with pc as the VCP is not being detected. I thereby request you to please look into this and provide some solutuon. Thanks, Sa #stm32f417 #stm32f417 #stm32f417 #hse-hsi-pll-rcc #vcp-stm32f4 #rtfm #external-clock #hse-config2014-10-29 08:13 PM
Clocking from HSI, attached
________________ Attachments : core417i_hsi_vcp.hex : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzMt&d=%2Fa%2F0X0000000bLP%2F21F2ovXB86JR2Ip.1mjmF_zxymhnfJDzVC4oyT6wT8Y&asPdf=false2014-10-29 08:21 PM
Does clocking from hsi mean a normal application binary?
which works on internal clock?2014-10-29 08:50 PM
Does clocking from hsi mean a normal application binary? which works on internal clock?
I'm not sure what meaning you're trying elicit here. It uses the HSI as a clock source, and uses that to drive the PLL. I wouldn't use it for a production USB solution, over voltage and temperature, but should be sufficient for demonstrational purposes.2014-10-31 09:39 AM
Clive,
Is there anyway to check if the external clock which is being given can be measured to see if it being accepted?2014-10-31 10:24 AM
''If you wish to confirm the internal clocks they can be routed out MCO1 (PA8)''
This includes what's being pulled in externally (internal copies there of). Depending on the part/clock TIM9 and TIM12 (check Ref Manual) provides a means of benchmarking one clock against another. ie ticks of a fast clock against a 32.768 KHz oscillator..2014-11-04 09:46 AM
hi clive,
can you please send the project/code of the example 50mhz vcp you attached?2014-11-04 09:32 PM
This is the quick mash-up that I created for the 50 MHz external source
https://drive.google.com/file/d/0B7OY5pub_GfINE1aNnJONXhEcmc/view?usp=sharing
2014-11-05 08:14 AM
I will drop the clock freq to 192 which is a multiple of 48. Could you please tell if these settings would need any other software changes?
Huh?2014-11-06 09:15 AM
Thanks fr the mashup.
2014-11-06 09:40 AM
the maximum HSE bypass frequency is 50 MHz (maximum HSE oscillator frequency is 26 MHz).
However, there is no way to direct a 48 MHz bypass signal directly to the USB peripheral, so the PLL must be used.
The input to the PLL clock can be HSE bypass / PLL_M, which must be between 1 and 2 MHz.
So, if you are using a 26 MHz signal, you could use:
PLL_M = 13, which will give 26 MHz / 13 = 2 MHz as the PLL input clock
PLL_N = 192, which will give 2 MHz x 192 = 384 MHz as the main PLL clock
PLL_Q = 8, which will give 384 MHz / 8 = 48 MHz as the USB clock.
PLL_P should be a value to get your system clock to its desired frequency, which can be up to 168 MHz.
Alternatively, to get the maximum possible frequencies, you can set:
PLL_M = 13, which will give 26 MHz / 13 = 2 MHz as the PLL input clock
PLL_N = 336, which will give 2 MHz x 336 = 672 MHz as the main PLL clock
PLL_Q = 14, which will give 672 MHz / 14 = 48 MHz as the USB clock.
PLL_P should be a value to get your system clock to its desired frequency, which can be up to 168 MHz (minimum value for PLL_P would be 4, in this case).
Using a 50 MHz bypass signal:
PLL_M = 25, which will give 50 MHz / 25 = 2 MHz as the PLL input clock
PLL_N = 336, which will give 2 MHz x 336 = 672 MHz as the main PLL clock
PLL_Q = 14, which will give 672 MHz / 14 = 48 MHz as the USB clock.
PLL_P should be a value to get your system clock to its desired frequency, which can be up to 168 MHz (minimum value for PLL_P would be 4, in this case).