Blue Pill crystal does not start

Generic boards that are not Maple or Maple mini clones, and don't contain the additional USB reset hardware
flodejr
Posts: 29
Joined: Sat Sep 16, 2017 2:46 pm

Blue Pill crystal does not start

Post by flodejr » Sat Oct 21, 2017 8:57 pm

Hi,

I am trying to use the RTC functions on the blue pill using backup vbat, but the LSE crystal doesn't seem want to start at all.
Any recommendations of crystals that could be used to replace it? Must I use another MC-306 or can I use a tuning fork crystal?

User avatar
RogerClark
Posts: 7458
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Blue Pill crystal does not start

Post by RogerClark » Sat Oct 21, 2017 9:00 pm

This question has been asked before, mainly by people using boards without the crystal.

Try Googling this site for terms like RTC crystal, or 32khz crystal.

edogaldo
Posts: 285
Joined: Fri Jun 03, 2016 8:19 am

Re: Blue Pill crystal does not start

Post by edogaldo » Sun Oct 22, 2017 1:05 pm

flodejr wrote:
Sat Oct 21, 2017 8:57 pm
Hi,

I am trying to use the RTC functions on the blue pill using backup vbat, but the LSE crystal doesn't seem want to start at all.
How did you check the problem is in the LSE?
Anyway base on my experience, problems in the crystal startup can be due to shortcuts between the crystal pins.

User avatar
ahull
Posts: 1650
Joined: Mon Apr 27, 2015 11:04 pm
Location: Sunny Scotland
Contact:

Re: Blue Pill crystal does not start

Post by ahull » Mon Oct 23, 2017 9:18 am

flodejr wrote:
Sat Oct 21, 2017 8:57 pm
Hi,

I am trying to use the RTC functions on the blue pill using backup vbat, but the LSE crystal doesn't seem want to start at all.
Any recommendations of crystals that could be used to replace it? Must I use another MC-306 or can I use a tuning fork crystal?
Are the load capacitors fitted to your board? I have used a bunch of different 32768 Hz cheap watch crystals some from ebay, some recovered from my junk bin, and they all just worked. Others on this forum have not been so lucky.

Which board are you using?

The supplier I bought from in 2015 is still listing them (first item on the list)... https://www.ebay.co.uk/sch/sis.html?_nk ... 2749.l2658
... and that ebay link will get you lots of similar options.
- Andy Hull -

flodejr
Posts: 29
Joined: Sat Sep 16, 2017 2:46 pm

Re: Blue Pill crystal does not start

Post by flodejr » Wed Oct 25, 2017 1:36 am

edogaldo wrote:
Sun Oct 22, 2017 1:05 pm
flodejr wrote:
Sat Oct 21, 2017 8:57 pm
Hi,

I am trying to use the RTC functions on the blue pill using backup vbat, but the LSE crystal doesn't seem want to start at all.
How did you check the problem is in the LSE?
Anyway base on my experience, problems in the crystal startup can be due to shortcuts between the crystal pins.
I did a code debug and the code was waiting on settings on the RTC register, that means the clock signal is not running.

flodejr
Posts: 29
Joined: Sat Sep 16, 2017 2:46 pm

Re: Blue Pill crystal does not start

Post by flodejr » Wed Oct 25, 2017 1:53 am

ahull wrote:
Mon Oct 23, 2017 9:18 am
flodejr wrote:
Sat Oct 21, 2017 8:57 pm
Hi,

I am trying to use the RTC functions on the blue pill using backup vbat, but the LSE crystal doesn't seem want to start at all.
Any recommendations of crystals that could be used to replace it? Must I use another MC-306 or can I use a tuning fork crystal?
Are the load capacitors fitted to your board? I have used a bunch of different 32768 Hz cheap watch crystals some from ebay, some recovered from my junk bin, and they all just worked. Others on this forum have not been so lucky.

Which board are you using?

The supplier I bought from in 2015 is still listing them (first item on the list)... https://www.ebay.co.uk/sch/sis.html?_nk ... 2749.l2658
... and that ebay link will get you lots of similar options.
I have ordered some crystals and waiting for delivery. Anyway right now I have some other problems on the RTC. I may have to rely on an external RTC and if thats the case, I would rather go on the Amtel platform.

User avatar
ahull
Posts: 1650
Joined: Mon Apr 27, 2015 11:04 pm
Location: Sunny Scotland
Contact:

Re: Blue Pill crystal does not start

Post by ahull » Wed Oct 25, 2017 9:47 am

flodejr wrote:
Wed Oct 25, 2017 1:53 am
I have ordered some crystals and waiting for delivery. Anyway right now I have some other problems on the RTC. I may have to rely on an external RTC and if thats the case, I would rather go on the Amtel platform.
What problems are you having? In my opinion, I found the RTC pretty easy to use, and very flexible, (once I had figured out how it worked :oops: ).

Any issues I encountered were related to the type of STM32 board I was using. Some boards implement the RTC circuitry correctly. Others take a few liberties.
- Andy Hull -

User avatar
Squonk42
Posts: 185
Joined: Thu Dec 29, 2016 9:25 am
Location: Bordeaux, France

Re: Blue Pill crystal does not start

Post by Squonk42 » Wed Oct 25, 2017 7:34 pm

Here is the must-read application note on the STM32 oscillator design:
http://www.st.com/content/ccc/resource/ ... 221665.pdf

User avatar
ahull
Posts: 1650
Joined: Mon Apr 27, 2015 11:04 pm
Location: Sunny Scotland
Contact:

Re: Blue Pill crystal does not start

Post by ahull » Wed Oct 25, 2017 8:07 pm

Any of the Bluepills I used, just worked, so you may simply have a defective board. I tend to buy these cheap boards two at a time, partly because there is no quality guarantee. Having said that, all the boards I have bought, did work.

I touched on this briefly in this thread -> viewtopic.php?t=79&start=40#p2844
.. and here ... -> viewtopic.php?t=658

If you have access to an oscilloscope, you can verify if the oscillator is working.
- Andy Hull -

flodejr
Posts: 29
Joined: Sat Sep 16, 2017 2:46 pm

Re: Blue Pill crystal does not start

Post by flodejr » Wed Oct 25, 2017 8:36 pm

ahull wrote:
Wed Oct 25, 2017 9:47 am
flodejr wrote:
Wed Oct 25, 2017 1:53 am
I have ordered some crystals and waiting for delivery. Anyway right now I have some other problems on the RTC. I may have to rely on an external RTC and if thats the case, I would rather go on the Amtel platform.
What problems are you having? In my opinion, I found the RTC pretty easy to use, and very flexible, (once I had figured out how it worked :oops: ).

Any issues I encountered were related to the type of STM32 board I was using. Some boards implement the RTC circuitry correctly. Others take a few liberties.
I am not sure if I have implement the alarm function correctly. It seems that the RTC clock will stop when the alarm interrupt is triggered and you have to re-engage it, losing a few ticks or more depending on how your ISR works. Anyway, I have reverted to polling and RTC with Alarm is working now off LSI, waiting for the crystals to arrive, hopely I can resolve the LSE problem.

Post Reply