APB协议学习笔记

APB协议学习笔记

APB(Advanced Peripheral Bus)信号的格式可以归纳为以下几类信号,并以P为前缀:

  1. 系统信号

    • PCLK:系统时钟信号,用于同步APB总线上的操作。
    • PRESETn:系统复位信号,低电平有效。当该信号为低时,APB总线上的所有设备和信号都将被复位到初始状态。
  2. Master信号

    (由APB Bridge或主设备发出):

    • PADDR:地址信号,用于确定读写的地址,最大支持32位。
    • PSELx:片选信号,用于选中与APB总线连接的Slave设备。当某个Slave设备被选中时,对应的PSELx信号会被拉高。
    • PENABLE:使能信号,在PSELx拉高一个周期后,该信号必定拉高,表示数据传输开始。
    • PWRITE:写使能信号。当PWRITE为高时,表示进行写操作;为低时,表示进行读操作。
    • PWDATA:写数据信号,用于传输要写入Slave设备的数据,最大支持32位。
  3. Slave信号

    (由Slave设备发出):

    • PREADY:就绪信号。当PREADY为高时,表示Slave设备已经准备好数据传输,可以结束当前APB数据传输。
    • PRDATA:读数据信号,用于传输从Slave设备读出的数据,最大支持32位。
    • PSLVERR:错误数据信号(可选)。当Slave设备发现内部逻辑出现故障时,可以通过拉高该信号来通知Master设备。如果Master设备接收到PSLVERR为高,即使PREADY拉高表示APB传输结束,Master设备也可以选择放弃该次传输或采取其他应对策略。

此外,APB总线还拥有两个独立的数据通道:读通道和写通道。但由于这两个通道没有独立的握手信号,因此它们不会被同时使用。

总的来说,APB信号的格式和传输协议是高度结构化和规范的,确保了数据在低速、低功耗的外设与主系统之间的稳定、可靠传输。

APB Signals

NameSourceDescription
PCLKClock SourceThe rising edge of PCLK is used to time all transfers on the APB.
PRESETnReset ControllerThe APB bus reset signal is active LOW and this signal will normally be connected directly to the system bus reset signal.
PADDR[31:0]MasterThis is the APB address bus, which may be up to 32-bits wide and is driven by the peripheral bus bridge unit.
PSELxDecoderA signal from the secondary decoder, within the peripheral bus bridge unit, to each peripheral bus slave x. This signal indicates that the slave device is selected and a data transfer is required. There is a PSELx signal for each bus slave.
PENABLEMasterThis strobe signal is used to time all accesses on the peripheral bus. The enable signal is used to indicate the second cycle of an APB transfer. The rising edge of PENABLE occurs in the middle of the APB transfer.
PWRITEMasterWhen HIGH this signal indicates an APB write access and when LOW a read access.
PRDATA[31:0]SlaveThe read data bus is driven by the selected slave during read cycles (when PWRITE is LOW). The read data bus can be up to 32-bits wide.
PWDATA[31:0]MasterThe write data bus is driven by the peripheral bus bridge unit during write cycles (when PWRITE is HIGH). The write data bus can be up to 32-bits wide.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值