About the ARM PrimeCell GPIO

这篇具有很好参考价值的文章主要介绍了About the ARM PrimeCell GPIO。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

The PrimeCell GPIO is an Advanced Microcontroller Bus Architecture (AMBA)
compliant System-on-Chip (SoC) peripheral that is developed, tested, and licensed by
ARM.
The PrimeCell GPIO is an AMBA slave module that connects to the AdvancedPeripheral Bus (APB). The PrimeCell GPIO provides eight programmable inputs oroutputs that you can control in two modes:

• software mode through an APB bus interface
• hardware mode through a hardware control interface.

You can create ports of different widths (for example 16, 24, 32, and 40 bits) by multipleinstantiation. An interrupt interface is provided to configure any number of pins asinterrupt sources. You can generate interrupts depending on a level, or a transitional value of a pin. At system reset, PrimeCell GPIO lines default to inputs. The PrimeCell
GPIO interfaces with input and output pad cells using a data input, data output, and output enable per pad.
Figure 1-1 on page 1-3 shows the PrimeCell GPIO interfaces.About the ARM PrimeCell GPIO,arm开发,AMBA,APB,GPIO
1.1.1
Features of the PrimeCell GPIO
The PrimeCell GPIO offers:
• Compliance to the AMBA Specification (Rev 2.0) onwards for easy integration into SoC implementation.
• Eight individually programmable input/output pins, default to input at reset.
• Scalability by multiple instantiation to 16, 24, 32, 40, or more bits.
• Programmable interrupt generation capability, from a transition or a level condition, on any number of pins.
• Hardware control capability of PrimeCell GPIO lines for different system
configurations.
• Bit masking in both read and write operations through address lines.
• Identification registers that uniquely identify the PrimeCell GPIO.

2.1
PrimeCell GPIO overview
The PrimeCell GPIO is an Advanced Microcontroller Bus Architecture (AMBA) bus slave that connects to the AMBA Advanced Peripheral Bus (APB). It provides eight programmable inputs or outputs that you can control in two modes:
• software mode through an APB bus interface
• hardware mode through a hardware control interface.
The CPU accesses data, control, and status information of the PrimeCell GPIO through the APB bus interface.
The PrimeCell GPIO peripheral includes the following registers:
• Data direction register
• Data register
• Interrupt control registers
• Mode control select register
• Identification registers on page 2-3.
2.1.1
Data direction register
The data direction register is eight bits wide and configures each pin as an input or output.
2.1.2
Data register The data register is eight bits wide and is used to:
• read the value input on those PrimeCell GPIO lines that are configured as inputs
• program the value on those PrimeCell GPIO lines that are configured as outputs.
The same data register appears at 256 locations in the memory map. This allows you to use the address bus [9:2] as an additional bit masking feature.
2.1.3
Interrupt control registers
The PrimeCell GPIO has interrupt generation capability. You can configure any number of the external PrimeCell GPIO lines independently to trigger an interrupt through its corresponding bit in the seven interrupt registers.
2.1.4
Mode control select register
The PrimeCell GPIO lines can be controlled by software through the APB bus or by hardware through the hardware control interface. The mode of each PrimeCell GPIO line is selected by the mode control select register.

When you enable hardware control in a particular line, control and data transfer over
this line is provided from an auxiliary source.
2.1.5
Identification registers
The PrimeCell GPIO identification registers contain peripheral and BIOS information that uniquely identifies the peripheral. An automatically configuring BIOS can scan through memory searching for the BIOS ID number. Once found, the BIOS can read the peripheral ID numbers and automatically configure itself.

2.2
PrimeCell GPIO functional description
Figure 2-1 shows a block diagram of the PrimeCell GPIO.
About the ARM PrimeCell GPIO,arm开发,AMBA,APB,GPIO
2.2.1
AMBA APB interface
The AMBA APB is a local secondary bus that provides a low-power extension to the higher bandwidth AMBA Advanced High-performance Bus (AHB), within the AMBA system hierarchy. The AMBA APB groups narrow-bus peripherals to avoid loading the system bus, and provides an interface using memory-mapped registers that are accessed under programmed control.
The AMBA APB interface generates read and write decodes for accesses to control, interrupt, and data registers within the PrimeCell GPIO. A read-only decode is provided to access the ID codes.
The AMBA APB interface implements the storage elements for the data, data direction, mode control, interrupt interface, and identification registers.
2.2.2
Interrupt detection logic
The PrimeCell GPIO has the ability to generate mask-programmable interrupts based on the level, or transitional value of any of its PrimeCell GPIO lines.
The General Purpose Input Output Interrupt (GPIOINTR) indicates to an interrupt controller that an interrupt occurred in one or more of the PrimeCell GPIO lines.You can configure interrupts so that they are generated either on a change in the level, or on an edge of the PrimeCell GPIO line. The edge and level on which the interrupt must be
generated is programmable.Seven registers in the AMBA APB interface, each controlling a different feature or condition in the interrupt triggering chain, allow thefollowing functionality:
• interrupt generation either on a change in the level, one edge, or both edges of the PrimeCell GPIO line
• reading raw and masked interrupt status
• reading from and writing to the interrupt enable
• interrupt clear (write-only).
Each input/output line has a corresponding masked interrupt output line. Setting the appropriate mask bit HIGH enables the interrupt. GPIOINTR is the combined interrupt output of the PrimeCell GPIO masked interrupt status lines. It indicates to the interrupt controller that this block is requesting service from one or more of its interrupt sources.
Provision of individual outputs as well as a combined interrupt output, allows you to use either a global interrupt service routine or modular device drivers to handle interrupts.

