Transmission device for SPI communication
The transmission device autonomously handles SPI data transfers using a DMA controller and SPI module, reducing control unit load and enhancing scalability and speed in vehicle communication systems.
Patent Information
- Application Number
- DE102023203902
- Authority / Receiving Office
- DE · DE
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-04-27
- Publication Date
- 2024-10-31
AI Technical Summary
Existing SPI communication systems in vehicles require a control unit to manage and control all data transfers, which can lead to increased processing demands and limited scalability and flexibility.
A transmission device with a control unit, DMA controller, and SPI module that allows data to be transmitted autonomously from storage to SPI receivers without continuous control unit intervention, featuring dynamic configuration and prioritization mechanisms.
Reduces processing demands on the control unit, enhances scalability and flexibility, and enables faster data transfers by allowing independent data handling and priority-based switching.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
State of the art
[0001] The present invention relates to a transmission device for a Serial Peripheral Interface, hereinafter SPI abbreviated, communication.
[0002] Bus systems are known from the prior art, which are used for data communication between different Components and / or within respective components. Such bus systems are particularly can be used advantageously in distributed systems such as a vehicle system.
[0003] One such bus system is the so-called SPI bus system, which is a standard for a synchronous serial data bus. The SPI bus system is based on a so-called master-slave Communication in which a master component sends a clock signal to synchronize the connected slave components and initiates respective communication processes using the slave components.
[0004] In the prior art, when implementing SPI communication, it is usually provided that a control unit (e.g. a CPU) initiates the respective SPI communication processes and a transfer via SPI to the transmitted and / or controls data to be received.
[0005] In addition, so-called DMA (direct memory access) controllers are known from the state of the art, which are designed to allow peripheral devices direct access to a system’s main memory, so that data transfers are essentially possible without placing any load on the control unit. Disclosure of the invention
[0006] According to the present invention, a transmission device for a serial peripheral interface, hereinafter abbreviated as SPI, communication. Such SPI communication can be used, for example, advantageously between sensors and central control units for such sensors in a vehicle, without the The proposed SPI communication is thereby limited to applications in vehicles. Such a vehicle is, for example, a road vehicle (e.g. motorcycle, car, van, truck) or a rail vehicle or a Aircraft / airplane and / or a watercraft.
[0007] The transmission device according to the invention comprises a control unit, a memory unit, a DMA (direct memory access) controller and an SPI (serial peripheral interface) module.
[0008] The control unit is, for example, an ASIC, FPGA, processor, CPU, digital signal processor, microcontroller, or similar. The control unit is configured to establish an information technology connection between the DMA controller and the SPI module by assigning a respective SPI transmission channel provided in the SPI module corresponding DMA channel is assigned. It should be noted that the procedure described here and below described configurations performed by the control unit predefined static configurations and / or can be dynamically adaptable configurations at runtime.
[0009] The control unit is further configured to provide an information technology connection between the storage unit and the DMA controller (static and / or dynamic) by assigning to each DMA channel that is assigned to an SPI send channel is assigned, a corresponding transmit buffer is assigned in the memory unit. It should be noted It should be noted that the size and / or number of transmit buffers in the storage unit cannot be limited certain values are limited.
[0010] Furthermore, the control unit is configured to receive a signal to be transmitted by means of the transmission device Transmission data record, which contains transmission data (ie, user data) and control information corresponding to the transmission data for an SPI transmission (e.g. information about a number of transmission data, segmentation information for an implementation of segmented data transmissions, addressing information which identifies a recipient of the data etc.), to write to a send buffer of the storage unit provided for the send data record and a Transfer of the transmission data record by issuing a transmission request to the SPI module, which used send buffer.
[0011] The SPI module comprises an SPI controller and at least one SPI transmit buffer and is configured to Responding to the transmission request of the control unit an automatic transfer of the transmission data set from the used send buffer of the memory unit to the SPI send buffer by the DMA controller via the SPI transmission channel is addressed which is connected to the transmission buffer identified by the transmission request of the memory unit. Based on the configured connections between the DMA controller and the memory unit, the DMA controller is accordingly able to transmit the transmission data set without involving the control unit automatically transferred to the corresponding SPI transmit buffer.
[0012] The SPI module, which functions in particular as an SPI master, is further configured to be controlled by the DMA controller in Send data written to the SPI send buffer via an SPI bus connected to the SPI module to output, whereby the control information corresponding to the transmission data is used to carry out the SPI Transmission by the SPI controller. This means, for example, addressing information from the control information is used to select a desired receiver (in particular an SPI slave) for the transmission data to be addressed on the SPI bus.
[0013] The transmission device according to the invention offers the particular advantage that transmission data or After storing the transmission data records in the storage unit and initiating the transmission process, they are transmitted autonomously via the SPI- Bus without the control unit having to control the transmission. This allows the control unit relieved, allowing other operations to be carried out by the control unit to be carried out more quickly and / or a control unit with lower power requirements can be used, which, for example, allows Cost reduction for the transmission device can be achieved.
[0014] A further advantage of the transmission device according to the invention is that the simple Scalability of the underlying architecture achieves a particularly high level of flexibility, which allows, among other things, a number of of transmit buffers of the storage unit and / or a size of respective transmit data records and / or a number of SPI Receivers, etc. can be flexibly adapted based on the configuration by the control unit.
[0015] The subclaims show preferred developments of the invention.
[0016] In an advantageous embodiment of the present invention, the number of SPI transmit buffers is less than a number of transmit buffers of the memory unit and in particular (here ideally) the number of SPI Send buffers a value of one. This allows the required memory space for the SPI Save transmission buffer, which for example leads to a reduction in the required chip area and / or cost savings Alternatively or additionally, the transmit buffer of the storage unit is configured to store To store a plurality of transmission data with at least one corresponding control information in a transmission data record. This allows for the required storage space in the storage unit and the data to be transferred to be Reduce the data volume from the storage unit to the SPI transmit buffer. Accordingly, transfers of Send data can be completed more quickly. This is particularly advantageous when multiple send data are sent to one and to the same recipient.
[0017] In a further advantageous embodiment of the present invention, the DMA controller is configured a respective transmission data record during transmission into a corresponding SPI transmission buffer under Taking into account the size of the SPI send buffer, segment it automatically and transfer individual data segments of the segmented transmit data set to the SPI transmit buffer automatically and successively. This allows particularly high flexibility of the transmission device according to the invention, since a size of the respective Transmission data sets can be defined arbitrarily. For this purpose, offset management is preferably used for each DMA channel is provided in the DMA controller, through which the start address of each subsequent The data segment to be transmitted is managed in the storage unit. It is understood that the following The data segment to be transferred is only transferred to the SPI transmit buffer by the DMA controller when the previous data segment was successfully transmitted on the SPI bus. For this purpose, a corresponding Feedback from the SPI module to the DMA controller is provided.
[0018] Particularly advantageously, the SPI module further comprises an arbitration unit which is configured to Transmission requests of the control unit and / or defined by the configuration by the control unit evaluate prioritization information in order to determine the respective SPl data transmissions according to the prioritization information. Such prioritization makes it possible to prioritize a large number of data stored in the storage unit, to prioritize unsent transmission data records with regard to a transmission sequence and / or to perform an ongoing Transmission of a transmission data record that has not yet been completely sent by a transmission of a transmission data record with a higher priority. In other words, it is possible to interrupt a prioritized switching between different transmission requests at different times, for example after a fully completed transmission of a respective transmission data record and / or after a fully completed transmission of a respective transmission data packet within a transmission data record and / or after a fully completed transfer of Send data from the SPI send buffer on the SPI bus. The latter offers the particular advantage of a particularly fast Possibility of switching to higher priority transmission requests and thus a particularly fast Response time, which can be particularly advantageous for time-critical applications. This does not explicitly exclude the possibility that a priority-related switch to another transmission request or a transmission request corresponding transmission data record can take place at different times.
[0019] Preferably, the DMA controller is configured to initiate a continuous data transfer between the memory unit and the SPI module in response to a higher priority data transfer requested by the arbitration unit interrupt (as described above, preferably whenever the corresponding SPI send buffer processed, ie was sent) and the interrupted data transmission after the higher priority Such interruptions can be repeated several times nested, for example, if an ongoing data transfer is interrupted by a first higher priority transmission and then interrupted by a second transmission with an even higher priority, etc. For Such priority-related interruptions can be handled in particular by the offset management of the DMA controller for segmented data transfers and / or a different management for the Interrupt transmission processes.
[0020] The control information contained in respective transmission data sets comprises, as described above, For example, addressing data for addressing respective recipients and / or information about a transmitted data volume of a transmission data record and / or an SPI command and / or segmentation information for respective transmission data records, and / or if applicable, further information concerning the SPI protocol or the SPI transmission.
[0021] In a further advantageous embodiment of the present invention, the storage unit has at least one receive buffer, while the SPI module has at least one SPI receive buffer. In addition, the control unit set up to configure the DMA controller and the SPI module by setting the respective SPI receive channels corresponding DMA channels and by assigning the respective corresponding DMA channels corresponding receive buffers in the memory unit. In this way, the The transmission device according to the invention is designed to transmit data from respective receivers on the SPI bus independently of a control by the control unit, whereby the control unit, as in the case described above Sending data is relieved accordingly. Advantageously, the control unit is provided with a complete receipt of a Receive data record (which can be structured similarly to the send data records) is actively informed (e.g. via a Interrupt).
[0022] Alternatively or additionally, it is also possible for the control unit to check at regular intervals whether There are newly received data in the respective receive buffers in the storage unit, which are It is understood that similar mechanisms may be provided to to inform the control unit that a transmission data set stored in the memory unit has been completely transferred to the SPI bus has been transmitted so that the control unit can use this information to respond to it if necessary to to write transmitted data into the storage unit.
[0023] Preferably, in each receiving buffer of the memory unit, a memory area for status information which represent information regarding corresponding received data and which together with the corresponding received data represent a respective received data record. Status information contains, for example, information about whether a reception data record is complete and / or whether a received data record is error-free (e.g. by a checksum check), etc.
[0024] Particularly advantageous is a number of SPI receive buffers less than a number of receive buffers of the Storage unit and particularly advantageously their number corresponds to a value of one. This allows the above The advantages described in connection with the SPI transmit buffer also apply to the receive side of the transmission device. Alternatively or additionally, each receive buffer of the storage unit is arranged in a respective reception data record a plurality of reception data with corresponding status information to save.
[0025] Further advantageously, the control unit of the transmission device according to the invention is arranged Configuration of the DMA controller and / or the SPI module during an initialization phase and / or at runtime of the transmission device and / or adapt it. In particular, by the possibility of adapting the A particularly high degree of flexibility of the transmission unit according to the invention can be achieved by configuration at runtime.
[0026] In addition, it is conceivable that the control unit is set up to prioritize the respective transmission data sets for This can be advantageous, for example, if a vehicle’s environment detection system, which exemplifies a transmission device according to the invention for communication between a central control unit (SPI master) and a large number of sensors (SPI slaves), due to currently available Adjust boundary conditions for data transmissions from and / or to certain sensors differently than previously configured (for example, to increase the number of sensors that can best detect a critical traffic situation) to prioritize). Short description of the drawings
[0027] An embodiment of the invention will be described in detail below with reference to the accompanying drawings described. It shows: Fig. 1 is a schematic view of an embodiment of a transmission device according to the invention. Embodiments of the invention
[0028] Fig. 1 shows a schematic view of an embodiment of a transmission device according to the invention, which, for example, is used for SPI-based data transmission between a large number of ultrasonic sensors and a Ultrasonic control unit is used in a vehicle.
[0029] The transmission device comprises a control unit 10 designed as a CPU, a memory unit 20, a DMA Controller 30 and an SPI module 40.
[0030] The control unit 10 is configured to transmit transmission data sets 50, 50` to one or more SPI receivers 110 via a SPI bus 60 by transferring the transmission data sets 50, 50` via an information technology connection in each the transmission buffers 22, 22` of the memory unit provided for this purpose.
[0031] It should be noted that respective components of the transmission device according to the invention can be may be present (e.g. several send buffers 22, 22', etc.) and that for reasons of clarity all multiple versions of these components are provided with reference symbols, since their affiliation is is easily apparent to a specialist.
[0032] Each transmission data record 50, 50` comprises a control information 54, 54` and at least one data packet, which represents the payload to be transmitted, here called transmission data 52, 52`. The transmission data record 50 comprises a data packet of transmission data 52, while the transmission data record 50` here, for example, comprises two data packets of Transmission data 52` includes.
[0033] Analogous to the transmission buffers 22, 22' and the transmission data sets 50, 50', the memory unit 20 has a plurality of receive buffers 24, 24`, in each of which receive data records 80 can be stored, whereby the Receive data records 80 represent data received by the SPI module 40 via the SPI bus 60. Each receive data record 80 has at least one data packet which contains user data, here called receive data 82 and Status information 84 regarding the received data 82.
[0034] The control unit 10 is configured to establish an information technology connection between the DMA controller 30 and the SPI module 40 by assigning a first SPI transmission channel 42 provided in the SPI module 40 a corresponding DMA channel 32 is assigned. The control unit 10 is also configured to information technology connection between the memory unit 20 and the DMA controller 30 by the DMA channel 32 is assigned a corresponding transmit buffer 22 in the memory unit 20. The configuration is done by transferring configuration data 14 to the DMA controller and configuration data 14` to the SPI module 40. In a similar way, additional SPI transmission channels can be implemented with additional transmission buffers in the memory unit 20 link.
[0035] The control unit 10 is further configured to transmit a message written into the memory unit 20 Send data set 50 to the SPI receiver 110 by sending to an SPI controller 44 of the SPI module 40, which for a control within the SPI module 40, a transmission request 12 is transmitted, which identifies the transmission buffer 22 in the memory unit 20 which contains the transmission data record 50 currently to be transmitted contains.
[0036] In response, the SPI controller 44 selects the buffer 22 identified by the corresponding SPI transmit channel 42 to access the DMA channel 32 linked to the transmit channel 42 by configuration. In response, the DMA controller 30 initiates a first data transfer 90, by means of which in the Send buffer 22 contains send data records 50 in individual data segments whose size is less than or equal to the size SPI transmit buffer 46, and by means of a second data transfer 100 from the DMA controller 30 into the SPI transmit buffer 46 is written.
[0037] The SPI controller 44 then initiates the transmission of the data present in the SPI transmit buffer 46 on the SPI bus 60.
[0038] Furthermore, the SPI module 40 has an SPI receive buffer 48 in which data received via the SPI bus 60 The control unit 10 is also configured to control the DMA controller 30 and the SPI module 40. by assigning a DMA channel 32` to the SPI receive channel 43 and by assigning a corresponding receive buffer 24 in the memory unit 20. In a similar way, further Link SPI receive channels with additional receive buffers 24` in the memory unit 20.
[0039] The receive buffers 24, 24' are configured to receive data received in the SPI module 40 from the SPI bus 60 via the DMA controller 30 in the form of receive data sets 80, each receive data set 80 containing at least one Data packet, which represents respective received data 82 and corresponding with the received data 82 Status information 84.
[0040] In addition, the SPI module 40 has an arbitration unit 70 which is configured to simultaneously pending transmission requests 12 or resulting data transmissions based on prioritization information, which is provided via the transmission request 12, according to the prioritization information. In one case, in which a transmission request 12 arrives in the arbitration unit 70 with a prioritization that is higher than a Prioritizing an already running data transmission, the arbitration unit 70 initiates a Interruption of the current transmission as soon as the SPI send buffer 46 has been processed, ie, sent. In response to the interrupted transmission, the transmission with the higher priority is now carried out in order to After this transfer, the previously interrupted transfer is automatically resumed by means of the DMA controller 30 to resume.
Claims
1. Transmission device for a Serial Peripheral Interface, hereinafter abbreviated SPI, communication comprising: • a control unit (10), • a storage unit (20), • a Direct Memory Access, hereinafter abbreviated to DMA, controller (30), and • an SPI module (40), where • the control unit (10) is set up, ◯ an information technology connection between the DMA controller (30) and the SPI module (40) to configure by assigning a respective SPI transmission channel (42) provided in the SPI module (40) a corresponding DMA channel (32) is assigned, ◯ an information technology connection between the memory unit (20) and the DMA controller (30) to configure by assigning a corresponding one to each DMA channel (32) assigned to an SPI transmission channel (42) transmission buffer (22) in the memory unit (20), and ◯ a transmission data set (50) to be transmitted by means of the transmission device, which contains transmission data (52) and containing control information (54) for an SPI transmission corresponding to the transmission data (52), in a Send data record (50) provided send buffer (22) of the memory unit (20) and to transmit the Send data record (50) by issuing a send request (12) to the SPI module (40), which Send buffer (22) indicates, to initiate, • the SPI module (40) has an SPI controller (44) and at least one SPI transmit buffer (46) and is configured ◯ in response to the transmission request (12) of the control unit (10), an automatic transfer of the Send data record (50) from the used send buffer (22) of the memory unit (20) to the SPI send buffer (46) to by addressing the DMA controller (30) via the SPI transmission channel (42) that is connected to the Send request (12) marked send buffer (22) of the memory unit (20), and ◯ the transmission data (52) written by the DMA controller (30) into the SPI transmission buffer (46) via a SPI module (40) information-technically connected SPI bus (60), wherein the data (52) corresponding control information (54) is used to carry out the transmission.
2. Transmission device according to claim 1, wherein • a number of SPI transmit buffers (46) is less than a number of transmit buffers (22) of the memory unit (20) and in particular corresponds to a number of one, and / or • each transmission buffer (22) of the storage unit (20) is arranged to store in a respective transmission data record (50) a to store a plurality of transmission data (52) with corresponding control information (54).
3. Transmission device according to one of the preceding claims, wherein the DMA controller (30) is arranged to respective transmission data record (50) during transmission into a respective corresponding SPI transmission buffer (46) under Consideration of the size of the SPI send buffer fers (46) and individual data segments of the segmented transmission data record (46) automatically successively to the SPI transmit buffer (46).
4. Transmission device according to one of the preceding claims, wherein the SPI module (40) further comprises a Arbitration unit (70) which is configured to receive the transmission requests (12) of the control unit (10) prioritization information contained and / or determined by means of the configuration by the control unit (10) to prioritize respective SPI data transmissions according to the prioritization information.
5. Transmission device according to claim 4, wherein the DMA controller (30) is arranged • a continuous data transfer between the memory unit (20) and the SPI module (40) in response to a to interrupt higher priority data transmission requested by the arbitration unit (70), and • the interrupted data transmission is automatically resumed after the higher priority data transmission has been completed to resume.
6. Transmission device according to one of the preceding claims, wherein the control information (54) • Addressing data, and / or • a data volume to be transferred, and / or • an SPI command, and / or • Includes segmentation information.
7. Transmission device according to one of the preceding claims, wherein • the storage unit (20) has at least one receiving buffer (24), • the SPI module (40) has at least one SPI receive buffer (48), • the control unit (10) is configured to configure the DMA controller (30) and the SPI module (40) by respective SPI receive channels (43) are assigned to respective corresponding DMA channels (32') and by respective corresponding DMA channels (32') each corresponding receive buffers (24) in the memory unit (20) be assigned.
8. Transmission device according to claim 7, wherein in each reception buffer (24) of the storage unit (20) a A storage area for status information (84) is provided, which contains information relating to corresponding Represent received data (82) and which together with the corresponding received data (82) form a represent the respective received data record (80).
9. Transmission device according to claim 7 or 8, wherein • a number of SPI receive buffers (48) is less than a number of receive buffers (24) of the memory unit (20) and in particular a number of one, and / or • each receive buffer (24) of the memory unit (20) is arranged to store a plurality of receive data records (80) save.
10. Transmission device according to one of the preceding claims, wherein the control unit (10) is arranged to Configuration of the DMA controller (30) and / or the SPI module (40) during an initialization phase and / or for Carry out and / or adjust the running time of the transmission device.
11. Transmission device according to claim 10, wherein the control unit (10) is arranged to prioritize for respective To adapt transmission data records (50) at runtime.
Citation Information
Patent Citations
A processing system comprising a queued serial peripheral interface, related integrated circuit, device and method
EP3885924A1
