一种串行外围接口的高速半硬件实现方法

High-speed semi-hardware realization method for serial peripheral interface

Abstract

The invention discloses a high-speed semi-hardware realization method for a serial peripheral interface. A pre-resolving array table used for converting SPI (Serial Peripheral Interface) data to be sent into GPIO (General Purpose Input/Output) port driven data is established by a CPU (Central Processing Unit); the SPI data to be sent are disassembled into a data assembly which has the same bit width with data in the pre-resolving array table; the SPI data to be sent are combined and analyzed into the GPIO port driven data by inquiring the pre-resolving array table; the analyzed GPIO port driven data are continuously stored so as to bring convenience for DMA (Direct Memory Access) module handling; the continuously-stored GPIO port driven data are handled to the GPIO module port by the DMA module; the data are written into a GPIO data register to drive the clock line and the data line of the GPIO module to simultaneously turn over. According to the high-speed semi-hardware realization method, the workload of the CPU is greatly lowered, the working efficiency of a system is improved, the advantage of the quick handling of the data of DMA is fully performed, and therefore, an SPI communication rate is greatly improved.
一种串行外围接口的高速半硬件实现方法,CPU建立用于将待发送的SPI数据转换成GPIO端口驱动数据的预解析数组表,将待发送的SPI数据拆分成与预解析数组表中的数据具有同样位宽的数据组合,通过查询预解析数组表,将待发送的SPI数据组合解析成驱动GPIO端口的驱动数据,将解析后的GPIO端口驱动数据连续地存储,以便于DMA模块搬运,DMA模块将连续存储的GPIO端口驱动数据搬运至GPIO模块端口,将数据写入GPIO数据寄存器,驱动GPIO模块的时钟线和数据线同时翻转。本发明大大降低了CPU工作量,提高了系统工作效率,充分发挥了DMA的数据快速搬运优势,使得SPI通信速率也大大提高。

Claims

Description

Topics

Download Full PDF Version (Non-Commercial Use)

Patent Citations (3)

    Publication numberPublication dateAssigneeTitle
    CN-101382927-AMarch 11, 2009杭州爱威芯科技有限公司High speed serial peripheral interface circuit integrated in chip
    CN-102495818-AJune 13, 2012上海爱信诺航芯电子科技有限公司Method for improving communication speed rate of software-mode serial peripheral interface (SPI)
    CN-201336032-YOctober 28, 2009天津理工大学Software simulation serial data transmission device

NO-Patent Citations (0)

    Title

Cited By (0)

    Publication numberPublication dateAssigneeTitle