Want to learn the CORTEX-M processor in a systematic way? We will clearly explain the two most important topics in embedded systems: assembler and interrupts.
Complete analysis of exception handling process from start to finish
Clock controller
Boot code analysis
ARM Cortex-M Processor in One Lecture Check out everything from concepts to practical know-how.
Course Topics 📖
ARM Cortex-M
The most popular 32-bit microprocessor for embedded systems. Representative processors include CORTEX-M3, CORTEX-M4, CORTEX-M0, and CORTEX-M33. It is applied to products in various fields because it has low power consumption and is price competitive.
Source: ARM
CORTEX-M processor is the most popular and noteworthy 32-bit microprocessor used in embedded systems in various fields including drones, smart factories, autonomous vehicles, aerospace, medical diagnostic devices, home appliances, Internet of Things, and environmental energy.
The CORTEX-M processor is suitable for applications that prioritize price and power efficiency over performance. It is a processor with a low gate count, low interrupt latency, and debug capabilities . Supports THUMB2 instructions as the basic instruction set. The NVIC is tightly integrated with the processor core, providing low-latency interrupt handling . Supports ' tail chaining ' and ' LATE ARRIVING ' interrupts to improve interrupt response time. Supports bit -bands, including bit- band write and read operations to support atomic access.
Microcontroller boards from STmicro are readily available for under $100 .
developer
I don't think there has ever been a time in the past few decades when developers were valued as much as they are now. When you ask young people what they want to be when they grow up, you might hear the answer "doctor" or "prosecutor" along with the word " developer ."
As developers become more valuable and their salaries rise, computer science and electronic engineering are ranked high in the popularity rankings of universities. Just like the movie title “As Good as It Gets,” it reminds me of people who set out for El Dorado in search of gold in the 19th century American West. It could be called the golden age of developers.
Developer with problem solving skills?
This comment that leaked out from inside a domestic company M in 2016 was even on the news and was talked about for a while. And even if this had not happened, it is a word that everyone would have heard at least once in their lives. But a developer with problem-solving skills? Why did this become an issue?
What I understand this sentence to mean is, in simple terms, this. Let me give you an example. This code is definitely mine. There is definitely a bug in this program. I know it. But I can't fix it. It can take hours, days, months.
If you ask me if something like this could really happen, I would say that of course this situation is possible. That's why it became an issue.
Coding is something that anyone can do with a little bit of knowledge, but problem solving is a whole other level of problem.
Embedded Systems Developer
It is difficult to create software that works on embedded systems, but it is even more difficult to solve rare and tricky problems. This is because, depending on the case, narrowing the scope of the problem down to software alone may not solve the problem. It is necessary to consider that the components of embedded systems are 'hardware + software'.
Even now, many new types of silicon are released every year. Also, many more types of hardware are made that use these chips. Can we believe that all of this is hardware-wise perfect?
When troubleshooting, the possibility of a hardware bug should also be considered. If a problem is not easily solved, software developers should be able to consider whether it is a hardware problem or a software problem.
But this is something that should be trained regularly. It is difficult to convince anyone by claiming, “This is a hardware problem” or “This is a software problem” without any basis.
I have met quite a few software developers who, whether voluntarily or not, have little knowledge of hardware, or even no interest at all. That is why developers with problem-solving skills are all the more valuable and important in this field.
paradigm shift
The conclusion is already out there. You have to try to understand the hardware. Understanding hardware doesn't necessarily mean soldering electronic components onto a printed circuit board. It doesn't mean mastering LEDs or push-button keys.
Rather, you should study assembler and understand the basic principles of how embedded systems work . The two key words that I believe and understand in solving embedded software are assembler and interrupt .
Assembler is for understanding hardware, and interrupts are a software mechanism that runs asynchronously, so they are likely to harm the stability of the system. Therefore, you should learn them well to create reliable software.
Modern compilers are much smarter than they used to be. They are good at producing optimized code. The days of coding in assembly language to improve system performance are a thing of the past. So why do I emphasize assembly language so much?
The reason we learn assembler is to better understand how embedded systems work. Assembler helps developers see into the inner workings of embedded systems .
Just as the saying goes, “Don’t look at the trees, look at the forest,” no matter what you study, you should constantly try to understand the structure (system) of the subject you are studying. We need to think again that embedded systems are “hardware + software.”
If you have been developing for more than two years and have not seen any significant improvement in your embedded system development skills, it is time to fundamentally change your learning method.
There is a saying that goes, 'If you invest 10,000 hours in any field, you will become an expert in that field.' I agree with that, but I would like to change this sentence a little bit. It would be, ' If you invest 10,000 hours in any field in an effective way, you will become an expert in that field .'
The benefits of learning assembler
In addition to the advantages mentioned above, learning assembler has several additional benefits.
First , any software unconditionally includes 1-5% of assembly code (you will know why if you study assembler). If you understand the embedded assembly code, you will be able to have 100% complete control over the software. Second , it creates a foundation for understanding boot code (not the bootloader) written in assembler and being able to code it yourself. Third , the spectrum of debugging (troubleshooting) tool usage capabilities broadens and deepens. Fourth , we can improve the quality of software to improve system performance and utilize memory efficiently. Fifth , making software that runs on one hardware run on another hardware is called porting, and in this case, the ability to use assembler is essential. Sixth , you can easily understand pointers in the C language. (The concept of address is essential when controlling memory or I/O devices in assembly language.)
conclusion
This course (ARM Cortex-M Processor Programming) covers both of these (assembler, interrupts) for sure.
If you think you are not interested in assembly language, please ignore this course and filter it out. I only want to go with people who truly understand its value.
In offline ARM processor training, I have always emphasized this content to students as a personal belief. Through this course, I would like to provide a perspective to look at embedded systems from a different perspective.
You will learn: 📚
What will you learn ✅
Is it okay to use unaligned access ?
The Importance of Assembler
How the pipeline works
Inline assembler
Linker script
Operating Principle of NVIC Device
Complete analysis of exception handling procedures from start to finish
Clock controller
Reproducing tail chaining and interrupt nesting in practice
Boot code analysis
All of the above are the core topics of this lecture. Now, let's get into the details.
First, is it okay to use unaligned access?
Unlike previous ARM processors that did not allow unaligned access, CORTEX-M processors allow unaligned access by default. Let’s consider the pros and cons of using unaligned access.
Second, the importance of assembler
When developing embedded software, it is easy to assume that there are no hardware problems, and anyone can fall into unexpected traps at any time when developing software. In order to find and solve such problems, a certain level of understanding of hardware is required. Each individual hardware device, including memory, has its own unique operating characteristics, and this is what we mean by understanding them. The first easy thing to do to increase your understanding of hardware is to learn assembly language. I would like to say again that indirectly experiencing hardware through assembly language is the starting point for software engineers to understand hardware.
Third, the operating principle of the pipeline
Pipelined processors are more efficient than non-pipelined processors. It is hard to imagine an ARM processor that does not use pipeline technology. Let's study the pipeline operation principle of the CORTEX-M processor and its implications.
Fourth, inline assembler
What is inline assembly? Simply put, it means writing assembly code in the form of a C function. The external form of inline assembly looks like a C language function, but the actual content is an assembly instruction. Assembly instructions are also closely linked with local variables in the C function. In the case of MSR and MRS instructions that cannot be replaced with C language, if they are implemented and used inline assembler, the value of inline assembler shines.
Fifth, linker script
The STM32CubeIDE compiler automatically generates many sources and creates various files, including makefiles, required for compilation through an automated process. A file called a linker script is also one of the automatically generated files, and the linker always refers to this file to create the final executable file desired by the user. Let's learn about the role of the linker and the linker script syntax.
Sixth, the operating principle of the NVIC device
Unlike ARM7, ARM9, and ARM11 processors, CORTEX-M processors are designed to have a closer connection by incorporating the NVIC, an interrupt controller device, inside the CORTEX-M processor. Understanding the operating principle of NVIC is also the starting point for understanding interrupts, which play an important role in embedded systems.
Seventh, complete analysis of exception handling procedures from start to end.
The process until the exception handler is executed when an exception, including a hardware interrupt, occurs. It describes the entire process from the execution of the exception handler code to the restoration of the program code just before the exception occurred.
Eighth, clock controller
Learn the operating principles of the clock system, which supplies clocks to various hardware devices interfaced with AHB and APB, including the CORTEX-M core, inside the STM32 CORTEX processor, and strengthen your confidence in clock control by directly changing the system clock frequency through hands-on training.
Ninth, let's actually reproduce tail chaining and interrupt nesting.
CORTEX-M processors support the so-called 'tail chaining' technology to improve the efficiency of exception processing speed. We will learn the operating principle and practice how much this technology contributes to improving interrupt responsiveness. We will also look at interrupt nesting.
Tenth, Boot Code Analysis
Trying to understand the boot code of a software can also be a great help in understanding the overall structure of embedded system software. Rather than simply using the boot code, by interpreting the meaning contained in the boot code, we can derive a more advanced direction for software. Of course, this also has the importance of essential prior knowledge for tasks such as porting bootloaders or RTOS.
ARM Processor Lecture Know-how with Over 14 Years of Experience💡
I created this course with your time as precious as my own.
Based on my experience in conducting ARM processor field lectures for 14 years with over 1,000 students, I have created this online lecture to meet more students. I will meet you as an online lecture that optimizes the content of 5 days of field lectures to 15 hours .
Recommended for these people! 🔑
Embedded Systems Beginner
Already CORTEX-M I'm using it though Systematic organization Anyone in need
In embedded software To increase understanding of Korea Hardware Developer
Successful RTOS porting and For operation Microcomputer knowledge Anyone in need
Besides that, it would be good for people like this to learn too!
👉 For those who want to develop products with high system stability and reliability
👉 For those who want to learn ARM assembly language
👉 Those who need to learn inline assembly, linker script, and boot code
👉 For those who do not have time to attend offline classes
📢 Check your player knowledge!
You should know the C language as prerequisite knowledge for learning.
What's special about this course ✨
Feature 1. The video is divided into approximately 110 subchapters, making it easier to find later.
Feature 2. 2D animation was actively used to help with understanding.
Feature 3. We have made it possible for students to have an experience similar to participating in a practical training session directly on site.
Feature 4. It helps you boldly discard unnecessary content and focus more on the core .
Feature 5. We have put in every effort to ensure that you can learn through videos alone, without having to look at developer manuals such as databooks.
A textbook (pdf) consisting of approximately 400 slides used in the lecture is provided.
Check out the tools we use 🧰
Compiler: STM32CubeIDE
Practice Board: STmicro Official Board STM32F429I-DISC1
Practical examples and textbook files: CMPro_tutorials.zip (located in s102_Practical Environment Construction Getting Started with STM32CubeIDE )
The board used in the lecture is STM32F429I-DISC1.
Created a lecture Introducing the knowledge sharer ✒️
Hong Young-gi (Gail School)
Main history
1994: Development of 68HC11 MCU-based set-top box system software
1995: Development of 68020 set-top box system software
1997: Development of MPC860 VoIP gateway system software
2001: Development of ARM720T portable MP3 player
2003: Development of ARM920T portable MP3 player
2008~Present: ARM Processor Architecture and Utilization Practical Field Lecture
etc
Development of a bootloader supporting USB downloading based on BLOB open source
Q. Can someone who doesn't know the C language take this course?
If you do not know the C language, you may have difficulty understanding the practical parts of the class.
Q. Can intermediate level students also take this course?
This course is designed to cover not only those who are new to embedded system development, but also intermediate users who are already using CORTEX-M. With 14 years of experience teaching ARM processors at Samsung Electronics, SK Hynix, Hancom Academy, Korea Radio Promotion Agency, KEA, Motorola Semiconductor, and Polytech (Incheon), I have been able to cover the particularly difficult parts and important topics of ARM processor embedded programming in depth.
Q. There are various types of STM32 boards for practice. Is any of them okay?
In the video, the class is currently conducted based on the STM32F429I-DISC1 board. Additionally, NUCLEO-F103RB , NUCLEO-F401RE boards are also supported. There are no plans to support additional boards. For those who are purchasing a new board for this training, westrongly recommend the STM32F429I-DISC1 board.
📢 Please check before taking the class! (License)
Presentation materials used in the lecture are provided to students free of charge in PDF document format .
The accompanying documents are to be used only for personal use as supplementary materials to lecture videos within Inflearn. When copying part or all of the contents of the book (including reprinting on a website or printed media, or copying as an electronic file), permission from the copyright holder, Hong Young-ki, a knowledge sharer, is required in accordance with Article 42 of the Korean Copyright Act, regardless of whether or not the purpose is commercial, except for personal use as stipulated in Article 27 of the Korean Copyright Act.
See other lectures together 🔍
Recommended for these people
Who is this course right for?
Introduction to Embedded Systems
If you are considering optimizing an embedded system
Those who are already using CORTEX-M but need a systematic organization
Hardware developers who want to improve their understanding of embedded software
Those who need microcontroller knowledge for successful RTOS porting and operation
Anyone who wants to learn ARM assembly language
Those who need to learn inline assembly, linker scripts, and boot code
Those who need professional debugging techniques for embedded system software
Need to know before starting?
C language
Hello This is
3,192
Learners
215
Reviews
262
Answers
4.7
Rating
5
Courses
인하대학교 공과대학에서 전자공학 학사 학위를 받았으며 임베디드 시스템용 소프트웨어 개발자로써 수년간의 경력을 쌓았습니다. 임베디드 시스템 및 프로그래밍을 위한 전문 강사로도 활동 중입니다. 아이폰 3GS 등장과 같은 시기에 맥(북)에 입문하였고, 그때부터 맥(북) 자동화에 관심을 갖게 되었습니다. '맥(북)에서 사용할 수 있는 시리 리모트', '키보드마에스트로를 이용한 구글번역기' 같은 오픈 소스를 깃허브(https://github.com/guileschool) 에 두고 개발 및 유지보수하고 있습니다. 오픈 소스 하드웨어 '비글본블랙' 에도 많은 관심을 가지고 있습니다. 맥(북) 자동화를 이용하여 생산성을 높일 수 있는 컴퓨터를 사용하는 모든 분야에 관심을 가지고 있고, 이를 필요로 하는 사람들을 돕고 있습니다.
※ 1-line summary: Don't worry about anything and just listen unconditionally. Even if the tuition is 1 million won, you absolutely must listen.
After reading the books <Embedded Sketch> and <Embedded Recipe>, I paid for Professor Hong Young-gi's lecture for the purpose of organizing and practicing ARM content, and it took 7 days to complete the course.
◆ Pros
- It's easy to understand because he explains it so well.
- It's so easy to take the course with editing the gaps between words, editing the waiting process, editing the board video, etc.
- I especially liked the last chapter, where he explained the linker script and bootloader line by line.
◆ Tips
- He answers questions really kindly and introduces additional materials that are good to read. Check the Q&A board every time you take a lecture.
- It's good to open the two datasheets PM0214 and RM0090 and listen to the lecture.
You've done well ^^. Thank you for watching the video until the end, and thank you for your hard work. There must be many shortcomings, but thank you for your good evaluation of the lecture. The detailed course review you wrote will be a good reference for many people who are considering taking this course in the future. Embedded Jun, Happy New Year and I hope your wishes come true :-)
This is a systematic summary of Cortex-M. Not only can it be applied to M0/M4/M7, but it is also possible to use debugging through assembler to check where the firmware is messed up when using multiple interrupts, so it is a basic lecture that is essential for advanced firmware designers.
I was using embedded software, but assembler was an unfamiliar area, so I thought I should learn it, but I couldn't easily get the hang of it.
I think I gained some confidence through the instructor's lecture.
Thank you for the helpful lecture!
"This is a lecture I would like to recommend to those who want to easily understand embedded infrastructure technology and ARM operating principles.
When a compilation error occurs, I feel psychologically discouraged, and if it is not C grammar but a strange command that I have never seen before, I get even more stressed. After taking this lecture, I was able to handle such errors more leisurely.
It is easy to understand because the key content is divided into short sections and explained with practice. Even if you do not directly handle ARM commands in practice, you will be able to approach problem solving from a more diverse perspective because you know the basic technology of the processor that you learned in the lecture.
Thank you for making this lecture^^
Hello, Taewan Sung! I am so grateful that you found this lecture helpful. I will continue to work hard to create more useful and diverse lectures. Thank you for your positive feedback on the lecture :-)