2.2.3
Mode control
You can control the PrimeCell GPIO lines by software through the APB bus, or by hardware through the hardware control interface. Select the mode of each PrimeCell GPIO line using the mode control select register (GPIOAFSEL).
When software control mode is enabled (default) the data direction is controlled by the data direction register. Data writes and reads are then performed through the APB interface.
When hardware control mode is enabled, data direction is controlled through the auxiliary port direction control pins. Similarly, data is written and read through this port,
but pin status can also be read through the APB interface.

2.3
PrimeCell GPIO operation
The operation of the PrimeCell GPIO is described in the following sections:
• Interface reset
• Interface configuration
• Operation of the input/output lines on page 2-8
• Interrupt operation on page 2-10
• Mode control on page 2-12.
2.3.1
Interface reset
All block registers are cleared during power-on-reset (LOW). This disables the output drivers for the Primecell GPIO lines, so that the pins are configured as inputs.
2.3.2
Interface configuration
On application of PRESETn as LOW:
• interrupts in the desired line are disabled by clearing the corresponding bit in GPIOIE
• all registers are cleared to zero
• input and output pins are configured as inputs
• interrupts to the external world are all masked as disabled
• raw interrupts are cleared to zero
• edge triggered interrupts are selected as source.
Recommendations
If you want to generate edge-triggered interrupts you must perform the following initialization sequence to avoid spurious interrupts being interpreted by the system:
• program GPIOIBE appropriately as individual or both-edge detection
• program GPIOIEV, if you have selected individual edge transactions previously
• program GPIOIS to select edge-triggered path
• apply three clock pulses to clean interrupt pipeline
• ensure GPIN[7:0] bus remains stable throughout this operation
• clear all interrupts by writing 0xFF to GPIOIC
• program GPIOIE to enable interrupts.文章来源地址https://www.toymoban.com/news/detail-824690.html

到了这里,关于About the ARM PrimeCell GPIO的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 【ARM AMBA5 CHI 入门 12 -- CHI 总线学习 】

    请阅读 【ARM AMBA 总线 文章专栏导读】

    2024年02月10日
    浏览(44)
  • 【ARM AMBA5 CHI 2 -- CHI 链路层详细介绍 】

    请阅读 【ARM AMBA 总线 文章专栏导读】

    2024年02月05日
    浏览(46)
  • 【ARM AMBA AXI 入门 15 -- AXI-Lite 详细介绍】

    请阅读 【ARM AMBA AXI 总线 文章专栏导读】 AMBA AXI4 规范中包含三种不同的协议接口,分别是: AXI4-Full AXI4-Lite AXI4-Stream 上图中的 AXI FULL 和 AIX-Lite 我们都把它们叫做 Memory map, memory map的协议是可以寻址的,它是有地址的,它每次的访问都是针对内存中的一个

    2024年02月04日
    浏览(47)
  • 【ARM Coresight | AMBA BUS | Cache | CoreLink | GCC 专栏导读】

    请阅读 【嵌入式开发学习必备专栏 】 本专栏全面介绍 ARM Coresight 系统 及SoC-400, SoC-600 中的各个组件。 【ARM Coresight Debug 系列 1 – ARM Debug 技术概述】 【ARM Coresight 系列文章 2 - ARM Coresight 介绍】 【ARM Coresight 系列文章 2 - ARM Coresight 介绍】 【ARM Coresight 系列文章 2.1 - ARM Coresi

    2024年02月05日
    浏览(64)
  • 【ARM AMBA AXI 入门 3 - AXI 协议中的 Outstanding transfer 】

    请阅读 【ARM AMBA AXI 总线 文章专栏导读】 上篇文章:ARM AMBA AXI 入门 2 - AXI协议中的BURST 下篇文章:ARM AMBA AXI 入门 4 - AXI 协议中的 Out-of-Order transfer and interleave 介绍

    2024年02月16日
    浏览(44)
  • 【ARM AMBA AXI 入门 11 - AXI 总线 AWCACHE 和 ARCACHE 介绍】

    请阅读 【ARM AMBA AXI 总线 文章专栏导读】 转自:https:

    2024年02月09日
    浏览(50)
  • 【ARM AMBA5 CHI 入门 12.1 -- CHI 链路层详细介绍 】

    请阅读 【ARM AMBA 总线 文章专栏导读】

    2024年02月08日
    浏览(41)
  • 【ARM AMBA AXI 入门 13 -- AXI 协议中 RRESP 信号详细介绍】

    请阅读 【ARM AMBA AXI 总线 文章专栏导读】 在 AXI (Advanced eXtensible Interface) 协议中, RRESP 信号用来表示读取事务的响应状态,它由从设备(Slave)发往主设备(Master)来通知读取操作的完成情况。 RRESP 信号是一个 2 位的编码字段,用于指示读取操作是否成功完成,或者在操作过

    2024年02月04日
    浏览(167)
  • AMBA协议笔记(APB)

    Chapter 1 概述 APB(Advanced Peripheral Bus),是 低功耗 和 减少接口复杂度 的优化接口协议。APB接口是 低带宽 , 不需高性能流水线的接口协议 ,同时APB也具有非流水线的协议。 所有信号都只在时钟的上升沿跳变 ,目的是为了 简化设计流程中的APB外设融合 。 每次传输至少需要

    2024年02月10日
    浏览(32)
  • 【ARM AMBA AXI 入门 9 - AXI 总线 AxPROT 与安全之间的关系 】

    请阅读 【ARM AMBA AXI 总线 文章专栏导读】 上篇文章:ARM AMBA AXI 入门 8 - AXI 协议中 RID/ARID/AWID/WID 信号 ARMv8 架构中的AXI(Advanced eXtensible Interface)总线与NS(Non-Secure)位密切相关。NS位是指在ARM TrustZone安全扩展中定义的一种状态,用于区分安全和非安全的处理器执行环境。AXI总

    2024年02月11日
    浏览(43)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包