6423 views|14 replies

693

Posts

7

Resources
The OP
 

Why does the newly soldered STM32 main control board run about 10 times slower than normal after programming? [Copy link]

 
 
This post is from Innovation Lab

Latest reply

The crystal vibration stops when it does not move. 1. You can turn on the interrupt of the clock safety function. If the clock stops, enter the interrupt and do the corresponding operation. 2. After the clock is initialized after power-on, check whether the HSE and LSE are vibrating. If not, turn on a light and simply and roughly card a while1 to feed the dog, waiting for after-sales service to solve it.   Details Published on 2020-8-24 08:52
 
 

2w

Posts

0

Resources
2
 

"Using an oscilloscope to measure the crystal pins, I found that the crystal did not oscillate."

Which pin does the oscilloscope probe touch? Pin 5 or Pin 6 of the microcontroller? If the probe touches Pin 5, it may cause the quartz crystal to stop oscillating. The probe should be in X10 gear and touch Pin 6 of the microcontroller.

This post is from Innovation Lab

Comments

I used the oscilloscope at X10 to directly measure the crystal pin  Details Published on 2020-8-19 17:57
 
 
 

2w

Posts

0

Resources
3
 

In addition, the oscilloscope shows the quartz crystal oscillating, is the frequency correct?

This post is from Innovation Lab

Comments

The crystal oscillator does not start oscillating.  Details Published on 2020-8-19 17:58
 
 
 

693

Posts

7

Resources
4
 
maychang posted on 2020-8-19 17:51 "Using an oscilloscope to measure the crystal oscillator pin, it was found that the crystal oscillator did not oscillate" Which pin does the oscilloscope probe touch? Pin 5 or Pin 6 of the microcontroller...

I used the oscilloscope at X10 to directly measure the crystal pin

This post is from Innovation Lab

Comments

The crystal has two pins, and the probe should touch the pin that is connected to pin 6 of the microcontroller.  Details Published on 2020-8-19 19:24
 
 
 

693

Posts

7

Resources
5
 
maychang posted on 2020-8-19 17:53 In addition, the oscilloscope shows the quartz crystal oscillating, is the frequency correct?

The crystal oscillator does not start oscillating.

This post is from Innovation Lab

Comments

If the crystal does not oscillate, the microcontroller cannot work at all and no instruction will be executed. So your "running speed is about 10 times slower than normal" is very strange.   Details Published on 2020-8-19 19:28
If the crystal does not oscillate, the microcontroller cannot work at all and no instruction will be executed. So your "running speed is about 10 times slower than normal" is very strange.   Details Published on 2020-8-19 19:26
 
 
 

2w

Posts

0

Resources
6
 
bqgup posted on 2020-8-19 17:57 I used an oscilloscope at X10 to directly measure the crystal pins

The crystal has two pins, and the probe should touch the pin that is connected to pin 6 of the microcontroller.

This post is from Innovation Lab
 
 
 

2w

Posts

0

Resources
7
 
bqgup posted on 2020-8-19 17:58 The crystal oscillator did not start oscillating when it ran half a beat slower

If the crystal does not oscillate, the microcontroller cannot work at all and no instruction will be executed. So your "running speed is about 10 times slower than normal" is very strange.

This post is from Innovation Lab

Comments

Not surprising, there is also an internal crystal oscillator  Details Published on 2020-8-23 17:12
Not surprising, there is also an internal crystal oscillator  Details Published on 2020-8-20 07:52
 
 
 

2w

Posts

0

Resources
8
 
bqgup posted on 2020-8-19 17:58 The crystal oscillator did not start oscillating when it ran half a beat slower

It is best to use an oscilloscope to check whether the LED is oscillating when it is flashing normally, and observe whether the LED flashing frequency changes.

Use an oscilloscope to observe whether the LED is still flashing when the crystal does not oscillate, regardless of the flashing frequency.

This post is from Innovation Lab
 
 
 

693

Posts

7

Resources
9
 
