inflearn logo

Understanding AMBA for Programmers: Reading APB, AHB, and AXI Buses Through Specifications and Boards

Have you ever seen with your own eyes how a line of code you wrote moves through a chip? Following hand-drawn diagrams and measurements on a real board makes the once-abstract flow of data inside a chip come into focus, and you can even start to see why bugs sometimes occur.

6 learners are taking this course

Level Basic

Course period Unlimited

Computer Architecture
Computer Architecture
ARM Architecture
ARM Architecture
soc
soc
amba
amba
cache
cache
Computer Architecture
Computer Architecture
ARM Architecture
ARM Architecture
soc
soc
amba
amba
cache
cache

What you will gain after the course

  • Diagramming the path (bus) a line of code takes inside a chip

  • Basic Rules and Differences in Data Writes and Reads in APB, AHB, and AXI

  • Explaining intermittent bugs (double interrupt entry, ordering issues, silent zeros) in terms of bus behavior

  • How to Find and Read Bus Diagrams in Chip Manuals and Original Arm Specifications Directly

  • The Big Picture: What the Latest Revisions (APB5, AHB5, AXI5) and Security Signaling Have Added

What You’ll Gain from This Course

You’ll be able to draw a diagram showing the path a line of code you wrote takes inside the chip. When a value you wrote doesn’t take effect right away, something acts up only occasionally, or the same code is fast in one place and slow in another, you’ll be able to explain why instead of just guessing.

How does a single line of code I wrote move inside a chip?

Learn from the ground up how data travels between the CPU, memory, and peripherals inside a chip—the paths called buses—and the rules that govern them (AMBA). Starting with the simplest, APB, we work our way through AHB and AXI, following each one through to its latest revision. 26 chapters, about 4 hours and 30 minutes.

We verify the paths inside an SoC that computer architecture books gloss over with a single diagram, using the original AMBA specifications, ARM Architecture documents, and measurements taken while changing cache settings.

About the Production Process

This course was created using an AI-based production process. The narration is synthesized speech trained on the instructor’s own voice, and AI tools were also used to create the script and hand-drawn visuals. The instructor personally handled the planning and content review, and the measurement results were verified by running the code on an actual STM32F429I-DISC1 board.

I wrote a value to a register, so why hasn’t it changed yet?

We learned that code runs one line at a time, from top to bottom. But inside the chip, the value I wrote leaves the CPU and travels along a path, sometimes waiting along the way or changing order with other requests. If you don’t understand this path, you may dismiss a “strange problem that only happens sometimes” as bad luck or a timing issue.

In this course, we’ll trace those paths by drawing them by hand from scratch. We’ll open the original documents that spell out the rules of the paths, highlight the relevant sentences, and verify them using measurements taken on an actual board.

From slow side streets to the highway

There isn’t just one road inside a chip. There’s a slow, simple road to peripherals, a wide road to memory, and a highway where multiple requests travel at once. This course starts with the easy road and works its way up, showing how the rules learned earlier change on each new road.

STEP 1

Side Street: APB

Writing and reading, waiting

STEP 2

Main Road AHB

Run concurrently, share the road

STEP 3

AXI, the high-speed highway

Tickets, Ordering, and Security

Why On-Chip Interconnects Matter Now

Modern chips contain multiple CPU cores, various accelerators, and numerous peripherals. The rules governing how these components exchange data are widely based on Arm’s AMBA. So no matter which chip you’re using, you’ll find a diagram of these pathways when you open its manual.

As tools that write code for you become more common, the value of developers who can explain why it behaves that way inside the chip grows even greater.

What You'll Learn

Paths and basic rules inside a chip

01 What Is a Bus? The Path a Line of Code Travels Along

02 See the moment memory is read and written on a timing diagram

03 AMBA fundamentals: understanding signals just by looking at their names

04 APB: Two steps to write and read a value, waiting and reporting failure

