Introduction to AMBA, AHB and APB in stm32

Publisher:ularof不加糖Latest update time:2018-10-20 Source: eefocusKeywords:stm32  AMBA  AHB  APB Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

AMBA (Advanced Microcontroller Bus Architecture) is an on-chip bus introduced by ARM. The AMBA specification mainly includes: AHB (Advanced High-performance Bus) system bus and APB (Advanced Peripheral Bus) peripheral bus. Among them, the interconnection of AHB adopts the traditional shared bus with master module and slave module, and the interface and interconnection functions are separated, which is of great significance for the interconnection between modules on the chip. AMBA is not only a bus, but also an interconnection system with interface modules.

AMBA-based System-on-Chip

   A typical system block diagram based on AMBA bus is shown in Figure 3.

[Reprint] Introduction to AMBA, AHB, and APB in STM32

    Most modules (including processors) on the bus are functional modules with a single attribute: master or slave. The master module is the module that issues read and write operations to the slave module, such as the CPU, DSP, etc. The slave module is the module that receives commands and responds, such as the on-chip RAM, AHB/APB bridge, etc. In addition, some modules have both attributes. For example, direct memory access (DMA) is a slave module when it is programmed, but it must be a master module when the system reads and transmits data. If there are multiple master modules on the bus, an arbitrator is needed to decide how to control the access of various master modules to the bus. Although the arbitration specification is part of the AMBA bus specification, the specific algorithm used is determined by the RTL design engineer. The two most commonly used algorithms are the fixed priority algorithm and the round-robin algorithm. There can be up to 16 master modules and any number of slave modules on the AHB bus. If the number of master modules is greater than 16, an additional layer of structure is required (see the Multi-layer AHB specification launched by ARM for details). The APB bridge is both the only master module on the APB bus and a slave module on the AHB system bus. Its main function is to latch the address, data and control signals from the AHB system bus, and provide secondary decoding to generate selection signals for APB peripheral devices, thereby realizing the conversion from AHB protocol to APB protocol.

About AHB

    AHB is mainly used for the connection between high-performance modules (such as CPU, DMA and DSP, etc.). As the on-chip system bus of SoC, it includes the following features: single clock edge operation; non-three-state implementation; support burst transmission; support segmented transmission; support multiple master controllers; configurable 32-bit to 128-bit bus width; support byte, half-byte and word transmission. The AHB system consists of three parts: master module, slave module and infrastructure. The transmission on the entire AHB bus is issued by the master module and responded by the slave module. The infrastructure consists of an arbiter, a multiplexer from the master module to the slave module, a multiplexer from the slave module to the master module, a decoder, a dummy slave module, and a dummy master module. Its interconnection structure is shown in Figure 1.

[Reprint] Introduction to AMBA, AHB, and APB in STM32

APB Introduction

    APB is mainly used for the connection between low-bandwidth peripherals, such as UART, 1284, etc. Its bus architecture does not support multiple master modules like AHB. The only master module in APB is the APB bridge. Its features include: two clock cycle transmission; no waiting cycle and response signal; simple control logic, only four control signals. The transmission on APB can be explained by the state diagram shown in Figure 2.

[Reprint] Introduction to AMBA, AHB, and APB in STM32

     1) The system is initialized to IDLE state. There is no transmission operation and no slave module is selected.

     2) When there is a transmission to be carried out, PSELx = 1, PENABLE = 0, the system enters the SETUP state, and will only stay in the SETUP state for one cycle. When the next rising edge of PCLK arrives, the system enters the ENABLE state.

     3) When the system enters the ENABLE state, the PADDR, PSEL, and PWRITE in the SETUP state are maintained unchanged, and PENABLE is set to 1. The transmission will only be maintained in the ENABLE state for one cycle, and it will be completed after passing through the SETUP and ENABLE states. If there is no transmission to be performed afterwards, it will enter the IDLE state to wait; if there is continuous transmission, it will enter the SETUP state.

    In STM32, the devices connected to APB1 (low-speed peripherals) are: power interface, backup interface, CAN, USB, I2C1, I2C2, UART2, UART3, SPI2, window watchdog, Timer2, Timer3, Timer4. The devices connected to APB2 (high-speed peripherals) are: GPIO_A-E, USART1, ADC1, ADC2, ADC3, TIM1, TIM8, SPI1, ALL.


Keywords:stm32  AMBA  AHB  APB Reference address:Introduction to AMBA, AHB and APB in stm32

Previous article:STM32F429 serial communication_initialization
Next article:STM32 Learning - AD single channel and multi-channel conversion (DMA)

Recommended ReadingLatest update time:2024-11-16 13:54

STM32: Keil MDK (uVision v4.10) development environment construction
Integrated development environment (IDE): Keil's RealView MDK (uVision V4.10) Source file editor: EditPlus (what I use)/UltraEdit/SourceInsight/IDE's own editor  Serial port tool: SecureCRT (a professional hyperterminal tool that supports many interfaces (including serial ports) and protocols, recommended.)   RealView
[Microcontroller]
STM32 power management and low power mode
7.1 Power Management Overview Processors make extensive use of clock gating to disable inputs to unused functions and blocks, so that only the clocks that are being used are Dynamic power is consumed only by logic that is actively in use. The ARMv7-M architecture supports a system sleep mode that stops the Cortex-M3 a
[Microcontroller]
STM32 power management and low power mode
STM32 uses DMA to read data from the serial port to the memory
Using DMA to read data from the serial port to the memory is the same as moving data from the memory to the serial port, but you need to pay attention to the different DMA channels used. Once configured, if there is data transmission on the serial port, DMA will automatically move the data to the memory. When working
[Microcontroller]
stm32 controls lcd to write characters, draw lines, Chinese characters, etc.
1. Algorithm for drawing straight lines          When drawing a straight line, due to the granularity of the display on the LCD, the problem of the pace of the x and y axes is distinguished. The problem of pace involves the problem of slope. Therefore, even if the line drawing algorithm is completed, it is necessary t
[Microcontroller]
STM32 library development understanding
The development of STM32F103 using the library is very simple. You only need to design a structure framework that suits you, and then quickly copy and paste the same to program and configure the required functions. The so-called library function is the function interface written for us in the STM32 firmware
[Microcontroller]
STM32 library development understanding
About STM32 serial port debugging RS485 automatically enters receive interrupt
Let's talk about the hardware and software first: Hardware: The main control stm32c8t6 and 485 chips are isolated chips ADM2483, and the debugging tool is a usb to 485 connected to the PC. Software: Developed using library functions, the development tool is IAR 7.10, 485 is connected to the serial port 1 of stm32 (bot
[Microcontroller]
STM32 watchdog IWDG WWDG
Independent Watchdog IWDG   Window Watchdog WWDG  For a general watchdog, the program can refresh the watchdog at any time before it generates a reset, but this has a hidden danger. It is possible that the program runs wildly and then runs back to the normal place, or the program that runs wild happens to execute the
[Microcontroller]
STM32 ADC sampling period determination
1. Determination of STM32 ADC sampling frequency First look at some information to determine the clock of the STM32 ADC: (1) The ADCCLK clock provided by the clock controller is synchronized with PCLK2 (APB2 clock). The CLK controller provides a dedicated programmable prescaler for the ADC clock.
[Analog Electronics]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号