maychang posted on 2020-8-19 19:26 If the crystal does not oscillate, the microcontroller will not work at all and no instruction will be executed. So your "running speed is slower than normal...

Not surprising, there is also an internal crystal oscillator

This post is from Innovation Lab
 
 
 

1w

Posts

142

Resources
10
 

It is good that the OP makes a careful summary when encountering problems. This is one of the keys to improving technical ability.

A few additional words about the author's summary:

1. The package has nothing to do with the function, but it should be noted that different crystals and crystal oscillators (note that crystals and crystal oscillators are different components) may have differences in other parameters besides frequency, but they are also unrelated to the package.

2. It is not that it will be fixed by leaving it for a period of time. Instead, the contact resistance of the poor welding residues between the pins will be high or low with the movement of the board and temperature changes. When it is low to a certain level, it will affect the operation of the local oscillator circuit.

3. If the problem is determined to be the crystal oscillator circuit, all components in the circuit, PCB routing, welding, etc. should be checked. The crystal oscillator circuit is sensitive to distributed parameters, especially the high-frequency overtone crystal oscillator circuit, which requires special attention.

After summarizing, the OP will probably not go around in circles next time he encounters a similar local oscillator problem.

This post is from Innovation Lab

Comments

Thank you for your help, the problem has been solved  Details Published on 2020-8-21 09:53
Personal signature上传了一些书籍资料,也许有你想要的:https://download.eeworld.com.cn/user/chunyang
 
 
 

693

Posts

7

Resources
11
 
chunyang posted on 2020-8-20 15:46 It is very good for the OP to make a serious summary when encountering problems. This is one of the keys to improving technical ability. Regarding the OP's summary, I would like to add a few words: 1. Enclose...

Thank you for your help, the problem has been solved

This post is from Innovation Lab
 
 
 

41

Posts

0

Resources
12
 
maychang posted on 2020-8-19 19:26 If the crystal does not oscillate, the microcontroller will not work at all and no instruction will be executed. So your "running speed is slower than normal...

For STM32, if the external crystal oscillator cannot vibrate, it will switch to the internal RC oscillator source. Since the frequency division coefficients behind the two oscillator sources are different, the delay time is different even if they have the same delay.

This post is from Innovation Lab

Comments

External and internal, does it switch automatically?  Details Published on 2020-8-23 17:29
 
 
 

2w

Posts

0

Resources
13
 
joeymm posted on 2020-8-23 17:12 For stm32, if the external crystal oscillator cannot vibrate, it will switch to the internal rc oscillator source. Since the frequency division coefficients behind the two oscillator sources are different, although...

External and internal, does it switch automatically?

This post is from Innovation Lab
 
 
 

377

Posts

0

Resources
14
 
You don't even need to measure. When measuring, you have to consider the effect of your probe capacitance on the crystal oscillator. Maybe the crystal oscillator is stabilizing and it stops when you measure. Doesn't the HSERDY flag in RCC look good?
This post is from Innovation Lab

Comments

The crystal vibration stops when it does not move. 1. You can turn on the interrupt of the clock safety function. If the clock stops, enter the interrupt and do the corresponding operation. 2. After the clock is initialized after power-on, check whether the HSE and LSE are vibrating. If not, turn on a light and simply and roughly card a while1 to feed the dog, waiting for after-sales service to solve it.  Details Published on 2020-8-24 08:52
 
 
 

377

Posts

0

Resources
15
 
LeoMe posted on 2020-8-24 08:50 You don't even need to measure. When measuring, you have to consider the effect of your probe capacitance on the crystal oscillator. Maybe the crystal oscillator is in a state of stagnation, and it stops when you measure. Look at the HSERDY flag in RCC...

The crystal vibration stops when it does not move. 1. You can turn on the interrupt of the clock safety function. If the clock stops, enter the interrupt and do the corresponding operation. 2. After the clock is initialized after power-on, check whether the HSE and LSE are vibrating. If not, turn on a light and simply and roughly card a while1 to feed the dog, waiting for after-sales service to solve it.

This post is from Innovation Lab
 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Related articles more>>

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list