STM32 MCU learning, learning to master the idea of the word is no longer a rookie for you

  I want to say, in order to learn to learn SCM SCM away thinking wrong.

  You ask, how to systematically study entry STM32?

  Itself is a wrong question. If you use 8051, will be written in C, then the STM32 itself does not need to deliberate learning.

  You have to consider is what I can achieve with STM32?

  Why STM32 instead of 8051? 51 is because the frequency is too low to meet the computing needs? Pin 51 is too small to meet the many peripheral IO? 51 is too much power, battery word within? Is function 51 is too weak, and you want to use SPI, I2C, ADC, DMA? memory 51 is too small and too many things you want to store?

  When you need to use certain features STM32, and 51 can not be achieved, it STM32 natural need to learn, you will go directly to look for certain aspects of the STM32 use. For example, the network card to use spi protocol, to use the serial communication, use rtos and so on. . .

  From rookie to cow's learning step

  We assume that we have a certain understanding of the STM32 books or documents. If you do not understand, please read the STM32 immediately documentation for the most basic knowledge.

  Students with good English, do not think you are cattle, you can just look at the English document. After all, you are Chinese, you are most familiar with, understanding the best or Chinese. Look at the English or slower than the speed of some Chinese look, what we want is the shortest time possible, rather than pursuing short time to remember all the details. Of course, if it is a paper, it is recommended to see the English original is still good.

  STM32 processor time to enter the domestic market, ST official (or third party) to promote the work done very well. He translated a number of English documents, a lot of thinking to meet the domestic engineers.

  When learning to focus on two important documents: "STM32F103xxx Reference Manual", "STM32 firmware library user manual." This is sufficient for the time, energy of the students, it is recommended to download the required inspection documentation, for more information.

  Read "STM32F103xxx Reference Manual", we must pay attention, you do not need to read all - there is no time. Readings recommended, but reading the first few chapters. Memory and bus architectures, power control, backup registers, reset and clock control, and multiplexing functions common I / O, interrupt time and the like in the previous chapters must take time to read.

  Later chapters, is about a specific function modules. If we use which module, you can go read which module. For example, when using the AD, you need to read Chapter 10 ADC. No other example. I believe that every beginner has its own research and judgment.

  Read "STM32 firmware library user manual," mainly in order to simplify programming. STM32 provides us with a very good library firmware, we just need to call with. Of course, we can not touch these firmware library - the legend using it makes the code less efficient, is justified. The network also write a lot of code users themselves, without the use of library functions with firmware. How to choose, is your choice.

  My main emphasis is here, reading "STM32 firmware library manual" when the previous chapters also must read. Such as naming conventions, coding rules first chapter of the document and library specifications, these are the need to pay attention. The second chapter is the most critical, I hope you familiar. The second chapter describes the architecture of the firmware library, how are we going to use firmware libraries and other steps. With the foundation of the second chapter, we can make use of firmware library to write their own code. After the start of the fourth chapter, it can be read according to everyone's needs. In fact, the later chapters, there is a description of what a module function, such as how to use each function.

  On the following chapters, we recommend the GPIO library functions, interrupt part of library functions, library functions reset and clock settings to be more familiar with, because usually often used.

  These two documents mentioned above, it has been enough for you to see, huh, huh. I hope you get a lot of the basics from the STM32.

  Set a good two-week introductory program

  (1) where the so-called "Getting Started", referring to understand and master some common STM32 peripherals, processor really want to master a week or two simply can not explain what the problem. I can only say that you have some understanding. However, for us beginners enough.

  (2) where the so-called "two weeks", according to each person's schedule varies.

  If you have enough time to learn every day, you can specify your own as soon as possible can independently perform simple STM32 development.

  If you have only spare time to learn the STM32 every day, it is recommended to arrange a time for your specific situation. After all, if the planned time schedule is too tight, but do not receive good results, we can only enter a vicious circle, which we want to avoid.

  But it is recommended, regardless of whether your plenty of time, must give myself a plan !!

  I have here a list of ideas, for reference purposes only.

  A step of, after installing the software STM32 learning, such as J-Link, Keilfor ARM (MDK), ISP (if it needs to be downloaded from the serial port). These detailed steps to install the software, you can refer to the appropriate course of conduct we launched.

  Step two, HEX selected portion of the routine, such as an LED lamp routines HEX file download STM32 boards to reach the core, the two observed flickering of the LED lamp. This part of the operation, we can refer to the appropriate course of conduct introduced.

  In fact, the above two steps, in order to use familiar tools only. The feeling of belonging to find a stage. In fact, we have not yet started to learn the STM32!

  Step three, to prepare several commonly used documents, such as "STM32 User's Manual", "STM32 firmware library user manual" and other documents. Usually for review. These documents can be found in the CD-ROM chip manual directory.

  Step four, began to see the writing routine, the routine is to see how to write their own routines whether modifications to achieve the effect you want it?

  Step five, Ucos-II transplantation, the need to try?

  Congratulations, now, you can already freely independently developed. The final step, give yourself a goal (project), to implement it out!

  Again, more than just a learning STM32 ideas for your reference. Listed below are the key steps in front, I hope you entry as soon as possible.

  Step 1: Familiar debugging software

  For starters, we need at least two pieces of software: J-Link driver software, MDK (that is, the original Keil) software.

  The two software during installation of the software can view the Shenzhou development board user manual are not repeated here, you can refer to the launch of our tutorial "How to install J-Link driver software" and "How to install MDK (Keil) software." How to verify that you are already familiar with the operation of the debugging software? Very simply, the Shenzhou STM32 development board CD-ROM comes with a lot HEX file format, you can select some HEX file, to observe the results.

  The steps to achieve the goal: Familiar debugging software, such as programming HEX problem, you can simply determine the problem and resolved independently.

  Step 2: GPIO Programming

  This is the first contact with firmware library of programming, we must bite the bullet and go for firmware library. I suggest that you try to go with a firmware library. Instead of avoiding firmware library to write their own code - this will only happen in the study. Actual projects, hundreds of code, one by one, how to write? Firmware library function call to complete, is the king of the road.

  GPIO programming itself is actually quite simple:

  1, the GPIO port pins provided input or output mode. We conduct lighting code, usually set to the push-pull mode.

  2, the operation register, register to set or clear operation - this step, firmware library already provides special functions and GPIO_ResetBits GPIO_SetBits function, we just need to call to realize the setting and clearing of IO ports.

  3, a variety of patterns to achieve the flashing LED, so that they are familiar with the programming GPIO.

  The steps to achieve the goal: Familiar debugging software, such as programming HEX problem, you can simply determine the problem and resolved independently.

  Step 3: Start a new STM32-depth study

  After programming and debugging more familiar and GPIO port debugging software, I believe you already have some knowledge of the STM32.

  At least you know how to use the STM32 firmware library to write a code. At this stage, it will be exposed to serial programming, programming the TFT LCD driver, timer programming, a serial peripheral interface SPI programming, program memory, SD card file system migration, USB reader, UCOS transplantation, can also have the energy Research other peripherals.

 

I gave out some information for your reference stm32 in the learning process right

Communication protocols - UART serial port protocol
http://www.makeru.com.cn/live/3576_1437.html?s=45051
STM32 The SPI communication
http://www.makeru.com.cn/live/3523_1795.html?s = 45051

(ADC reading light sensor)
http://www.makeru.com.cn/live/1392_1004.html?s=45051

From the microcontroller to embedded linux we need to do what
http://www.makeru.com.cn/live/5413_1994.html?s=45051

(Stm32 serial application)
http://www.makeru.com.cn/live/1392_1164.html?s=45051

Guess you like

Origin www.cnblogs.com/111111lbj/p/11412746.html