I embarked on the road of embedded development in a daze. Looking back, it was thanks to several friends around me that I slowly embarked on this road through chatting with them: from the earliest circuit design, PCB board making, circuit debugging, simulation, microcontroller development to the later ARM development. Looking back, I was also very nervous and treading on thin ice.
I started working in electronics with AVR microcontrollers, playing around with I/O, buttons, memory, and peripherals. After I started working, I started playing with ARM. I gradually gained some insights into ARM development during the project.
There are two purposes for learning ARM, depending on whether you are: 1. To gain knowledge and have fun; 2. To engage in ARM development for work. These should be treated separately.
If you want to broaden your horizons, play around, and prepare for future work, then you should choose very mature devices on the market such as ARM7, ARM9, which have more information and more people playing with them, so problems that arise are easier to solve. If it is required for work, there will not be so many choices, and you must start conquering specific devices according to functional requirements.
Regardless of the purpose, I feel the learning steps are similar, first bare board, then the operating system:
The reason for this arrangement is that I listened to many suggestions and opinions from experts. As the saying goes, "a tall building starts from the ground", the foundation is very important. Before installing the operating system, you must have a certain understanding of the underlying code, especially the bare board program. In this way, there will be fewer problems involving the underlying layer in the operating system.
Now I will introduce some basic skills based on my experience of learning ARM11 (s3c6410-1176JZF).
First of all: you need to have a certain basic knowledge of electronics.
Isn't this nonsense? If you are playing with ARM, of course you know electronics. Actually, it's not true! Electronics foundation can be deep or shallow, how can it be a beginning? Knowing IC amplifiers and building signal processing circuits are the basic skills in signal processing. For ARM development, I feel that the focus is on signal routing, filtering , voltage regulation and maintaining stable chip performance (analyzing an ARM board will make you understand these principles).
Let me share my opinion: Understand the functions of components other than integrated IC in ARM board, the most common ones are capacitors , driving LED , speakers , serial port connection, memory connection, LCD screen connection, etc. When you see the serial port, you will remember how to connect; when you see the button, you will remember how to identify it... Basically, the whole system can be connected in hardware.
Secondly, you need to have a certain level of English reading ability.
When I was developing, I used the Linux Application Complete Development Manual, the 6410 manual, and the ARM1176jzf kernel manual as the basis. These three documents, one in Chinese and two in English, have a total of 2,500 pages. If you don't have patience and want to complete the development as soon as possible, it's like looking for fish in a tree. The 6410 manual is an introduction to the ARM11 chip and a general introduction to the registers: including GPIO settings, camera interface, Nandflash controller, DRAM controller, etc. 1176jzf is an introduction to the settings of the 1176jzf processor.
For simple GPIO settings, we can refer to the GPIO chapter of 6410.
From this we can see the function of each group of pins: each group of pins is mixed multiplexed (except for GPI and GPJ). According to the knowledge of MCU, if the pins are multiplexed, the corresponding register settings must be used to meet the corresponding requirements. At this time, we need to look at the GPIO register setting chapter:
For the GPA group,
It can be seen that port A has read and write functions and has corresponding addresses. From the memory mapping diagram, it can be seen that port A can complete the corresponding operation by configuring the corresponding register (that is, the corresponding address) to a suitable value.
For the GPA0 pin, define it as input, output or serial port mode by configuring it to 0000, 0001 or 0010. The specific operations are as follows:
Through these three operations, GPA0 can be set to output function, and if an external LED is used, the control of the LED light can be realized.
In addition, there are data registers, pull-up control registers, configuration sleep and pull-up sleep registers. Their operating principles are the same. Put the corresponding register address into a register and write the value to complete the corresponding configuration.
Third, you need to have some basic knowledge of assembly and C language.
Why do I say that? First, let's look at the ARM startup code that configures the I/O port for simple input and output:
In the startup code of 6410, registers need to be set and configured in assembly language. Now let's analyze this part briefly:
When writing a bare board program, you need to start with .globl and pass
Map peripheral addresses to peripheral addresses, through
Set the memory size to 256M. How to do it? Check the 1176jzf manual:
It can be seen that the 6410 manual and the 1176jzf manual are a powerful tool for bare board programming.
Fourth, learn by analogy, integrate knowledge, and utilize the Internet.
A 6410 manual has 1378 pages, and a 1176jzf manual has 972 pages. It is an unattainable task to read them all, so it is necessary to be able to draw inferences from one example and integrate them. In addition, you also need the help of Google. During the development process, if you encounter new functions and new interfaces that have not been used before, Google can play its role as a god and lead you to complete the task.
For example, in a write stack operation, the values of each register need to be saved, and the stmdb instruction needs to be used. If you are not familiar with it, you can ask Google for help.
Through the introduction, you can understand the specific operations.
Although ARM is updated very quickly, it does not mean that we have to learn new technologies from scratch every time a new product comes out. As long as we are familiar with and master one MCU, we can expand the technology to the appropriate fields by learning from it.
Previous article:Analysis of wireless audio and video intercom system based on ARM Linux
Next article:Analysis of exception handling based on ARM processor
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- 【NUCLEO-L552ZE Review】-2: Stay in TrustZone
- RAM with integrated power backup
- TMS320xF24xx to C2000 Piccolo TMS320F280xx Migration Overview
- What should I do if my phone screen is broken?
- Active Crystal Oscillator - Voltage Controlled Oscillator
- 【TI recommended course】# Hall position sensor application overview#
- 8051 single chip ultrasonic transceiver split ruler (GPS / BDS chip PPS signal as time synchronization, synchronization error is about ten...
- MicroPython officially releases pyb D series development board
- Ask for the direction positioning principle of Bluetooth 5.1
- A few pictures help you easily understand DDR crosstalk