Author Topic: Do I *need* an external clock with an STM32F7? Need help with the data sheet :/  (Read 4194 times)

0 Members and 1 Guest are viewing this topic.

Offline ivyandnineTopic starter

  • Newbie
  • Posts: 4
  • Country: us
I started laying out an STM32F7 based on this document:
https://www.st.com/content/ccc/resource/technical/document/application_note/b0/5c/ba/b2/cb/10/41/dd/DM00164549.pdf/files/DM00164549.pdf/jcr:content/translations/en.DM00164549.pdf
but I'm unsure if the internal oscillator can be used by itself without any external components (Is that the HSI?).

Also, another question, is "SYSCLK" == main cpu clock?

Thanks for any help <3

 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14471
  • Country: fr
The STM32F7 (as most of STM32 MCUs) has two internal oscillators: LSI and HSI (low- and high-speed obviously). Both can be used without the need of any external component. The STM32F7 will start with the HSI as the source of SYSCLK upon reset (you then have to switch the clock programmatically if you want to use another source such as HSE).

(Note that if you're designing some kind of development board, I'm suggesting adding provisions to add an external crystal/give access to the HSE in case you want to use it later on. But the MCU can run without it.)

SYSCLK is not the CPU clock, but more like the clock most other clocks are derived from (although the clocking scheme of STM32s is a bit more complex than that with the PLLs and such...)

The CPU clock is called HCLK if I'm not mistaken.

You should read the reference manual as it's a lot more detailed than the datasheet which is just an overview:
https://www.st.com/resource/en/reference_manual/dm00305990.pdf
You may also find more general info on the Cortex-M7 here: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.subset.cortexm.m7/index.html
« Last Edit: February 17, 2019, 11:47:29 pm by SiliconWizard »
 
The following users thanked this post: ivyandnine

Offline krho

  • Regular Contributor
  • *
  • Posts: 223
  • Country: si
I don't know if this is true for all stm32s but some of them need external clock if you want to use USB. See the manual of your chip if it says crystalles USB.
 
The following users thanked this post: ivyandnine

Offline obiwanjacobi

  • Frequent Contributor
  • **
  • Posts: 988
  • Country: nl
  • What's this yippee-yayoh pin you talk about!?
    • Marctronix Blog
I have found that the Stm32CubeMX configuration tool gives a nice graphical overview of how the clock details work.
I found that very instructive for learning the STM32 clock details.
I would suggest you download it and familiarize yourself with the program.
Even if you do not use it for generating code, it does show you the inter-relation between the different peripherals.

[2c]
Fellow beginner.
Arduino Template Library | Zalt Z80 Computer
Wrong code should not compile!
 
The following users thanked this post: ivyandnine

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14471
  • Country: fr
I don't know if this is true for all stm32s but some of them need external clock if you want to use USB. See the manual of your chip if it says crystalles USB.

That's probably true for most of them. The internal oscillator is probably not accurate enough to be used as a clock source for USB cores.
 
The following users thanked this post: ivyandnine

Offline dgtl

  • Regular Contributor
  • *
  • Posts: 183
  • Country: ee
There are some, that sync their internal clock from USB and can do usb without crystal(ie F042 comes to mind first). But if it is not mentioned, they need crystal for USB (and other timing-critical comm stuff).
I would also recommend trying out the stm32cubemx tool. Use that to configure the clocking system graphically and see if it can be set up to do what you want.
 
The following users thanked this post: ivyandnine

Offline bson

  • Supporter
  • ****
  • Posts: 2270
  • Country: us
Which specific F7?

The reference manual mentioned in your linked AN:

https://www.st.com/resource/en/reference_manual/dm00124865.pdf

Section 5.2.2:

Quote
The HSI clock signal is generated from an internal 16 MHz RC oscillator and can be used directly as a system clock, or used as PLL input. 

The HSI RC oscillator has the advantage of providing a clock source at low cost (no external components).

So, yeah, I'd assume as much but would verify it by checking the device-specific datasheet...
 
The following users thanked this post: ivyandnine

Offline mark03

  • Frequent Contributor
  • **
  • Posts: 711
  • Country: us
I agree with the suggestion to check out the CubeMX software for clocking and pin planning.  However, speaking as someone who rarely uses that, there is another resource you should know about.  Every STM32 datasheet contains a full-page diagram called "Clock Tree."  This shows you everything you need to know, on one page.  When you're first getting started, the minutiae may seem overwhelming, but study it carefully and you can see, for example, the relation between SYSCLK and HCLK (HCLK is a prescaled---divided down---version of SYSCLK which runs the MCU core).  You can also see the multiplexer that produces SYSCLK, which will show you what the SYSCLK options are:  HSE, HSI, a PLL output, etc.
 
The following users thanked this post: ivyandnine


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf