Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crystal design for stm32f103 #3

Open
gbip opened this issue Nov 14, 2018 · 5 comments
Open

Crystal design for stm32f103 #3

gbip opened this issue Nov 14, 2018 · 5 comments

Comments

@gbip
Copy link
Member

gbip commented Nov 14, 2018

We need to find a crystal for the microcontroller and the attached capacitance.
crystal_1
More information can be found in this application note.

You can find the micro-controller characteristics here :
crystal_2
page 105 of the cortex m4 datasheet

@goowza
Copy link

goowza commented Nov 15, 2018

The ECS-80-18-5PX (datasheet : csm-7x.pdf) is ok.

  • The minimal gain margin needed to start the oscillation is > 5 :

(The gm value can be found in the STM32F103 datasheet : cd00161566.pdf and all the other values come from the crystal datasheet)

  • We can now calculate the external capacitors values :

  • We might want to check the power dissipated by the crystal aka the drive level. However, in order to do so we will have to measure the current going through the crystal without an external resistance and verify that we don't exceed 500 uW.
    If the power dissipated is superior to 500 uW, we will have to add a resistance which value shall be given by :

/!\ If we add this resistance, we will have to recalculate the gain margin taking Rext into account (by adding it to the value of ESR)

@gbip
Copy link
Member Author

gbip commented Nov 16, 2018

Thanks a lot @goowza for your answer, I checked your calculations and everything is correct !

I will add this crystal to the "to buy" list so that we can test it as soon as possible (see #11) ! 😄

Are you willing to add your comment to the documentation so that people can reuse your work if they need to find an other crystal ? I think that it should go over this section of the documentation (feel free to add a new entry for crystals).
@dotsumae is this ok for you ?

@gbip
Copy link
Member Author

gbip commented Nov 16, 2018

I have troubles finding this crystal on online retailers (such as farnell or rs-components), where can we buy it ?

@goowza
Copy link

goowza commented Nov 17, 2018

Yes i'll do that :)
I can't find it either, but this one has almost the same caracteristics (the only differences are the size and the ESR value which is 80 ohms instead of 60 ohms). The gain margin value is changed but is equal to 42,4 so that's still > 5.

@gbip
Copy link
Member Author

gbip commented Nov 17, 2018

Nice, thanks !

@gbip gbip mentioned this issue Nov 20, 2018
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants