[go: up one dir, main page]

CN116980362A - Multitasking method and device for SPI architecture - Google Patents

Multitasking method and device for SPI architecture Download PDF

Info

Publication number
CN116980362A
CN116980362A CN202311241240.6A CN202311241240A CN116980362A CN 116980362 A CN116980362 A CN 116980362A CN 202311241240 A CN202311241240 A CN 202311241240A CN 116980362 A CN116980362 A CN 116980362A
Authority
CN
China
Prior art keywords
sent
data
sequence data
priority
sequence
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311241240.6A
Other languages
Chinese (zh)
Other versions
CN116980362B (en
Inventor
赵林林
黄钧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ziguang Tongxin Microelectronics Co Ltd
Original Assignee
Beijing Ziguang Xinneng Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Ziguang Xinneng Technology Co Ltd filed Critical Beijing Ziguang Xinneng Technology Co Ltd
Priority to CN202311241240.6A priority Critical patent/CN116980362B/en
Publication of CN116980362A publication Critical patent/CN116980362A/en
Application granted granted Critical
Publication of CN116980362B publication Critical patent/CN116980362B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/625Queue scheduling characterised by scheduling criteria for service slots or service orders
    • H04L47/6275Queue scheduling characterised by scheduling criteria for service slots or service orders based on priority
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2425Traffic characterised by specific attributes, e.g. priority or QoS for supporting services specification, e.g. SLA
    • H04L47/2433Allocation of priorities to traffic types

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Communication Control (AREA)

Abstract

本申请涉及数据传输技术领域,公开一种用于SPI架构的多任务处理方法。在接收到外部触发源发送的数据发送指令的情况下,确定待发送序列数据对应的寄存器存储的优先级;按照待发送序列数据对应的寄存器存储的优先级由高到低的顺序,确定每个待发送序列数据中的待发送任务;将每个待发送任务发送至对应的片选设备。根据外部触发源的数据发送指令,直接读取发送序列数对应的寄存器存储的优先级,并基于优先级进行数据发送,仅通过硬件进行优先级判断及数据发送,避免依靠软件来进行优先级的判断而造成了频繁中断硬件的问题,有效降低了处理器的负载率,提高了数据传输效率。本申请还公开一种用于SPI架构的多任务处理装置。

This application relates to the field of data transmission technology and discloses a multi-tasking method for SPI architecture. When receiving the data sending instruction sent by the external trigger source, determine the priority of the register storage corresponding to the sequence data to be sent; determine each register storage priority in order from high to low according to the priority of the register storage corresponding to the sequence data to be sent. The tasks to be sent in the sequence data to be sent; send each task to be sent to the corresponding chip select device. According to the data sending instruction from the external trigger source, the priority stored in the register corresponding to the sending sequence number is directly read, and data is sent based on the priority. Priority judgment and data sending are only performed through hardware, avoiding the need to rely on software for priority determination. The judgment caused the problem of frequent hardware interruption, which effectively reduced the load rate of the processor and improved the data transmission efficiency. This application also discloses a multi-tasking device for SPI architecture.

Description

用于SPI架构的多任务处理方法及装置Multitasking method and device for SPI architecture

技术领域Technical field

本申请涉及数据通信技术领域,例如涉及一种用于SPI架构的多任务处理方法及装置。The present application relates to the field of data communication technology, for example, to a multi-tasking method and device for SPI architecture.

背景技术Background technique

汽车控制器的软件架构大多基于汽车开放系统架构(Automotive Open SystemArchitecture,AUTOSAR)开发,在经典AUTOSAR架构中,将SPI(Serial PeripheralInterface,串行外设接口)驱动抽象成了序列(Sequence)、任务(Job)和通道(Channel)的数据结构,将SPI一系列操作设置为一个Sequence,一个Sequence内部包含一个或多个Job,一个Job包含一个或者多个Channel。对于一个Sequence可设置成内部Job允许执行完成后插入优先级更高的Sequence的Job。The software architecture of automobile controllers is mostly developed based on the Automotive Open System Architecture (AUTOSAR). In the classic AUTOSAR architecture, the SPI (Serial Peripheral Interface) driver is abstracted into a sequence (Sequence) and a task ( The data structure of Job and Channel sets a series of SPI operations as a Sequence. A Sequence contains one or more Jobs, and a Job contains one or more Channels. For a Sequence, it can be set as an internal job to allow the insertion of a higher-priority Sequence job after execution is completed.

相关技术中,需要软件来对待传输的数据进行优先级的判断,进而发送优先级较高的序列数据。In related technologies, software is required to determine the priority of data to be transmitted, and then send sequence data with higher priority.

在实现本申请实施例的过程中,发现相关技术中至少存在如下问题:In the process of implementing the embodiments of this application, it was found that there are at least the following problems in the related technology:

软件进行优先级的判断需要依赖硬件SPI中断来实现,对于实时性高的场景中,频繁的中断和软件调度会增加系统运行负担,从而降低数据传输系统的传输效率。Software priority judgment depends on hardware SPI interrupts. For scenarios with high real-time performance, frequent interrupts and software scheduling will increase the system operating burden, thus reducing the transmission efficiency of the data transmission system.

需要说明的是,在上述背景技术部分公开的信息仅用于加强对本申请的背景的理解,因此可以包括不构成对本领域普通技术人员已知的现有技术的信息。It should be noted that the information disclosed in the above background section is only used to enhance understanding of the background of the present application, and therefore may include information that does not constitute prior art known to those of ordinary skill in the art.

发明内容Contents of the invention

为了对披露的实施例的一些方面有基本的理解,下面给出了简单的概括。所述概括不是泛泛评述,也不是要确定关键/重要组成元素或描绘这些实施例的保护范围,而是作为后面的详细说明的序言。In order to provide a basic understanding of some aspects of the disclosed embodiments, a simplified summary is provided below. The summary is not intended to be a general review, nor is it intended to identify key/important elements or delineate the scope of the embodiments, but is intended to serve as a prelude to the detailed description that follows.

本申请实施例提供了一种用于SPI架构的多任务处理方法及装置,以提高数据传输效率。Embodiments of the present application provide a multi-tasking method and device for SPI architecture to improve data transmission efficiency.

在一些实施例中,所述方法包括:在接收到外部触发源发送的数据发送指令的情况下,确定待发送序列数据对应的寄存器存储的优先级;按照待发送序列数据对应的寄存器存储的优先级由高到低的顺序,确定每个待发送序列数据中的待发送任务;将每个待发送任务发送至对应的片选设备。In some embodiments, the method includes: upon receiving a data sending instruction sent by an external trigger source, determining the priority of register storage corresponding to the sequence data to be sent; according to the priority of register storage corresponding to the sequence data to be sent In order from high to low, determine the tasks to be sent in each sequence data to be sent; send each task to be sent to the corresponding chip select device.

可选地,还包括:在接收到新加入序列数据的情况下,比较新加入序列数据与当前序列数据的优先级,得到优先级的比较结果;其中,当前序列数据为当前时刻发送的序列数据;根据比较结果确定下一时刻的待发送任务。Optionally, it also includes: when receiving newly added sequence data, comparing the priorities of the newly added sequence data and the current sequence data to obtain a priority comparison result; wherein the current sequence data is the sequence data sent at the current moment. ; Determine the tasks to be sent at the next moment based on the comparison results.

可选地,根据比较结果确定下一时刻的待发送任务,包括:在比较结果表征新加入序列数据的优先级高于当前序列数据的优先级的情况下,确定下一时刻的待发送任务为将新加入序列数据中的所有待发送任务;在比较结果表征当前序列数据的优先级高于新加入序列数据的优先级的情况下,确定下一时刻的待发送任务为当前序列数据中未发送的待发送任务。Optionally, determining the task to be sent at the next moment according to the comparison result includes: when the comparison result indicates that the priority of the newly added sequence data is higher than the priority of the current sequence data, determining that the task to be sent at the next moment is All tasks to be sent that are newly added to the sequence data; when the comparison result indicates that the priority of the current sequence data is higher than the priority of the newly added sequence data, it is determined that the tasks to be sent at the next moment are those that have not been sent in the current sequence data. of tasks to be sent.

可选地,还包括:在比较新加入序列数据与当前序列数据的优先级前,确定当前发送任务是否完成;在当前发送任务完成后,比较新加入序列数据与当前序列数据的优先级。Optionally, the method further includes: before comparing the priorities of the newly added sequence data and the current sequence data, determining whether the current sending task is completed; and after the current sending task is completed, comparing the priorities of the newly added sequence data and the current sequence data.

可选地,还包括按照如下方式确定待发送序列数据:获取数据发送指令中包含的地址信息;根据数据发送指令中包含的地址信息,从内存中读取地址信息对应的数据作为待发送序列数据。Optionally, it also includes determining the sequence data to be sent in the following manner: obtaining the address information contained in the data sending instruction; reading the data corresponding to the address information from the memory as the sequence data to be sent according to the address information contained in the data sending instruction. .

可选地,还包括:接收片选设备发送的待写入数据;根据待写入数据的片选信息,将待写入数据写入内存。Optionally, the method further includes: receiving the data to be written sent by the chip selection device; and writing the data to be written into the memory according to the chip selection information of the data to be written.

在一些实施例中,所述装置包括:优先级确定模块,被配置为在接收到外部触发源发送的数据发送指令的情况下,确定待发送序列数据对应的寄存器存储的优先级;待发送任务确定模块,被配置为按照待发送序列数据对应的寄存器存储的优先级由高到低的顺序,确定每个待发送序列数据中的待发送任务;发送模块,被配置为将每个待发送任务发送至对应的片选设备。In some embodiments, the device includes: a priority determination module configured to determine the priority of the register storage corresponding to the sequence data to be sent when receiving a data sending instruction sent by an external trigger source; the task to be sent The determination module is configured to determine the tasks to be sent in each sequence data to be sent in order from high to low according to the priority stored in the register corresponding to the sequence data to be sent; the sending module is configured to determine each task to be sent Sent to the corresponding chip select device.

在一些实施例中,所述装置包括:数据传输通道、数据处理单元和序列数据接口单元,其中:数据传输通道,与数据处理单元连接,被配置为在接收到外部触发源发送的数据发送指令的情况下,向数据处理单元发送待发送序列数据;数据处理单元,与序列数据接口单元连接,被配置为:接收待发送序列数据,并确定待发送序列数据对应的寄存器存储的优先级;按照待发送序列数据对应的寄存器存储的优先级由高到低的顺序,确定每个待发送序列数据中的待发送任务;序列数据接口单元,与多个片选设备连接,被配置为接收待发送任务,将待发送任务发送至对应的片选设备。In some embodiments, the device includes: a data transmission channel, a data processing unit and a sequence data interface unit, wherein: the data transmission channel is connected to the data processing unit and is configured to receive a data sending instruction sent by an external trigger source. In the case of , send the sequence data to be sent to the data processing unit; the data processing unit, connected to the sequence data interface unit, is configured to: receive the sequence data to be sent, and determine the priority of register storage corresponding to the sequence data to be sent; according to The priority of the register storage corresponding to the sequence data to be sent is determined from high to low to determine the task to be sent in each sequence data to be sent; the sequence data interface unit is connected to multiple chip select devices and is configured to receive the sequence data to be sent. Task, send the task to be sent to the corresponding chip select device.

在一些实施例中,所述控制器包括:控制器主体;上述用于SPI架构的多任务处理装置,被安装于控制器主体。In some embodiments, the controller includes: a controller body; the above-mentioned multi-tasking device for SPI architecture is installed on the controller body.

本申请实施例提供的用于SPI架构的多任务处理方法及装置,可以实现以下技术效果:The multi-tasking method and device for SPI architecture provided by the embodiments of this application can achieve the following technical effects:

本申请实施例根据外部触发源的数据发送指令,直接读取发送序列数对应的寄存器存储的优先级,并基于优先级进行数据发送,仅通过硬件进行优先级判断及数据发送,避免依靠软件来进行优先级的判断而造成了频繁中断硬件的问题,有效降低了处理器的负载率,提高了数据传输效率。The embodiment of the present application directly reads the priority stored in the register corresponding to the sending sequence number according to the data sending instruction from the external trigger source, and performs data sending based on the priority. Priority judgment and data sending are only performed through hardware, avoiding the need to rely on software. The problem of frequent hardware interrupts caused by priority judgment effectively reduces the load rate of the processor and improves data transmission efficiency.

以上的总体描述和下文中的描述仅是示例性和解释性的,不用于限制本申请。The above general description and the following description are exemplary and explanatory only and are not intended to limit the application.

附图说明Description of the drawings

一个或多个实施例通过与之对应的附图进行示例性说明,这些示例性说明和附图并不构成对实施例的限定,附图中具有相同参考数字标号的元件示为类似的元件,附图不构成比例限制,并且其中:One or more embodiments are exemplified by corresponding drawings. These exemplary descriptions and drawings do not constitute limitations to the embodiments. Elements with the same reference numerals in the drawings are shown as similar elements. The drawings are not limited to scale and in which:

图1为AUTOSAR架构中传输任务的示意图;Figure 1 is a schematic diagram of the transmission tasks in the AUTOSAR architecture;

图2为相关技术中通过软件进行串行数据传输的方法流程图;Figure 2 is a flow chart of a method for serial data transmission through software in related technologies;

图3为本申请实施例提供的一种用于SPI架构的多任务处理方法的流程图;Figure 3 is a flow chart of a multi-tasking method for SPI architecture provided by an embodiment of the present application;

图4为本申请实施例提供的一种用于SPI架构的多任务处理装置的结构示意图;Figure 4 is a schematic structural diagram of a multi-tasking device for SPI architecture provided by an embodiment of the present application;

图5为本申请实施例提供的又一种用于SPI架构的多任务处理装置的结构示意图;Figure 5 is a schematic structural diagram of another multi-tasking device for SPI architecture provided by an embodiment of the present application;

图6为本申请实施例提供的一种实际应用场景中的用于SPI架构的多任务处理装置的示意图;Figure 6 is a schematic diagram of a multi-tasking device for SPI architecture in an actual application scenario provided by an embodiment of the present application;

图7为本申请实施例提供的一种用于SPI架构的多任务处理装置的示意图;Figure 7 is a schematic diagram of a multi-tasking device for SPI architecture provided by an embodiment of the present application;

图8为本申请实施例提供的另一种用于SPI架构的多任务处理装置的示意图;Figure 8 is a schematic diagram of another multi-tasking device for SPI architecture provided by an embodiment of the present application;

图9为本申请实施例提供的一种控制器的示意图。Figure 9 is a schematic diagram of a controller provided by an embodiment of the present application.

具体实施方式Detailed ways

为了能够更加详尽地了解本申请实施例的特点与技术内容,下面结合附图对本申请实施例的实现进行详细阐述,所附附图仅供参考说明之用,并非用来限定本申请实施例。在以下的技术描述中,为方便解释起见,通过多个细节以提供对所披露实施例的充分理解。然而,在没有这些细节的情况下,一个或多个实施例仍然可以实施。在其它情况下,为简化附图,熟知的结构和装置可以简化展示。In order to understand the characteristics and technical content of the embodiments of the present application in more detail, the implementation of the embodiments of the present application will be described in detail below with reference to the accompanying drawings. The attached drawings are for reference only and are not intended to limit the embodiments of the present application. In the following technical description, for convenience of explanation, multiple details are provided to provide a thorough understanding of the disclosed embodiments. However, one or more embodiments may be practiced without these details. In other instances, well-known structures and devices may be shown simplified to simplify the drawings.

本申请实施例的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请实施例的实施例。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含。The terms "first", "second", etc. in the description and claims of the embodiments of this application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that data so used may be interchanged where appropriate for the purposes of the embodiments of the application described herein. Furthermore, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion.

除非另有说明,术语“多个”表示两个或两个以上。Unless otherwise stated, the term "plurality" means two or more.

本申请实施例中,字符“/”表示前后对象是一种“或”的关系。例如,A/B表示:A或B。In the embodiment of the present application, the character "/" indicates that the preceding and following objects are in an "or" relationship. For example, A/B means: A or B.

术语“和/或”是一种描述对象的关联关系,表示可以存在三种关系。例如,A和/或B,表示:A或B,或,A和B这三种关系。The term "and/or" is an association relationship describing objects, indicating that three relationships can exist. For example, A and/or B means: A or B, or A and B.

串行外设接口(Serial Peripheral Interface,SPI)在汽车控制器中使用广泛,例如控制电源芯片、收发器芯片和高低边驱动芯片等,因此,主流的车规微控制器芯片中普遍实现了SPI控制器。SPI控制器主要实现了SPI协议,即数据的串并转换发送和接收,发送的时候软件或者DMA将数据写入发送移位寄存器,数据被串行输出到数据总线上,接收的时候将数据总线上的串行数据转化成指定位宽的数据存储在接收数据寄存器中,由软件或者DMA读取对应的数据。Serial Peripheral Interface (SPI) is widely used in automotive controllers, such as control power supply chips, transceiver chips, high- and low-side driver chips, etc. Therefore, SPI is commonly implemented in mainstream automotive microcontroller chips. controller. The SPI controller mainly implements the SPI protocol, that is, the serial-to-parallel conversion of data, sending and receiving. When sending, software or DMA writes the data into the sending shift register. The data is serially output to the data bus. When receiving, the data bus is The serial data on the CPU is converted into data with a specified bit width and stored in the receive data register, and the corresponding data is read by software or DMA.

汽车控制器的软件架构大多基于汽车开放系统架构(Automotive Open SystemArchitecture,AUTOSAR)开发。如图1所示,为AUTOSAR架构中传输任务的示意图。在AUTOSAR架构中,将SPI驱动抽象成了序列(Sequence)、任务(Job)和通道(Channel)的数据结构,将SPI一系列操作设置为一个Sequence,一个Sequence内部包含一个或多个Job,一个Job包含一个或者多个Channel。对于一个Sequence可设置成内部Job允许执行完成后插入优先级更高的Sequence的Job。如图2所示,为相关技术中通过软件处理不同优先级的发送任务的流程示意图,已有的SPI控制器架构在处理不同优先级的发送任务时,需要在每个Job结束之后通过软件判断当前传输任务的优先级,优先级最高的Sequence中的Job会被发送。通过软件判断当前任务优先级需要依赖硬件SPI中断实现,但是在底盘等实时性高的场景中硬件中断的数量被严格限制,而且频繁的软件调度SPI任务会增加系统运行负载。The software architecture of automotive controllers is mostly developed based on Automotive Open System Architecture (AUTOSAR). As shown in Figure 1, it is a schematic diagram of the transmission tasks in the AUTOSAR architecture. In the AUTOSAR architecture, the SPI driver is abstracted into the data structures of Sequence, Job and Channel, and a series of SPI operations are set as a Sequence. A Sequence contains one or more Jobs, and a Job contains one or more Channels. For a Sequence, it can be set as an internal job to allow the insertion of a higher-priority Sequence job after execution is completed. As shown in Figure 2, it is a schematic flow chart of processing sending tasks of different priorities through software in related technologies. When the existing SPI controller architecture handles sending tasks of different priorities, it needs to be judged by software after the end of each job. The priority of the current transmission task, the Job in the Sequence with the highest priority will be sent. Determining the current task priority through software relies on hardware SPI interrupts. However, in high-real-time scenarios such as chassis, the number of hardware interrupts is strictly limited, and frequent software scheduling of SPI tasks will increase the system operating load.

基于此,本申请实施例提出了一种支持硬件传输任务优先级调度的串行数据传输的方法和控制器架构,在支持通用SPI协议的基础上,通过AUTOSAR的Job优先级处理模块,每个Job传输完成后会自动传输当前待传输任务中优先级最高的Sequence的Job。支持硬件触发,串行数据传输控制器(即SPI控制器)可以自动把内存中存储的Sequence搬运到移位寄存器中。以在实现周期性的SPI任务调度的同时,降低软件调度产生的系统负载,提高系统运行效率。Based on this, the embodiment of this application proposes a serial data transmission method and controller architecture that supports hardware transmission task priority scheduling. On the basis of supporting the general SPI protocol, through the Job priority processing module of AUTOSAR, each After the job transfer is completed, the job of the sequence with the highest priority among the tasks currently to be transferred will be automatically transferred. Supporting hardware triggering, the serial data transmission controller (ie SPI controller) can automatically transfer the Sequence stored in the memory to the shift register. In order to realize periodic SPI task scheduling, it can also reduce the system load caused by software scheduling and improve system operating efficiency.

结合图3所示,本申请实施例提供了一种用于SPI架构的多任务处理方法,该方法应用于SPI架构的多任务处理控制器,串行数据传输控制器的示意图如图4所示,串行数据传输控制器的一端连接内存,另一端连接有多个片选设备,在数据发送阶段,串行数据传输控制器读取内存中指定位置的待发送数据,经过处理后,确定出发送顺序,并发送给对应的片选设备。在数据接收阶段,串行数据传输控制器接收片选设备发送的待写入数据,并将待写入数据写入内存。如图3所示,该方法具体包括:As shown in Figure 3, the embodiment of the present application provides a multi-tasking method for SPI architecture. This method is applied to the multi-tasking controller of the SPI architecture. The schematic diagram of the serial data transmission controller is shown in Figure 4. , one end of the serial data transmission controller is connected to the memory, and the other end is connected to multiple chip select devices. During the data sending phase, the serial data transmission controller reads the data to be sent at the specified location in the memory, and after processing, determines the Send the sequence and send it to the corresponding chip select device. In the data receiving phase, the serial data transmission controller receives the data to be written sent by the chip select device and writes the data to be written into the memory. As shown in Figure 3, the method specifically includes:

S301:在接收到外部触发源发送的数据发送指令的情况下,确定待发送序列数据对应的寄存器存储的优先级。S301: Upon receiving a data sending instruction sent by an external trigger source, determine the priority of register storage corresponding to the sequence data to be sent.

其中,外部触发源为通过硬件触发相关处理指令的触发源,例如定时器。串行数据传输控制器在每个定时器的设定时间到达时,可以接收到数据发送指令,以此来触发串行数据的发送和/或接收。Among them, the external trigger source is a trigger source that triggers related processing instructions through hardware, such as a timer. The serial data transmission controller can receive a data transmission instruction when the set time of each timer arrives, thereby triggering the transmission and/or reception of serial data.

S302:按照待发送序列数据对应的寄存器存储的优先级由高到低的顺序,确定每个待发送序列数据中的待发送任务。S302: Determine the tasks to be sent in each sequence data to be sent in order of priority stored in the register corresponding to the sequence data to be sent.

序列数据Sequence的优先级存储在寄存器中,具体地,可以通过三位二进制数标识每个Sequence的优先级,这三位二进制数来表征0-6的优先级,数字0对应的优先级最低,数字6对应的优先级最高。当然,优先级的设置也可以根据用户需求采用其他方式,本申请实施例对于优先级的具体形式不进行限定。The priority of the sequence data Sequence is stored in the register. Specifically, the priority of each Sequence can be identified by three-digit binary numbers. These three-digit binary numbers represent the priorities of 0-6. The number 0 corresponds to the lowest priority. The number 6 corresponds to the highest priority. Of course, the priority can also be set in other ways according to user needs. The embodiments of this application do not limit the specific form of the priority.

S303:将每个待发送任务发送至对应的片选设备。S303: Send each task to be sent to the corresponding chip select device.

每个Sequence中包括一个或者多个Job,每个Job存储在缓冲区内。作为一个示例,每个Job对应的数据结构占32位,其中16位是数据本身,另外16位是配置信息,配置信息包括当前发送的Job数据的时序格式,包括对应的片选信号、采样边沿、数据位宽、数据大小端等。Each Sequence includes one or more Jobs, and each Job is stored in the buffer. As an example, the data structure corresponding to each Job occupies 32 bits, of which 16 bits are the data itself, and the other 16 bits are configuration information. The configuration information includes the timing format of the currently sent Job data, including the corresponding chip select signal and sampling edge. , data bit width, data endianness, etc.

具体地,每一个序列数据(Sequence)中包括一个或者多个待发送任务(Job),所有Job的优先级与该Job所属的Sequence的优先级相同,即同一个Sequence中的所有Job的优先级都相同,因此,在确定出优先级最高的Sequence后,依次发送该Sequence中的所有Job。Specifically, each sequence data (Sequence) includes one or more tasks (Jobs) to be sent, and the priority of all Jobs is the same as the priority of the Sequence to which the Job belongs, that is, the priority of all Jobs in the same Sequence. are all the same, therefore, after determining the Sequence with the highest priority, all jobs in the Sequence are sent in sequence.

本申请实施例提供的上述方法,根据外部触发源的数据发送指令,直接读取发送序列数对应的寄存器存储的优先级,并基于优先级进行数据发送,仅通过硬件进行优先级判断及数据发送,避免依靠软件来进行优先级的判断而造成了频繁中断硬件的问题,有效降低了处理器的负载率,提高了数据传输效率。The above method provided by the embodiment of the present application directly reads the priority stored in the register corresponding to the transmission sequence number according to the data transmission instruction of the external trigger source, and performs data transmission based on the priority, and only performs priority judgment and data transmission through hardware. , avoiding the problem of frequent hardware interrupts caused by relying on software to determine priorities, effectively reducing the load rate of the processor and improving data transmission efficiency.

可选地,确定待发送序列数据对应的寄存器存储的优先级之前,还包括:根据数据发送指令中包含的地址信息,从内存中读取地址信息对应的数据作为待发送数据。Optionally, before determining the priority of register storage corresponding to the sequence data to be sent, it also includes: according to the address information contained in the data sending instruction, reading the data corresponding to the address information from the memory as the data to be sent.

可选地,上述方法还包括:在接收到新加入序列数据的情况下,比较新加入序列数据与当前序列数据的优先级,得到优先级的比较结果;其中,当前序列数据为当前时刻发送的序列数据;根据比较结果确定下一时刻的待发送任务。Optionally, the above method also includes: when receiving newly added sequence data, comparing the priorities of the newly added sequence data and the current sequence data to obtain a priority comparison result; wherein the current sequence data is sent at the current moment. Sequence data; determine the tasks to be sent at the next moment based on the comparison results.

具体地,在一个周期内,还会接收到新的序列数据,例如,外部触发源为每隔5ms触发的定时器,在5ms到达时,已有的序列数据为S1、S2、S3,其中,S3优先级最高,S1优先级其次,S2优先级最低,则经过比较S1、S2和S3的优先级后,确定出序列数据的发送顺序为优先级由高到低,即S3、S1和S2。首先依次发送S3中的所有Job,再发送S1中的所有Job,最后发送S2中的所有Job。然而,在发送Job过程中,接收到新的Sequence数据S4,由于每个Job在发送的过程中不能被中断,因此,在当前Job发送完毕后,判断新的S4和当前发送的Sequence的优先级,并根据比较结果,重新确定下一个发送的Job是哪个Sequence中的Job。这样,可以保证每一时刻发送待处理任务都是优先级最高的任务,保证了数据传输的准确性。Specifically, within a cycle, new sequence data will also be received. For example, the external trigger source is a timer that triggers every 5ms. When 5ms arrives, the existing sequence data are S1, S2, and S3, where, S3 has the highest priority, S1 has the second priority, and S2 has the lowest priority. After comparing the priorities of S1, S2, and S3, it is determined that the order of sending sequence data is from high to low priority, that is, S3, S1, and S2. First send all the jobs in S3 in sequence, then send all the jobs in S1, and finally send all the jobs in S2. However, during the process of sending the Job, new Sequence data S4 is received. Since each Job cannot be interrupted during the sending process, after the current Job is sent, the priority of the new S4 and the currently sent Sequence is judged. , and based on the comparison result, re-determine which Sequence job the next sent Job is. In this way, it can be ensured that the tasks to be processed at every moment are the tasks with the highest priority, ensuring the accuracy of data transmission.

可选地,还包括:在比较新加入序列数据与当前序列数据的优先级前,确定当前发送任务是否完成;在当前发送任务完成后,比较新加入序列数据与当前序列数据的优先级。Optionally, the method further includes: before comparing the priorities of the newly added sequence data and the current sequence data, determining whether the current sending task is completed; and after the current sending task is completed, comparing the priorities of the newly added sequence data and the current sequence data.

具体地,由于当前发送中的Job不能被打断,因此,需要在当前Job发送完毕后,才能进行优先级的比较,当前Job的发送时间可以根据数据长度来确定。这样,可以保证不中断发送中的Job而重新判断优先级,避免Job被中断带来的数据传输错误,提升数据传输的准确性。Specifically, since the currently sending Job cannot be interrupted, priority comparison can only be performed after the current Job is sent. The sending time of the current Job can be determined based on the data length. In this way, the priority can be re-judged without interrupting the job being sent, avoiding data transmission errors caused by job interruption and improving the accuracy of data transmission.

可选地,根据比较结果确定下一时刻的待发送任务,包括:在比较结果表征新加入序列数据的优先级高于当前序列数据的优先级的情况下,确定下一时刻的待发送任务为将新加入序列数据中的所有待发送任务。在比较结果表征当前序列数据的优先级高于新加入序列数据的优先级的情况下,确定下一时刻的待发送任务为当前序列数据中未发送的待发送任务。Optionally, determining the task to be sent at the next moment according to the comparison result includes: when the comparison result indicates that the priority of the newly added sequence data is higher than the priority of the current sequence data, determining that the task to be sent at the next moment is All tasks to be sent will be newly added to the sequence data. When the comparison result indicates that the priority of the current sequence data is higher than the priority of the newly added sequence data, it is determined that the task to be sent at the next moment is the task to be sent that has not been sent in the current sequence data.

续接前例,当前发送中的Job所属的Sequence为S2,则当前Job发送完毕后,比较新加入的S4和S2的优先级,如果比较结果说明新加入的S4的优先级高于S2,则不再继续发送S2中剩余的Job,而是发送S4中的所有Job,在S4中的所有Job发送完毕后,再发送S2中剩余的Job。Continuing from the previous example, the Sequence to which the currently sent Job belongs is S2. After the current Job is sent, the priorities of the newly added S4 and S2 are compared. If the comparison result shows that the newly added S4 has a higher priority than S2, then no Instead of continuing to send the remaining jobs in S2, all the jobs in S4 are sent. After all the jobs in S4 are sent, the remaining jobs in S2 are sent.

如果比较结果说明S2的优先级高于新加入的S4的优先级,那么继续发送S2中剩余的Job。If the comparison result shows that the priority of S2 is higher than the priority of the newly added S4, then continue to send the remaining jobs in S2.

这样,可以保证当前传输的数据始终是优先级最高的数据,进一步提升了数据传输的准确性。In this way, it can be ensured that the currently transmitted data is always the data with the highest priority, further improving the accuracy of data transmission.

需要注意的是,在一个定时周期内,所有Sequence全部发送完毕后,该定时周期内的数据传输任务完成。It should be noted that within a timing period, after all Sequences are sent, the data transmission task within the timing period is completed.

可选地,还包括按照如下方式确定待发送序列数据:获取数据发送指令中包含的地址信息;根据数据发送指令中包含的地址信息,从内存中读取地址信息对应的数据作为待发送序列数据。Optionally, it also includes determining the sequence data to be sent in the following manner: obtaining the address information contained in the data sending instruction; reading the data corresponding to the address information from the memory as the sequence data to be sent according to the address information contained in the data sending instruction. .

实际工作过程中,软件或者DMA可以将发送数据写入内存,并通过数据发送通道从内存中读取数据并保存在发送缓冲队列中。TxFIFO的数据位宽是32位,为了支持AUTOSAR的应用场景,将TxFIFO数据的高16bit设置成控制位。控制当前发送数据的时序格式,包括对应的片选信号、采样边沿、数据位宽、数据大小端、是否在传输完成后禁能等。其他16位存储数据本身。同时支持Job模式,在该模式下,软件可以配置当前Job的传输数据长度,硬件在判断Job传输完成后可以配置触发中断。During the actual working process, software or DMA can write the sending data into the memory, read the data from the memory through the data sending channel and save it in the sending buffer queue. The data bit width of TxFIFO is 32 bits. In order to support AUTOSAR application scenarios, the upper 16 bits of TxFIFO data are set as control bits. Control the timing format of the currently sent data, including the corresponding chip select signal, sampling edge, data bit width, data endianness, whether to disable after the transmission is completed, etc. The other 16 bits store the data itself. It also supports Job mode. In this mode, the software can configure the transmission data length of the current Job, and the hardware can configure an interrupt trigger after judging that the Job transmission is completed.

可选地,还包括:接收片选设备发送的待写入数据;根据待写入数据的片选信息,将待写入数据写入内存。Optionally, the method further includes: receiving the data to be written sent by the chip selection device; and writing the data to be written into the memory according to the chip selection information of the data to be written.

具体工作时,结合SPI控制器的Job模式,用户通过软件(例如APP)将需要发送的数据存储到系统RAM中,并配置外部触发源,例如配置一个5ms周期触发的定时器,每个定时器会触发一次SPI的Sequence传输,数据传输通道601对应的发送通道会根据配置的地址将RAM中的数据加载到序列发送缓冲区中,优先级处理模块6023判断当前缓存的所有Sequence的优先级,确定出优先级最高的Sequence,则发送该Sequence中的所有Job。例如,设定外部触发源为5ms周期的定时器,到达5ms后,读取配置的地址对应的数据至序列发送缓冲区,即读取S1、S2、S3、S4四个Sequence,经判断当前四个Sequence中优先级最高的是S2,那么依次发送S2里的Job。每一个Job传输完成,会自动检测序列发送缓冲区中,当前发送的Sequence是否最高优先级,如果不是,则发送优先级最高的Sequence的Job,如果当前Sequence是优先级最高的,则继续发送该Sequence中的剩余Job。如果所有Sequence传输完成,则恢复到Idle状态。同理,序列接收缓冲区会根据当前传输数据对应的片选信息选择数据传输通道601中的接收通道将数据存储到对应地址的系统RAM中,整个数据传输过程不需要软件中间参与即可实现周期性的SPI Sequence触发和任务调度。接收sequence和发送Sequence都支持不通过软件,而是定时器周期触发,不依赖硬件中断,从而有效降低了CPU的负载率。When working specifically, combined with the Job mode of the SPI controller, the user stores the data to be sent into the system RAM through software (such as APP), and configures an external trigger source, such as configuring a timer with a 5ms period trigger, and each timer An SPI Sequence transmission will be triggered. The transmission channel corresponding to the data transmission channel 601 will load the data in RAM into the sequence transmission buffer according to the configured address. The priority processing module 6023 determines the priority of all currently cached Sequences and determines If the Sequence with the highest priority is selected, all jobs in the Sequence will be sent. For example, set the external trigger source to a timer with a period of 5ms. After reaching 5ms, read the data corresponding to the configured address to the sequence sending buffer, that is, read the four Sequences of S1, S2, S3, and S4. After judging the current four The highest priority among the Sequences is S2, then the jobs in S2 are sent in sequence. After each job transmission is completed, it will automatically detect whether the currently sent Sequence in the sequence sending buffer has the highest priority. If not, the Job of the highest priority Sequence will be sent. If the current Sequence is the highest priority, continue to send the Sequence. The remaining jobs in the Sequence. If all Sequence transmissions are completed, it returns to the Idle state. In the same way, the sequence receiving buffer will select the receiving channel in the data transmission channel 601 according to the chip select information corresponding to the current transmission data, and store the data into the system RAM at the corresponding address. The entire data transmission process does not require the intervention of software to realize the cycle. SPI Sequence triggering and task scheduling. Both the receiving sequence and the sending sequence support not being triggered by software, but are triggered periodically by timers and do not rely on hardware interrupts, thus effectively reducing the CPU load rate.

结合图5所示,为本申请实施例提供的一种用于SPI架构的多任务处理装置500,包括数据传输通道501、数据处理单元502和序列数据接口单元503,其中:As shown in FIG. 5 , a multi-tasking device 500 for SPI architecture provided by an embodiment of the present application includes a data transmission channel 501, a data processing unit 502 and a sequence data interface unit 503, wherein:

数据传输通道501,与数据处理单元502连接,被配置为在接收到外部触发源发送的数据发送指令的情况下,向数据处理单元502发送待发送序列数据;The data transmission channel 501 is connected to the data processing unit 502 and is configured to send sequence data to be sent to the data processing unit 502 when receiving a data sending instruction sent by an external trigger source;

数据处理单元502,与序列数据接口单元503连接,被配置为:The data processing unit 502 is connected to the sequence data interface unit 503 and is configured as:

接收待发送序列数据,并确定待发送序列数据对应的寄存器存储的优先级;Receive the sequence data to be sent and determine the priority of register storage corresponding to the sequence data to be sent;

按照待发送序列数据对应的寄存器存储的优先级由高到低的顺序,确定每个待发送序列数据中的待发送任务;Determine the tasks to be sent in each sequence data to be sent according to the priority stored in the register corresponding to the sequence data to be sent;

序列数据接口单元503,与多个片选设备连接,被配置为接收待发送任务,将待发送任务发送至对应的片选设备。The sequence data interface unit 503 is connected to multiple chip select devices and is configured to receive tasks to be sent and send the tasks to be sent to the corresponding chip select devices.

本申请实施例提供的上述用于SPI架构的多任务处理装置,根据外部触发源的数据发送指令,直接读取发送序列数对应的寄存器存储的优先级,并基于优先级进行数据发送,仅通过硬件进行优先级判断及数据发送,避免依靠软件来进行优先级的判断而造成了频繁中断硬件的问题,有效降低了处理器的负载率,提高了数据传输效率。The above-mentioned multi-tasking device for SPI architecture provided by the embodiment of the present application directly reads the priority stored in the register corresponding to the transmission sequence number according to the data transmission instruction of the external trigger source, and performs data transmission based on the priority, only through The hardware performs priority judgment and data transmission, avoiding the problem of frequent hardware interruption caused by relying on software for priority judgment, effectively reducing the load rate of the processor and improving data transmission efficiency.

结合图6所示,为本申请实施例提供的一种实际应用场景中用于SPI架构的多任务处理装置600。图6的右半部分实现的是通用SPI协议要求的数据串并转换功能。在主模式下支持8个片选设备,每个片选可以独立设置数据通信格式。As shown in FIG. 6 , an embodiment of the present application provides a multi-tasking device 600 for SPI architecture in a practical application scenario. The right half of Figure 6 implements the data serial-to-parallel conversion function required by the general SPI protocol. In main mode, it supports 8 chip select devices, and each chip select can independently set the data communication format.

图6中的用于SPI架构的多任务处理装置600中,包括数据传输通道601、数据处理单元602和序列数据接口单元603,各个模块中包含的二级模块以及每个模块的功能描述如下表1所示。The multi-tasking device 600 for SPI architecture in Figure 6 includes a data transmission channel 601, a data processing unit 602 and a sequence data interface unit 603. The secondary modules included in each module and the functions of each module are described in the following table 1 shown.

表1Table 1

可选地,数据传输通道601包括数据发送通道;上述从内存从中读取并发送待发送序列数据,包括:数据发送通道根据数据发送指令中包含的地址信息,从内存中读取地址信息对应的数据作为待发送数据;数据发送通道将待发送数据发送至数据处理单元。Optionally, the data transmission channel 601 includes a data sending channel; the above-mentioned reading from the memory and sending the sequence data to be sent includes: the data sending channel reads the address information corresponding to the address information from the memory according to the address information contained in the data sending instruction. The data is used as the data to be sent; the data sending channel sends the data to be sent to the data processing unit.

实际工作过程中,软件或者DMA可以将发送数据写入内存,并通过数据发送通道从内存中读取数据并保存在发送缓冲队列中。TxFIFO的数据位宽是32位,为了支持AUTOSAR的应用场景,将TxFIFO数据的高16bit设置成控制位。控制当前发送数据的时序格式,包括对应的片选信号、采样边沿、数据位宽、数据大小端、是否在传输完成后禁能等。其他16位存储数据本身。同时支持Job模式,在该模式下,软件可以配置当前Job的传输数据长度,硬件在判断Job传输完成后可以配置触发中断。During the actual working process, software or DMA can write the sending data into the memory, read the data from the memory through the data sending channel and save it in the sending buffer queue. The data bit width of TxFIFO is 32 bits. In order to support AUTOSAR application scenarios, the upper 16 bits of TxFIFO data are set as control bits. Control the timing format of the currently sent data, including the corresponding chip select signal, sampling edge, data bit width, data endianness, whether to disable after the transmission is completed, etc. The other 16 bits store the data itself. It also supports Job mode. In this mode, the software can configure the transmission data length of the current Job, and the hardware can configure an interrupt trigger after judging that the Job transmission is completed.

可选地,数据处理单元602包括:Optionally, the data processing unit 602 includes:

触发控制逻辑模块6021,被配置为响应触发条件,向数据传输通道下发数据发送指令;The trigger control logic module 6021 is configured to respond to the trigger condition and issue data transmission instructions to the data transmission channel;

序列发送缓冲区6022,被配置为接收数据传输通道发送的待发送序列数据;The sequence sending buffer 6022 is configured to receive the sequence data to be sent sent by the data transmission channel;

优先级处理模块6023,被配置为确定出序列发送缓冲区中优先级最高的待发送序列数据,并将优先级最高的待发送序列数据中的待发送任务依次发送至任务处理模块;The priority processing module 6023 is configured to determine the sequence data to be sent with the highest priority in the sequence sending buffer, and send the tasks to be sent in the sequence data to be sent with the highest priority to the task processing module in sequence;

任务处理模块6024,被配置为将接收到的待发送任务发送至序列数据接口单元。The task processing module 6024 is configured to send the received task to be sent to the sequence data interface unit.

可选地,优先级处理模块6023进一步被配置为:响应于接收到新进入序列发送缓冲区的新加入序列数据,比较新加入序列数据与当前序列数据的优先级,得到比较结果;其中,当前序列数据为当前时刻发送的序列数据;根据比较结果向任务处理模块发送下一时刻的待发送任务。Optionally, the priority processing module 6023 is further configured to: in response to receiving newly added sequence data newly entered into the sequence sending buffer, compare the priorities of the newly added sequence data and the current sequence data to obtain a comparison result; where, currently The sequence data is the sequence data sent at the current moment; the task to be sent at the next moment is sent to the task processing module according to the comparison result.

可选地,响应于接收到新进入序列发送缓冲区的新加入序列数据,比较新加入序列数据与当前序列数据的优先级,得到比较结果,包括:在比较新加入序列数据与当前序列数据的优先级前,确定当前发送任务是否完成;在当前发送任务完成后,比较新加入序列数据与当前序列数据的优先级。Optionally, in response to receiving newly added sequence data that newly enters the sequence sending buffer, comparing the priorities of the newly added sequence data and the current sequence data, and obtaining a comparison result, including: comparing the newly added sequence data with the current sequence data. Before setting the priority, determine whether the current sending task is completed; after the current sending task is completed, compare the priority of the newly added sequence data and the current sequence data.

可选地,根据比较结果向任务处理模块发送下一时刻的待发送任务,包括:在比较结果表征新加入序列数据的优先级高于当前序列数据的优先级的情况下,依次向任务处理模块发送新加入序列数据中的所有待发送任务。在比较结果表征当前序列数据的优先级高于新加入序列数据的优先级的情况下,继续发送当前序列数据中未发送的待发送任务。Optionally, sending the task to be sent at the next moment to the task processing module according to the comparison result, including: when the comparison result indicates that the priority of the newly added sequence data is higher than the priority of the current sequence data, sending the task to the task processing module in turn Send all pending tasks newly added to the sequence data. When the comparison result indicates that the priority of the current sequence data is higher than the priority of the newly added sequence data, the unsent to-be-sent tasks in the current sequence data are continued to be sent.

可选地,序列数据接口单元603包括:发送缓冲区,被配置为接收并存储待发送任务;Optionally, the sequence data interface unit 603 includes: a sending buffer configured to receive and store tasks to be sent;

发送缓冲区包括:数据内容存储区,被配置为存储待发送任务的数据内容;配置信息存储区,被配置为存储待发送任务的片选信号、采样边沿、数据位宽、数据大小端。The sending buffer includes: a data content storage area, configured to store the data content of the task to be sent; a configuration information storage area, configured to store the chip select signal, sampling edge, data bit width, and data endian of the task to be sent.

可选地,序列数据接口单元还包括:接收缓冲区,被配置为从片选设备接收待写入数据,并发送至数据处理单元;数据处理单元还包括:序列数据接收缓冲区,被配置为根据待写入数据的片选信息,通过数据传输通道中的数据接收通道将待写入数据写入内存。Optionally, the sequence data interface unit also includes: a receiving buffer configured to receive data to be written from the chip select device and send it to the data processing unit; the data processing unit also includes: a sequence data receiving buffer configured to According to the chip select information of the data to be written, the data to be written is written into the memory through the data receiving channel in the data transmission channel.

具体工作时,结合SPI控制器的Job模式,用户通过软件(例如APP)将需要发送的数据存储到系统RAM中,并配置外部触发源,例如配置一个5ms周期触发的定时器,每个定时器会触发一次SPI的Sequence传输,数据传输通道601对应的发送通道会根据配置的地址将RAM中的数据加载到序列发送缓冲区中,优先级处理模块6023判断当前缓存的所有Sequence的优先级,确定出优先级最高的Sequence,则发送该Sequence中的所有Job。例如,设定外部触发源为5ms周期的定时器,到达5ms后,读取配置的地址对应的数据至序列发送缓冲区,即读取S1、S2、S3、S4四个Sequence,经判断当前四个Sequence中优先级最高的是S2,那么依次发送S2里的Job。每一个Job传输完成,会自动检测序列发送缓冲区中,当前发送的Sequence是否最高优先级,如果不是,则发送优先级最高的Sequence的Job,如果当前Sequence是优先级最高的,则继续发送该Sequence中的剩余Job。如果所有Sequence传输完成,则恢复到Idle状态。同理,序列接收缓冲区会根据当前传输数据对应的片选信息选择数据传输通道601中的接收通道将数据存储到对应地址的系统RAM中,整个数据传输过程不需要软件中间参与即可实现周期性的SPI Sequence触发和任务调度。接收sequence和发送Sequence都支持不通过软件,而是定时器周期触发,不依赖硬件中断,从而有效降低了CPU的负载率。When working specifically, combined with the Job mode of the SPI controller, the user stores the data to be sent into the system RAM through software (such as APP), and configures an external trigger source, such as configuring a timer with a 5ms period trigger, and each timer An SPI Sequence transmission will be triggered. The transmission channel corresponding to the data transmission channel 601 will load the data in RAM into the sequence transmission buffer according to the configured address. The priority processing module 6023 determines the priority of all currently cached Sequences and determines If the Sequence with the highest priority is selected, all jobs in the Sequence will be sent. For example, set the external trigger source to a timer with a period of 5ms. After reaching 5ms, read the data corresponding to the configured address to the sequence sending buffer, that is, read the four Sequences of S1, S2, S3, and S4. After judging the current four The highest priority among the Sequences is S2, then the jobs in S2 are sent in sequence. After each job transmission is completed, it will automatically detect whether the currently sent Sequence in the sequence sending buffer has the highest priority. If not, the Job of the highest priority Sequence will be sent. If the current Sequence is the highest priority, continue to send the Sequence. The remaining jobs in the Sequence. If all Sequence transmissions are completed, it returns to the Idle state. In the same way, the sequence receiving buffer will select the receiving channel in the data transmission channel 601 according to the chip select information corresponding to the current transmission data, and store the data into the system RAM at the corresponding address. The entire data transmission process does not require the intervention of software to realize the cycle. SPI Sequence triggering and task scheduling. Both the receiving sequence and the sending sequence support not being triggered by software, but are triggered periodically by timers and do not rely on hardware interrupts, thus effectively reducing the CPU load rate.

结合图7所示,为本申请实施例提供的一种用于SPI架构的多任务处理装置700,包括:As shown in FIG. 7 , a multi-tasking device 700 for SPI architecture provided by an embodiment of the present application includes:

优先级确定模块701,被配置为在接收到外部触发源发送的数据发送指令的情况下,确定待发送序列数据对应的寄存器存储的优先级;The priority determination module 701 is configured to determine the priority of register storage corresponding to the sequence data to be sent when receiving a data sending instruction sent by an external trigger source;

待发送任务确定模块702,被配置为按照待发送序列数据对应的寄存器存储的优先级由高到低的顺序,确定每个待发送序列数据中的待发送任务;The task to be sent determination module 702 is configured to determine the tasks to be sent in each sequence data to be sent in order of the priority stored in the register corresponding to the sequence data to be sent;

发送模块703,被配置为将每个待发送任务发送至对应的片选设备。The sending module 703 is configured to send each task to be sent to the corresponding chip select device.

本申请实施例提供的上述装置,根据外部触发源的数据发送指令,直接读取发送序列数对应的寄存器存储的优先级,并基于优先级进行数据发送,仅通过硬件进行优先级判断及数据发送,避免依靠软件来进行优先级的判断而造成了频繁中断硬件的问题,有效降低了处理器的负载率,提高了数据传输效率。The above-mentioned device provided by the embodiment of the present application directly reads the priority stored in the register corresponding to the transmission sequence number according to the data transmission instruction of the external trigger source, and performs data transmission based on the priority, and only performs priority judgment and data transmission through hardware. , avoiding the problem of frequent hardware interrupts caused by relying on software to determine priorities, effectively reducing the load rate of the processor and improving data transmission efficiency.

结合图8所示,本申请实施例提供一种用于SPI架构的多任务处理装置800,包括处理器(processor)100和存储器(memory)101。可选地,该装置还可以包括通信接口(Communication Interface)102和总线103。其中,处理器100、通信接口102、存储器101可以通过总线103完成相互间的通信。通信接口102可以用于信息传输。处理器100可以调用存储器101中的逻辑指令,以执行上述实施例的用于SPI架构的多任务处理方法。As shown in FIG. 8 , an embodiment of the present application provides a multi-tasking device 800 for SPI architecture, including a processor (processor) 100 and a memory (memory) 101 . Optionally, the device may also include a communication interface (Communication Interface) 102 and a bus 103. Among them, the processor 100, the communication interface 102, and the memory 101 can communicate with each other through the bus 103. Communication interface 102 may be used for information transmission. The processor 100 can call logical instructions in the memory 101 to execute the multi-tasking method for the SPI architecture of the above embodiment.

此外,上述的存储器101中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。In addition, the above-mentioned logical instructions in the memory 101 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.

存储器101作为一种计算机可读存储介质,可用于存储软件程序、计算机可执行程序,如本申请实施例中的方法对应的程序指令/模块。处理器100通过运行存储在存储器101中的程序指令/模块,从而执行功能应用以及数据处理,即实现上述实施例的用于SPI架构的多任务处理方法。As a computer-readable storage medium, the memory 101 can be used to store software programs and computer-executable programs, such as program instructions/modules corresponding to the methods in the embodiments of the present application. The processor 100 executes program instructions/modules stored in the memory 101 to execute functional applications and data processing, that is, to implement the multi-tasking method for the SPI architecture of the above embodiment.

存储器101可包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序;存储数据区可存储根据终端设备的使用所创建的数据等。此外,存储器101可以包括高速随机存取存储器,还可以包括非易失性存储器。The memory 101 may include a stored program area and a stored data area, wherein the stored program area may store an operating system and at least one application program required for a function; the stored data area may store data created according to the use of the terminal device, etc. In addition, the memory 101 may include a high-speed random access memory and may also include a non-volatile memory.

结合图9所示,本申请实施例提供了一种控制器900,包括:控制器主体,以及上述的用于SPI架构的多任务处理700(800)。用于SPI架构的多任务处理装置700(800)被安装于控制器主体。这里所表述的安装关系,并不仅限于在控制器内部放置,还包括了与控制器的其他元器件的安装连接,包括但不限于物理连接、电性连接或者信号传输连接等。本领域技术人员可以理解的是,用于SPI架构的多任务处理装置700(800)可以适配于可行的控制器主体,进而实现其他可行的实施例。As shown in FIG. 9 , an embodiment of the present application provides a controller 900 , including: a controller body, and the above-mentioned multi-tasking process 700 (800) for SPI architecture. The multitasking device 700 (800) for SPI architecture is installed on the controller body. The installation relationship described here is not limited to placement inside the controller, but also includes installation connections with other components of the controller, including but not limited to physical connections, electrical connections, or signal transmission connections. Those skilled in the art can understand that the multitasking device 700 (800) for the SPI architecture can be adapted to a feasible controller body, thereby realizing other feasible embodiments.

本申请实施例提供了一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行上述实施例的用于SPI架构的多任务处理方法。Embodiments of the present application provide a computer-readable storage medium that stores computer-executable instructions. The computer-executable instructions are configured to execute the multi-tasking method for the SPI architecture of the above embodiments.

本申请实施例提供了一种计算机程序产品,所述计算机程序产品包括存储在计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行上述实施例的用于SPI架构的多任务处理方法。Embodiments of the present application provide a computer program product. The computer program product includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the The computer executes the multi-tasking method for the SPI architecture of the above embodiment.

上述的计算机可读存储介质可以是暂态计算机可读存储介质,也可以是非暂态计算机可读存储介质。The above-mentioned computer-readable storage medium may be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.

本申请实施例的技术方案可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括一个或多个指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请实施例所述方法的全部或部分步骤。而前述的存储介质可以是非暂态存储介质,包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等多种可以存储程序代码的介质,也可以是暂态存储介质。The technical solution of the embodiment of the present application can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes one or more instructions to enable a computer device (which can be a personal computer, a server, or a network equipment, etc.) to perform all or part of the steps of the method described in the embodiments of this application. The aforementioned storage media can be non-transitory storage media, including: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, etc. A medium that can store program code or a temporary storage medium.

以上描述和附图充分地示出了本申请的实施例,以使本领域的技术人员能够实践它们。其他实施例可以包括结构的、逻辑的、电气的、过程的以及其他的改变。实施例仅代表可能的变化。除非明确要求,否则单独的部件和功能是可选的,并且操作的顺序可以变化。一些实施例的部分和特征可以被包括在或替换其他实施例的部分和特征。而且,本申请中使用的用词仅用于描述实施例并且不用于限制权利要求。如在实施例以及权利要求的描述中使用的,除非上下文清楚地表明,否则单数形式的“一个”(a)、“一个”(an)和“所述”(the)旨在同样包括复数形式。类似地,如在本申请中所使用的术语“和/或”是指包含一个或一个以上相关联的列出的任何以及所有可能的组合。另外,当用于本申请中时,术语“包括”(comprise)及其变型“包括”(comprises)和/或包括(comprising)等指陈述的特征、整体、步骤、操作、元素,和/或组件的存在,但不排除一个或一个以上其它特征、整体、步骤、操作、元素、组件和/或这些的分组的存在或添加。在没有更多限制的情况下,由语句“包括一个…”限定的要素,并不排除在包括所述要素的过程、方法或者设备中还存在另外的相同要素。本文中,每个实施例重点说明的可以是与其他实施例的不同之处,各个实施例之间相同相似部分可以互相参见。对于实施例公开的方法、产品等而言,如果其与实施例公开的方法部分相对应,那么相关之处可以参见方法部分的描述。The foregoing description and drawings illustrate embodiments of the application sufficiently to enable those skilled in the art to practice them. Other embodiments may incorporate structural, logical, electrical, process, and other changes. The examples represent only possible variations. Unless explicitly required, individual components and features are optional and the order of operations may vary. Portions and features of some embodiments may be included in or substituted for those of other embodiments. Furthermore, the words used in this application are used only to describe the embodiments and not to limit the claims. As used in the description of the embodiments and the claims, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly dictates otherwise. . Similarly, the term "and/or" as used in this application is meant to encompass any and all possible combinations of one or more of the associated listed items. In addition, when used in this application, the term "comprise" and its variations "comprises" and/or "comprising" etc. refer to stated features, integers, steps, operations, elements, and/or The presence of a component does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and/or groupings of these. Without further limitation, an element defined by the statement "comprises a..." does not exclude the presence of additional identical elements in a process, method or apparatus including the stated element. In this article, each embodiment may focus on its differences from other embodiments, and the same and similar parts among various embodiments may be referred to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiment, then the relevant parts can be referred to the description of the method part.

本领域技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,可以取决于技术方案的特定应用和设计约束条件。所述技术人员可以对每个特定的应用来使用不同方法以实现所描述的功能,但是这种实现不应认为超出本申请实施例的范围。所述技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. The skilled person may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present application. The skilled person can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be described again here.

本文所披露的实施例中,所揭露的方法、产品(包括但不限于装置、设备等),可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,可以仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例。另外,在本申请实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units may only be a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined. Either it can be integrated into another system, or some features can be ignored, or not implemented. In addition, the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present application can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.

附图中的流程图和框图显示了根据本申请实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这可以依所涉及的功能而定。在附图中的流程图和框图所对应的描述中,不同的方框所对应的操作或步骤也可以以不同于描述中所披露的顺序发生,有时不同的操作或步骤之间不存在特定的顺序。例如,两个连续的操作或步骤实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这可以依所涉及的功能而定。框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operations of possible implementations of systems, methods, and computer program products according to embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more components for implementing the specified logical function(s). Executable instructions. In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two consecutive blocks may actually execute substantially in parallel, or they may sometimes execute in the reverse order, depending on the functionality involved. In the descriptions corresponding to the flowcharts and block diagrams in the accompanying drawings, operations or steps corresponding to different blocks may also occur in a sequence different from that disclosed in the description, and sometimes there is no specific distinction between different operations or steps. order. For example, two consecutive operations or steps may actually be performed substantially in parallel, or they may sometimes be performed in reverse order, depending on the functionality involved. Each block in the block diagram and/or flowchart illustration, and combinations of blocks in the block diagram and/or flowchart illustration, may be implemented by special purpose hardware-based systems that perform the specified functions or actions, or may be implemented using special purpose hardware implemented in combination with computer instructions.

Claims (10)

1.一种用于SPI架构的多任务处理方法,其特征在于,包括:1. A multi-tasking method for SPI architecture, characterized by including: 在接收到外部触发源发送的数据发送指令的情况下,确定待发送序列数据对应的寄存器存储的优先级;Upon receiving a data sending instruction from an external trigger source, determine the priority of register storage corresponding to the sequence data to be sent; 按照待发送序列数据对应的寄存器存储的优先级由高到低的顺序,确定每个待发送序列数据中的待发送任务;Determine the tasks to be sent in each sequence data to be sent according to the priority stored in the register corresponding to the sequence data to be sent; 将每个待发送任务发送至对应的片选设备。Send each to-be-sent task to the corresponding chip select device. 2.根据权利要求1所述的方法,其特征在于,还包括:2. The method of claim 1, further comprising: 在接收到新加入序列数据的情况下,比较新加入序列数据与当前序列数据的优先级,得到优先级的比较结果;其中,当前序列数据为当前时刻发送的序列数据;When receiving newly added sequence data, compare the priorities of the newly added sequence data and the current sequence data to obtain the priority comparison result; where the current sequence data is the sequence data sent at the current moment; 根据比较结果确定下一时刻的待发送任务。Determine the tasks to be sent at the next moment based on the comparison results. 3.根据权利要求2所述的方法,其特征在于,根据比较结果确定下一时刻的待发送任务,包括:3. The method according to claim 2, characterized in that determining the task to be sent at the next moment according to the comparison result includes: 在比较结果表征新加入序列数据的优先级高于当前序列数据的优先级的情况下,确定下一时刻的待发送任务为将新加入序列数据中的所有待发送任务;When the comparison result indicates that the priority of the newly added sequence data is higher than the priority of the current sequence data, it is determined that the tasks to be sent at the next moment are all the tasks to be sent that will be newly added to the sequence data; 在比较结果表征当前序列数据的优先级高于新加入序列数据的优先级的情况下,确定下一时刻的待发送任务为当前序列数据中未发送的待发送任务。When the comparison result indicates that the priority of the current sequence data is higher than the priority of the newly added sequence data, it is determined that the task to be sent at the next moment is the task to be sent that has not been sent in the current sequence data. 4.根据权利要求2所述的方法,其特征在于,还包括:4. The method of claim 2, further comprising: 在比较新加入序列数据与当前序列数据的优先级前,确定当前发送任务是否完成;Before comparing the priorities of the newly added sequence data and the current sequence data, determine whether the current sending task is completed; 在当前发送任务完成后,比较新加入序列数据与当前序列数据的优先级。After the current sending task is completed, the priorities of the newly added sequence data and the current sequence data are compared. 5.根据权利要求1所述的方法,其特征在于,还包括按照如下方式确定待发送序列数据:5. The method according to claim 1, further comprising determining the sequence data to be sent in the following manner: 获取数据发送指令中包含的地址信息;Obtain the address information contained in the data sending command; 根据数据发送指令中包含的地址信息,从内存中读取地址信息对应的数据作为待发送序列数据。According to the address information contained in the data sending instruction, the data corresponding to the address information is read from the memory as the sequence data to be sent. 6.根据权利要求1至5任一项所述的方法,其特征在于,还包括:6. The method according to any one of claims 1 to 5, further comprising: 接收片选设备发送的待写入数据;Receive data to be written sent by the chip select device; 根据待写入数据的片选信息,将待写入数据写入内存。According to the chip select information of the data to be written, the data to be written is written into the memory. 7.一种用于SPI架构的多任务处理装置,其特征在于,包括:7. A multi-tasking device for SPI architecture, characterized by comprising: 优先级确定模块,被配置为在接收到外部触发源发送的数据发送指令的情况下,确定待发送序列数据对应的寄存器存储的优先级;The priority determination module is configured to determine the priority of register storage corresponding to the sequence data to be sent when receiving a data sending instruction sent by an external trigger source; 待发送任务确定模块,被配置为按照待发送序列数据对应的寄存器存储的优先级由高到低的顺序,确定每个待发送序列数据中的待发送任务;The to-be-sent task determination module is configured to determine the to-be-sent tasks in each to-be-sent sequence data according to the priority stored in the register corresponding to the to-be-sent sequence data; 发送模块,被配置为将每个待发送任务发送至对应的片选设备。The sending module is configured to send each to-be-sent task to the corresponding chip select device. 8.一种用于SPI架构的多任务处理装置,其特征在于,包括数据传输通道、数据处理单元和序列数据接口单元,其中:8. A multi-tasking device for SPI architecture, characterized by including a data transmission channel, a data processing unit and a sequence data interface unit, wherein: 数据传输通道,与数据处理单元连接,被配置为在接收到外部触发源发送的数据发送指令的情况下,向数据处理单元发送待发送序列数据;The data transmission channel is connected to the data processing unit and is configured to send sequence data to be sent to the data processing unit upon receiving a data sending instruction sent by an external trigger source; 数据处理单元,与序列数据接口单元连接,被配置为:The data processing unit, connected to the sequence data interface unit, is configured as: 接收待发送序列数据,并确定待发送序列数据对应的寄存器存储的优先级;Receive the sequence data to be sent and determine the priority of register storage corresponding to the sequence data to be sent; 按照待发送序列数据对应的寄存器存储的优先级由高到低的顺序,确定每个待发送序列数据中的待发送任务;Determine the tasks to be sent in each sequence data to be sent according to the priority stored in the register corresponding to the sequence data to be sent; 序列数据接口单元,与多个片选设备连接,被配置为接收待发送任务,将待发送任务发送至对应的片选设备。The sequence data interface unit is connected to multiple chip select devices and is configured to receive tasks to be sent and send the tasks to be sent to the corresponding chip select devices. 9.根据权利要求8所述的装置,其特征在于,数据处理单元包括:9. The device according to claim 8, characterized in that the data processing unit includes: 触发控制逻辑模块,被配置为响应触发条件,向数据传输通道下发数据发送指令;The trigger control logic module is configured to respond to trigger conditions and issue data transmission instructions to the data transmission channel; 序列发送缓冲区,被配置为接收数据传输通道发送的待发送序列数据;The sequence sending buffer is configured to receive the to-be-sent sequence data sent by the data transmission channel; 优先级处理模块,被配置为确定出序列发送缓冲区中优先级最高的待发送序列数据,并将优先级最高的待发送序列数据中的待发送任务依次发送至任务处理模块;The priority processing module is configured to determine the sequence data to be sent with the highest priority in the sequence sending buffer, and send the tasks to be sent in the sequence data to be sent with the highest priority to the task processing module in sequence; 任务处理模块,被配置为将接收到的待发送任务发送至序列数据接口单元。The task processing module is configured to send the received task to be sent to the sequence data interface unit. 10.根据权利要求8所述的装置,其特征在于,序列数据接口单元包括:10. The device according to claim 8, wherein the sequence data interface unit includes: 发送缓冲区,被配置为接收并存储待发送任务;Send buffer, configured to receive and store tasks to be sent; 发送缓冲区包括:The send buffer includes: 数据内容存储区,被配置为存储待发送任务的数据内容;The data content storage area is configured to store the data content of the task to be sent; 配置信息存储区,被配置为存储待发送任务的片选信号、采样边沿、数据位宽、数据大小端。The configuration information storage area is configured to store the chip select signal, sampling edge, data bit width, and data endian of the task to be sent.
CN202311241240.6A 2023-09-25 2023-09-25 Multitasking method and device for SPI architecture Active CN116980362B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311241240.6A CN116980362B (en) 2023-09-25 2023-09-25 Multitasking method and device for SPI architecture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311241240.6A CN116980362B (en) 2023-09-25 2023-09-25 Multitasking method and device for SPI architecture

Publications (2)

Publication Number Publication Date
CN116980362A true CN116980362A (en) 2023-10-31
CN116980362B CN116980362B (en) 2024-02-27

Family

ID=88480025

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311241240.6A Active CN116980362B (en) 2023-09-25 2023-09-25 Multitasking method and device for SPI architecture

Country Status (1)

Country Link
CN (1) CN116980362B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6381532B1 (en) * 2000-09-20 2002-04-30 Visteon Global Technologies, Inc. Queued port data controller for microprocessor-based engine control applications
US20120002678A1 (en) * 2010-07-02 2012-01-05 Telefonaktiebolaget Lm Ericsson (Publ) Prioritization of data packets
CN103955410A (en) * 2014-05-23 2014-07-30 苏州国芯科技有限公司 Interruption control method based on multiple interrupt source priority ordering
CN108762905A (en) * 2018-05-24 2018-11-06 苏州乐麟无线信息科技有限公司 A kind for the treatment of method and apparatus of multitask event
CN113031927A (en) * 2021-03-26 2021-06-25 苏州挚途科技有限公司 Data input and output method, device and system
CN113448902A (en) * 2020-03-25 2021-09-28 意法设计与应用股份有限公司 Processing system, integrated circuit, device and method with queued serial peripheral interface

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6381532B1 (en) * 2000-09-20 2002-04-30 Visteon Global Technologies, Inc. Queued port data controller for microprocessor-based engine control applications
US20120002678A1 (en) * 2010-07-02 2012-01-05 Telefonaktiebolaget Lm Ericsson (Publ) Prioritization of data packets
CN103955410A (en) * 2014-05-23 2014-07-30 苏州国芯科技有限公司 Interruption control method based on multiple interrupt source priority ordering
CN108762905A (en) * 2018-05-24 2018-11-06 苏州乐麟无线信息科技有限公司 A kind for the treatment of method and apparatus of multitask event
CN113448902A (en) * 2020-03-25 2021-09-28 意法设计与应用股份有限公司 Processing system, integrated circuit, device and method with queued serial peripheral interface
CN113031927A (en) * 2021-03-26 2021-06-25 苏州挚途科技有限公司 Data input and output method, device and system

Also Published As

Publication number Publication date
CN116980362B (en) 2024-02-27

Similar Documents

Publication Publication Date Title
US7096296B2 (en) Supercharge message exchanger
US20190377703A1 (en) Methods and apparatus for reduced-latency data transmission with an inter-processor communication link between independently operable processors
EP2097828B1 (en) Dmac to handle transfers of unknown lengths
US5937200A (en) Using firmware to enhance the functionality of a controller
KR20180017035A (en) Test for 50 nanosecond spike filter
CN101523345A (en) Method and apparatus for interfacing between a host processor and a coprocessor
KR19990067846A (en) Method and arrangement for operating a bus system
US10929332B2 (en) USB transmission device and transmission method
KR20120040535A (en) Bus system and operating method thereof
CN114662136A (en) A high-speed encryption and decryption system and method of multi-algorithm IP core based on PCIE channel
JP2008009817A (en) Semiconductor device and data transfer method
US5619687A (en) Queue system having a time-out feature and method therefor
US8943238B2 (en) Operations using direct memory access
CN116980362B (en) Multitasking method and device for SPI architecture
JPH11272603A (en) Bus bridge device and transaction forwarding method
US20090320034A1 (en) Data processing apparatus
KR100874073B1 (en) Method and apparatus for allocating bandwidth on a transmit channel of a bus
US6112272A (en) Non-invasive bus master back-off circuit and method for systems having a plurality of bus masters
WO2009067665A2 (en) Controller with indirect accessible memory
US20060179172A1 (en) Method and system for reducing power consumption of a direct memory access controller
JP2021086512A (en) Information processing device
KR102260820B1 (en) Symmetrical interface-based interrupt signal processing device and method
JP6138482B2 (en) Embedded system
CN112347024A (en) USB data transmission optimization method and system
JPS63293660A (en) Communication controller

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20241113

Address after: 100000 106A, Floor 1, B-1, Zhongguancun Dongsheng Science Park, 66 Xixiaokou Road, Haidian District, Northern Territory, Beijing

Patentee after: ZIGUANG TONGXIN MICROELECTRONICS CO.,LTD.

Country or region after: China

Address before: No. 1511-06, 15 / F, block D, Tsinghua Tongfang science and technology building, No. 1 courtyard, Wangzhuang Road, Haidian District, Beijing 100083

Patentee before: Beijing Ziguang Xinneng Technology Co.,Ltd.

Country or region before: China