November 8, 2019

1. What is the register?

To the memory cell has a specific function to take an alias, this alias is what we often say that the register, the memory unit has been allocated to a good address specific functional process is called alias register map.

STM32 minimum system hardware Detailed

 

0: the power is reset to start the debug interface clock

 

1, the power supply: a plurality of generally plus 3.3V LDO supply decoupling capacitors 0.01uf  

 

2, Reset: Reset There are three ways: power-on reset, manual reset, automatic reset procedure

 

Normally Low Reset: (51 microcontroller reset high, capacitor resistor exchange position)

 

Power-on reset, the power-on instant, capacitor charging, the RESET a brief low level which is determined by the duration of the common resistor and capacitor, is calculated as follows: t = 1.1RC (fixed calculation formula) 1.1 * 10K * 0.0.1uF = 1.1S

 

Demand reset signal duration of about 1ms.

 

Manual Reset: When button is pressed, RESET and turned on, resulting in a low level, the RESET.

 

 

3, the clock: Crystal + + vibrating capacitance (feedback resistor MΩ stage)   

 

The internal clock:

 

To 100 feet or 144 feet of product, OSC_IN should be grounded, OSC_OUT should be left unconnected.

 

2) For less than 100 feet of product, there are two kinds of connection:

 

i) OSC_IN OSC_OUT and are grounded through a 10K resistor. This method can improve the EMC properties.

 

32.768KHZ:

 

Alternatively only then both high-speed external clock or multiple access 8MHZ external low speed clock of a 32.768MHZ.

 

32.768KHZ clocked: calendar for precise timing circuit

 

32.768KHz crystal is generally selected, because the 2 ^ 15 = 32768, and embedded chip divider register is typically arranged in the form of a power of 2, so that the frequency divider 15, it is easy to 1HZ elapsed. To achieve precise timings. Calendar for precise timing circuit 

 

Crystal: generally choose 8MHZ convenient octave     

 

Active: more stable and higher costs to the power supply requires no external circuit singlet output pin 3  

 

Passive: convenient and flexible enough accuracy substantially cheaper biggest difference: the need for a separate power supply requires external passive crystal vibrating capacitor: there are two sides of the crystal capacitors

 

 

Active crystal

 

effect:

 

1, so that the equivalent capacitance across the crystal load capacitance equal to or close;

 

2, play a role in filtering out high frequency noise in the oscillator waveform;

 

The size of the vibrating capacitor is usually selected 10 ~ 40pF, may of course be different according to the particular MCU Buyers Guide, if not described in the manual, usually selected 20pF, 30pF can, this is an empirical value.

 

Oscillation frequency adjusting capacitance can be adjusted:

 

In general, increasing the capacitance will decrease the oscillation frequency, the oscillation frequency will decrease the capacitance increases,

 

Feedback resistor: 1M limiting negative feedback is also

 

1, the chip terminal connected to the crystal is a linear operational amplifier, the input of the output reverse 180, resistor capacitor network load crystal composition is provided at a further 180 degree phase shift; the overall loop phase shift of 360 degrees, to satisfy oscillation phase condition,

 

2, the input resistance effect oscillator output is connected to a negative feedback, to ensure a high gain amplifier operating in a linear region, typically in European level M;

 

3, the flow restriction effect, the output of the inverter to prevent overdriving the crystal, crystal damage, because some of the oscillator need not be integrated into this resistor has a crystal inside.             

 

 

4, start: users typically are provided Boot0 Boot1 i.e. both low 0  

 

M3 nuclear devices has three start-up mode, there are four kinds of M4. Selected by BOOT0, the level BOOT1.

 

 

       STM32 three startup mode corresponds to the storage medium are built into the chip, which are:

 

1) = chip user flash memory built-in Flash.

 

2) SRAM =-chip RAM area, it is the memory.

 

Internal 3) a system memory chip = one specific area, the chip area of ​​this factory preset period Bootloader, is often said program ISP. In this region no shipped from the factory can be modified or erased, i.e. it is a ROM area, which is used as a communication port USART1.

 

       M4 Based on the above can be added at the start of FSMC BANK1 area.

 

 

5, the debug interface: STM32 two debugging interface, the JTAG pin 5, for the 2-wire serial SWD (a total of four wires)

 

 

There are also USB using procedural programming and data output: computer USB port can also be connected to a small load driving power.

 

Usually CH340G chip: USB to serial port.

 

It requires a separate oscillation circuit 12MHZ 

 

Using this chip will be mapped to your computer's USB port to use, attention should be installed on the PC serial port driver, or can not properly identify.

 

 

当烧写程序时,我们希望BOOT0=1,BOOT1=0。当烧写完成后我们希望BOOT0=0,BOOT1=0(这个模式BOOT1可以是0可以是1,这里我们让BOOT1拉低,即整个过程BOOT1都为L接地,简化电路设计)。

 

Guess you like

Origin www.cnblogs.com/dpc666/p/11822353.html