05 Why Interrupts Arrive Twice, and Writes Beyond the Bridge

Main Roads, Highways, and Security

06 AHB: Pipelined addresses and data, and how to change just 1 byte

07 Errors that point to the wrong lane and rules for sharing the road

08 AXI: Five Channels, IDs, and Burst Transfers

09 Ordering problems that volatile can't prevent and locks

10 A security checkpoint where 0 is read without errors, and changes in the latest edition

Gaps I’ve seen in 18 years of teaching in the field

Since 2008, I’ve taught developers at companies and institutions. Over the years, I’ve met many developers who write good code but don’t know much about the memory and buses that their code runs on.

  • They know that a wider bus is faster, but they can’t explain why.

  • They can’t explain the real reason you can’t add as much memory to a board as you want.

  • They don’t know what the memory controller does, so they get stuck when they first power up a newly built board and try to initialize the memory.

These blanks aren’t isolated from one another. Once you understand the paths inside the chip, they all fall into place at once. The number of address lines determines the upper limit of addressable memory, while the number of data lines determines how much can be transferred at a time. The memory controller is a translator that converts the bus’s language into the memory’s language, so the boot code must first tell it the width and speed of the connected memory. And most importantly, you start to see at a glance how the entire board is interconnected.

This course also answers the question I’ve heard most often in the field, “The code is correct, so why does it only act up sometimes?” with one diagram of the paths inside the chip and one number from the board.

AMBA Explained by a Software Developer, Since 2008

I am not a chip designer. I’ve been an embedded software developer from the very beginning, I am now, and I will continue to be one. But I’ve always been interested in hardware, so I studied assembly on my own. After working with ARM processors for a long time, I naturally became curious about the paths inside the chip that my code travels—the AMBA bus.

In 2008, wanting to leave a record somewhere of what I’d studied on my own, I posted a series titled 'Understanding AMBA' on my blog. Writing from the perspective of someone who writes code on top of circuits, rather than someone who designs them, I illustrated the timing diagrams in the specifications one step at a time. Back when it was hard to find clear explanations of AMBA in Korean, people were already leaving comments saying they were learning from the series and grateful for it—and they still do, 17 years later.

This course expands that explanation to cover AXI and the latest specifications, adds measurements taken on an actual board, and presents it as a new video. That’s why it explains everything from start to finish from a programmer’s perspective.

Some comments on the blog series; author names have been redacted

Screenshot from the APB installment of the June 2008 blog series “Understanding AMBA”

For those who could write code but saw the inside of a chip as a black box

It's okay if you've never heard the term “bus” before. Experience writing values to and reading them from registers is enough. By the end of this course, you'll be able to read the bus diagrams in chip manuals that you may have skipped over, thinking, “That's hardware stuff.”

I also recommend this course to chip designers. It shows you the other side of the equation: how software uses the hardware you create. Once you see what kinds of bugs a single error signal or a buffer that temporarily holds writes can cause for programmers, you’ll start thinking about what else to consider when designing and what to document in the manual.

What Makes This Course Unique

We’ll follow three strange bugs

A board that sometimes receives the same interrupt twice, a transfer that sends data before it’s fully filled, and a value that reads as zero without any error. We work through each case to learn the rules.

Explained with hand-drawn illustrations

I explain by drawing paths and signals with a pen on white graph paper. The illustrations build up alongside the explanation, so even first-time readers can follow the flow.

Alongside the original document

I highlight the original sentences containing rules and note their sources.

Verify on a real board

We explain it using measurements taken on an STM32 board.

through the latest edition

At the end of each part, we’ll trace the connections to APB5, AHB5, and AXI5.

Actual lecture screen

Why are the values at the back still old even though the buffer is full? Two writes illustrated with a truck and a motorcycle

Why zero is read without errors: stickers on cars and checkpoints inside the chip

How many wires would it take to connect each device separately? 6 wires for 4 devices, 28 for 8

How many clock cycles does it take to read flash once? Numbers measured directly on the board

Is APB2 the APB from AMBA 2? The trap hidden in the number

Why does the interrupt fire one more time after clearing the flag? A write crossing the bridge and a readback that completes first

I wrote just 1 byte, but all 4 bytes changed without a single error

The same 1 KB copy takes 6,155 cycles versus 696—what accounts for the nearly ninefold difference?

An on-chip intersection where the CPU and DMA pass at the same time—who turns on the traffic light?

The bus and memory chips speak different languages, with a translator between them

If each waits for the other to move first, the roads inside the chip come to a standstill

The first request sent is the last to return, but that doesn’t violate the rules

The line indicated by HardFault wasn’t the culprit; the PC pointed to the sixth line after the store instruction

A comparison table for diagnosing the three incidents and choosing which signal to check based on symptoms alone

Lab Environment

The board used in the course

  • STM32F429I-DISC1 (Cortex-M4)

  • Measure cycles, interrupt counts, and bus errors directly on the board.

Even without a board

  • We show all the measurement results in the video.

  • We walk through AXI and security features that aren’t available on the board using diagrams and sample code.

Frequently Asked Questions

Q. Can I take this course even if I know nothing about hardware or circuits?

Yes. We start with what a bus is. We don’t cover circuit diagrams or hardware description languages; we focus on how a line of code written by a programmer moves inside the chip. Experience writing to and reading from registers is all you need.

Q. Do I need a board?

No. We show all the results measured on the board in videos. The board used in the course is the STM32F429I-DISC1. AXI and security features that aren’t available on the board are explained with diagrams and sample code.

Q. Do I need to read the original English documents?

The original text is displayed on screen, with key sentences highlighted and their meaning explained in Korean. You can follow along without reading the English separately, and by the end of the course, you’ll be comfortable finding and reading the sections you need yourself.

Q. Is the narration AI-generated?

Yes. It’s synthesized speech trained on the instructor’s own voice. The instructor personally developed and reviewed the script and content, and the measurement screens show results verified by running them on actual hardware.

Recommended for
these people

Who is this course right for?

  • The Programmer Who Could Write Code but Saw the Inside of a Chip as a Black Box

  • Firmware, driver, and system developers who have written values to registers and read them back.

  • For those studying chip architecture and buses for the first time.

Need to know before starting?

  • C Language Basics

  • Experience writing and reading values to and from registers

Hello
This is guileschool

Career Verified

3,632

Learners

263

Reviews

281

Answers

4.7

Rating

9

Courses

I majored in electronic engineering at Inha University and worked as an embedded software developer.

I have been teaching in-person courses for 18 years since 2008. I taught developers at companies and institutions including Samsung Electronics, LG Electronics, SK hynix, Hyundai Mobis, LIG D&A, and Seoul National University, and compiled that experience into course materials.

『RTOS』(2008), 『Linux Shell』(2018), 『FreeRTOS』(2019), 『Cortex-M』(2022), 『Bootloader-Based Embedded Systems』(2023)

YouTube Giles School (https://www.youtube.com/@guileschool): Embedded Systems and Development Courses

I have also been researching Mac automation for 15 years. I teach ways to reduce repetitive tasks using Keyboard Maestro and AppleScript, and I develop and sell Greenlight, an automation plugin for Final Cut Pro. I publish the tools I create on GitHub (https://github.com/guileschool).

Captain Macbot on YouTube (https://www.youtube.com/@captainmacbot): How to use AI and automation on a Mac

Please send course requests and other inquiries to guileschool@gmail.com.

More

Curriculum

All

26 lectures ∙ (4hr 30min)

Published: 
Last updated: 

Reviews

Not enough reviews.
Please write a valuable review that helps everyone!

guileschool's other courses

Check out other courses by the instructor!

Similar courses

Explore other courses in the same field!

Limited time deal

$91.30

34%

$139.70