Microcontroller and corresponding operating methods
By using a DSPI module and processing unit in a microcontroller to simulate communication protocols such as CAN FD optical protocol, the problem of increased microcontroller cost is solved, achieving low-cost support for multiple communication protocols and improving communication speed.
Patent Information
- Application Number
- CN202210665158.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2022-06-01
- Filing Date
- 2022-06-13
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2042-06-13
AI Technical Summary
Implementing native protocol controllers in the automotive field with existing microcontrollers increases costs, necessitating low-cost solutions that support multiple communication protocols.
By using a Deserialization-Serialization Peripheral Interface (DSPI) module in a microcontroller, combined with a processing unit and an enhanced direct memory access engine, communication protocols such as CAN FD optical protocol can be simulated, avoiding reliance on dedicated hardware components.
It realizes a microcontroller that supports multiple communication protocols without increasing costs, improves communication speed, reduces device costs, and achieves communication speeds of up to 25Mbps in DSI mode.
Smart Images

Figure CN115481067B_ABST
Abstract
Description
[0001] Cross-references to related applications
[0002] This application claims the benefit of Italian application number 102021000015488, filed on June 14, 2021, which is incorporated herein by reference. Technical Field
[0003] This specification relates to electronic communication in microcontrollers using the Deserialized-Serial Peripheral Interface (DSPI). Background Technology
[0004] A typical microcontroller may include one or more deserialization-serialization peripheral interface modules (such as a DSPI controller).
[0005] The microcontrollers available from STMicroelectronics under the trade name SPC58xNx are examples of such conventional microcontrollers, used, for example, in the automotive field. Detailed descriptions of these microcontrollers are provided in the datasheet “SPC584Nx, SPC58ENx, SPC58NNx - 32-bit Power Architecture Microcontrollers for Automotive ASIL-D Applications” published in DS11734, version 5, June 2019, and in the reference manual “SPC58xNx 32-bit Power Architecture Microcontrollers for Automotive ASIL-D Applications” published in RM0421, version 5, January 2021, both publicly available online at st.com. Specifically, Section 7.8.4 (pages 240-242) and Chapter 58 (pages 2707-2804) of the reference manual RM0421 cited above provide a detailed description of the operating principles of the deserialized-serialized peripheral interface in such microcontrollers.
[0006] In short, the DSPI module can use an enhanced direct memory access (eDMA) engine to perform data transfers, and it supports data serialization and deserialization-serialization features. The DSPI module can have three configurations.
[0007] The first configuration is the Serial Peripheral Interface (SPI) configuration, where the DSPI module sends and receives serial data. The SPI configuration allows the DSPI module to operate as a basic SPI block, with an internal FIFO supporting external queue operations. Transmit and receive data reside in separate FIFOs (First-In, First-Out registers). The host CPU or DMA controller of the microcontroller including the DSPI module reads received data from the receive FIFO and writes transmit data to the transmit FIFO.
[0008] The second configuration is the Enhanced Deserialized-Serialized Interface (DSI) configuration, in which the DSPI module serializes up to 64 parallel input signals or register bits. The DSPI module also deserializes and serializes received data into parallel output signals or memory-mapped registers. Data is transmitted using a protocol similar to SPI.
[0009] The third configuration is the Combined Serial Interface (CSI) configuration, where the DSPI module supports a combination of SPI and DSI operating modes. In the first (normal) mode of the CSI configuration, the DSPI module interleaves DSI data frames with SPI data frames. Interleaving occurs at frame boundaries. In the second mode of the CSI configuration (also known as the Timing Serial Bus configuration, TSB), SPI data transmissions have a higher priority than DSI data. In the third mode of the CSI configuration (also known as the Interleaved Timing Serial Bus configuration, ITSB), frames from SPI and DSI are interleaved without priority. At each trigger, a frame from DSI is sent if there are no frames in the SPI or if the previous transmission was from the SPI.
[0010] DSI and CSI configurations can be used to simulate microsecond channels.
[0011] DSPI serialization can use some internal modules of the microcontroller as input sources, such as the General Purpose Timer Module (GTM), the Enhanced Modular Input / Output Subsystem (eMIOS), and / or General Purpose Input / Output (GPIO), and it also provides an alternating serialization data register that can be written to by software and used as an alternating source of serialized data.
[0012] Providing a wide range of communication peripherals in microcontrollers (especially in the automotive sector) is a desirable feature. However, implementing native protocol controllers in microcontrollers can lead to undesirable cost increases.
[0013] Therefore, there is a need in the field for microcontrollers that can support an increasingly wide range of communication protocols at a low cost.
[0014] The embodiments of the invention provide an improved microcontroller that supports certain communication protocols without implementing a corresponding (hardware) protocol controller.
[0015] Other embodiments may involve a corresponding operating method.
[0016] In one or more embodiments, the microcontroller may include a processing unit and a deserialization-serialization peripheral interface (DSPI) module. The DSPI module may be configured to be coupled to a communication bus operating according to a selected communication protocol. The processing unit may be configured to read user data intended to be included in an outgoing frame encoded according to the selected communication protocol. The processing unit may be configured to calculate a CRC value intended to be included in the outgoing frame based on the user data. The processing unit may be configured to construct the outgoing frame by including the user data and the calculated CRC value in the outgoing frame. The processing unit may be configured to generate a DSPI frame encoded according to the selected communication protocol based on the outgoing frame. The processing unit may be configured to program the data registers of the DSPI module using the DSPI frame, such that operation of the DSPI module results in the transmission of the DSPI frame via the communication bus.
[0017] In one or more embodiments, the processing unit may be configured to apply bit-stuffing processing to a DSPI frame encoded according to a selected communication protocol.
[0018] In one or more embodiments, the deserialization-serialization peripheral interface module may include a pair of differential output pins coupled to a communication bus to drive the communication bus via a differential DSPI signal.
[0019] In one or more embodiments, the deserialization-serialization peripheral interface module can be configured to couple to transceiver circuitry (e.g., a CAN transceiver) to provide an output DSPI signal to the transceiver circuitry, the output DSPI signal indicating a DSPI frame encoded according to a selected communication protocol.
[0020] In one or more embodiments, the microcontroller may include an enhanced direct memory access engine. The enhanced direct memory access engine may be configured to read user data and / or program the data registers of the deserialized-serial peripheral interface module using DSPI frames.
[0021] In one or more embodiments, the deserialization-serialization peripheral interface module can be configured to operate with a deserialization-serialization interface (DSI).
[0022] In one or more embodiments, the deserialization-serialization peripheral interface module can be configured to operate in a combined serial interface (CSI) configuration, and the deserialization-serialization peripheral interface module can be configured to send frames in the SPI format interleaved with DSPI frames transmitted via the communication bus.
[0023] In one or more embodiments, a frame in the SPI format may include a DSPI frame programmed into the data register of a deserialization-serialization peripheral interface module.
[0024] In one or more embodiments, the selected communication protocol may be the CAN protocol, optionally the CAN FD optical protocol, or the LIN protocol, or the FlexRAY protocol, or the DSI3 protocol.
[0025] In one or more embodiments, a method of operating a microcontroller according to one or more embodiments may include reading user data intended to be included in an outgoing frame encoded according to a selected communication protocol. The method may include calculating a CRC value intended to be included in the outgoing frame based on the user data. The method may include constructing the outgoing frame by including the user data and the calculated CRC value in the outgoing frame. The method may include generating a DSPI frame encoded according to the selected communication protocol based on the outgoing frame. The method may include programming the data registers of a deserialization-serialization peripheral interface module using the DSPI frame such that operation of the deserialization-serialization peripheral interface module results in the transmission of the DSPI frame via a communication bus.
[0026] Therefore, one or more embodiments can facilitate the emulation of specific communication protocols in a microcontroller using low-cost communication peripherals, without relying on dedicated hardware components. Attached Figure Description
[0027] One or more embodiments will now be described by way of example only with reference to the accompanying drawings, wherein:
[0028] - Figure 1 This is a circuit block diagram example of a DSPI module used in one or more embodiments of this specification;
[0029] - Figure 2 This is another circuit block diagram example of a DSPI module used in one or more embodiments of this specification;
[0030] - Figure 3 This is a block diagram example of a program for generating frames according to the CAN FD optical protocol according to one or more embodiments of this specification;
[0031] - Figure 4 This is a block diagram example illustrating the operating principle of one or more embodiments of this specification;
[0032] - Figure 5 This is a flowchart example of a procedure for simulating a CAN FD optical frame via a DSPI interface according to one or more embodiments of this specification;
[0033] - Figure 6 This is a flowchart example of another procedure for simulating a CAN FD optical frame via a DSPI interface, according to one or more embodiments of this specification.
[0034] - Figure 7This is a flowchart example of a procedure for adding padding bits to a simulated CAN FD optical frame, as described in one or more embodiments of this specification.
[0035] - Figure 8 This is a block diagram example of the operation of the DSPI module in one or more embodiments of this specification; and
[0036] - Figure 9 This is a flowchart example of a procedure for simulating a CAN FD optical frame via a DSPI interface operated in CSI configuration, according to one or more embodiments of this specification. Detailed Implementation
[0037] In the following description, one or more specific details are illustrated to provide a thorough understanding of examples of embodiments of this specification. Embodiments may be obtained without one or more specific details or with other methods, components, materials, etc. In other instances, known structures, materials, or operations are not illustrated or described in detail so that certain aspects of the embodiments are not obscured.
[0038] References to "embodiment" or "one embodiment" within the framework of this specification are intended to indicate that a particular configuration, structure, or feature described with respect to that embodiment is included in at least one embodiment. Therefore, phrases such as "in an embodiment" or "in one embodiment," which may appear at one or more points in this specification, do not necessarily refer to the same embodiment. Furthermore, specific configurations, structures, or features may be combined in any suitable manner in one or more embodiments.
[0039] The headings / references used herein are provided for convenience only and are not intended to limit the scope of protection or the scope of the embodiments.
[0040] In all the accompanying figures, unless the context otherwise indicates, similar parts or elements are indicated by similar reference numerals / numbers, and corresponding descriptions are provided for brevity and without repetition.
[0041] As previously discussed, providing communication peripherals for certain communication protocols in microcontrollers is a desirable feature. Specifically, in the automotive field, the CAN FD optical protocol has recently been developed. The aim is to provide microcontrollers capable of communicating using the CAN FD optical protocol without implementing a native CAN controller, thereby reducing device costs.
[0042] Therefore, one or more embodiments relate to a microcontroller that uses low-cost communication peripherals (especially DSPI modules) to emulate a CAN FD optical protocol controller without relying on dedicated hardware components.
[0043] Specifically, the DSPI module's DSI configuration can be adapted to the functionality of a master device according to the CAN FD optical protocol, where the bus arbitration phase is not used (unlike the standard CAN communication protocol). In recent generations of (automotive) microcontrollers, DSPI modules have conventionally been embedded primarily as a backup solution, as their functionality has been superseded by other (e.g., newer) peripherals such as SPIq. Therefore, DSPI modules can be conveniently dedicated to emulating CAN FD optical protocol controllers without sacrificing the functionality of the microcontroller device.
[0044] Additionally, the DSPI module can use eDMA to quickly transfer data between the microcontroller's main memory and other peripherals without CPU intervention. This feature is not available on other IP (intellectual property) blocks, such as native CAN controllers.
[0045] The DSPI module provides a synchronous serial bus for communication between the microcontroller and one or more external peripheral devices. In a DSI configuration, the DSPI module serializes up to 64 parallel input signals or register bits. The DSPI module also deserializes received data into parallel output signals or memory-mapped registers. According to one or more embodiments, the DSPI module operating in DSI mode is therefore suitable for simulating master CAN FD optical frame transmission. A CAN FD optical frame may include: a standard identifier field, a fixed control bit field, a data length code (DLC) field, a data byte (“payload”) field, a cyclic redundancy check (CRC) field, and an acknowledgment field. The CRC field may also contain a padding bit count and its parity check. After padding bits have been inserted into the frame, a CRC value is calculated and added. The CRC value conforms to a certain (e.g., dedicated) padding rule, according to which the fixed padding bits are inserted, for example, as described in standard ISO 11898-1:2015.
[0046] Figure 1 This is a block diagram example of one or more embodiments, wherein the physical layer for CAN FD optical connectivity is implemented using DSPI differential signals DSPI_P and DSPI_N provided by DSPI module 10, without using a transceiver.
[0047] alternative sites, in Figure 2 In one or more embodiments illustrated, the DSPI module 10 can transmit the transmission signal TX to the physical CAN transceiver 20, which drives the differential CAN signals CAN_H and CAN_L to transmit analog frames.
[0048] Figure 3This is a high-level block diagram example of a program 30 (e.g., a software program) implemented in one or more embodiments to generate a simulated CAN FD optical master frame via other conventional DSPI hardware (e.g., one or more DSPI modules) provided in the microcontroller.
[0049] Before executing program 30, the DSPI module is initialized in DSI operation mode. For example... Figure 3 As illustrated, procedure 30 includes step 301, where an application (e.g., running in the processing unit of a microcontroller) parses user data to construct a DSPI DSI frame simulating a CAN FD optical frame. In a subsequent step 302, the application calculates the CRC value of the frame. In a subsequent step 303, the DSPI DSI frame is constructed using the user data and the calculated CRC value. In a subsequent step 304, bit stuffing is inserted into the DSPI DSI frame if necessary. In the final step 305 of procedure 30, the DSPI data register is programmed such that the operation of the DSPI module simulates the transmission of a CAN FD optical frame. Thus, the DSPI module generates the DSPI DSI frame starting from the user parameters defined for the CAN FD optical message.
[0050] Note, refer to Figures 1 to 3 The described method is applicable to any type of analog frame that can be sent by the DSPI module. Therefore, references to the analogy of CAN FD optical frames should be understood as purely exemplary and not as limiting the embodiments described in this specification.
[0051] Figure 4 This is a high-level block diagram example of a general view of an application running in a microcontroller according to one or more embodiments. Figure 4 As illustrated, the advanced software application 40 can similarly use APIs (e.g., socket layer 41) to send frames on the real CAN protocol (e.g., using a low-level CAN driver 42 and a conventional CAN physical layer 43) and / or on a simulated CAN protocol (e.g., using a DSPI module 44 to simulate CAN FD optical frames and transmit simulated frames via a CAN transceiver or directly via DSPI differential signal 45).
[0052] Figure 5 This is a flowchart example of a program 50 (e.g., a software program) implemented in one or more embodiments to simulate a CAN FD optical frame via a DSPI interface.
[0053] like Figure 5As illustrated, program 50 begins in step 501 with the application running on the microcontroller. In step 502, the microcontroller (e.g., clock / PAD / IRQ) is set up. In step 503, the DSPI module is initialized. In step 504, the DSPI module is configured for DSI. In step 505, the clock and prescaler of the DSPI module are set according to the desired transmission bit rate. In step 506, an error is checked. For example, since the DSPI controller is expected to be correctly configured, the DSPI module configuration register should have the expected configuration, and the clock should allow it to be configured. In one or more embodiments, this configuration check may be necessary before initiating any transaction via a peripheral device. If an error is detected in step 506 (result Y in step 506), the program terminates (exits) in an error state in step 507. If no error is detected in step 506 (result N in step 506), the user parameters defining the frame content are resolved in step 508. In step 509, the ID is checked: the CAN ID field passed by the application higher layer is verified to ensure it corresponds to the expected CAN FD optical identifier (e.g., via software check). In step 510, the message buffer is retrieved: this is the data passed from the application, which will be parsed as part of the simulated CAN FD optical message in the DSPI register. In step 511, an error is checked (e.g., checking if the message buffer is NULL or too large). If an error is detected in step 511 (result Y in step 511), the program terminates (exits) in error state in step 507. If no error is detected in step 511 (result N in step 511), the protocol converter is started in step 512. In step 513, the CRC value of the frame is calculated. In step 514, the CAN FD optical frame is constructed based on the parsed user data and the calculated CRC value. In step 515, the LSB and MSB of the 64-bit data are prepared: the CAN FD optical frame can be split into two parts as it will be programmed into two DSPI registers (MSB is the most significant bit, and LSB is the least significant bit). The raw buffer passed by the application must be modified to simulate a CAN FD optical frame. Steps 516 to 520 include operations to prepare the "real" frame. For example, these steps include adding a Start Frame (SOF), adding a program ID, adding R0 and data length, adding data, and adding an End Frame (EOF) at the end. In step 521, an algorithm for introducing padding bits is initiated. In step 522, the generated frame is checked for a sequence consisting of five consecutive '1' values and five consecutive '0' values. In step 523, it is checked whether such a sequence has been found (result Y) or not (result N). If the sequence is not found, the program returns to step 522. If the sequence has been found, padding bits are added to the frame in step 524.In step 525, the frame is updated (e.g., after padding bits have been inserted, the CRC value is calculated and added at the end of the frame construction process). In frame 526, the ADSR register (DSPI DSI - Alternating Serialization Data Register) is programmed. Program 50 terminates in exit step 527.
[0054] Figure 6 This refers to one or more embodiments of using eDMA according to the DSPI module. Figure 5 The flowchart example for variant 50' of program 50 is shown below. Figure 6 In the flowchart, with Figure 5 The same reference numerals are used to indicate the same steps in the procedure.
[0055] like Figure 6 As illustrated, the difference between procedure 50' and procedure 50 is that step 504 is replaced by step 504', in which the DSPI module is set to DSI configuration and DMA is enabled.
[0056] The difference between procedure 50' and procedure 50 is that, after step 506 and before step 508, another step 601 is inserted, in which eDMA is configured and the MUX is configured. According to the previously cited device reference manual, enhanced direct memory access (eDMA) must be programmed and configured for use by the peripheral device. This means that its own DMA MUX must be programmed, and, for example, destination and source addresses must be defined to move data using the engine (e.g., dst=reg, src=frame).
[0057] The difference between procedure 50' and procedure 50 is that step 526 is not executed between steps 525 and 527: the DSPI register is updated by DMA. Notifications can be executed via the relevant IRQ service routine (if installed) or in polling mode. Events can be notified to the software by using interrupts or polling (using timers) the controller's status.
[0058] In one or more embodiments, the protocol converter (or simulator) generates DSPI frames that must be programmed into the DSPI asynchronous register, starting from user input parameters (e.g., CAN messages), for example, as shown in the reference. Figure 5 and 6 Steps 512 to 525 are discussed. For example, Table I (attached at the end of the description) shows an example of the result of register programming performed during program 50 or 50' before adding padding bits. In the example in Table 1, it is assumed that Id is 0x12, making ID1 and ID4 1, and the data length is 3. The data is 0x67.
[0059] As previously referred to Figure 5 and 6As discussed, when a frame has been manipulated for serialization by DSPI operating in DSI mode, if a CAN FD optical frame needs to be completed (see, for example, step 521 in procedures 50 and 50'), the algorithm reprocesses the frame to add bit padding. According to the CAN standard, more than five consecutive bits of the same polarity in a CAN frame between the Start Frame (SOF) and the CRC field are considered an error frame on the CAN bus and are signaled as padding error on the CAN line. In one or more embodiments, to combat this transmitter error, bits of opposite polarity can be inserted after every five consecutive bits.
[0060] Figure 7 This is a flowchart example of a simplified version of a procedure 70 (e.g., a software algorithm) implemented in one or more embodiments to add padding bits. The bit padding field is read, and if it equals 1, it is stored in a bitmap. The frames (LSB and MSB) to be manipulated are also stored in temporary variables. The software then attempts to correct the entire bit padding so that the frame does not include any set of five consecutive bits with the same polarity (value).
[0061] like Figure 7 As illustrated, bit stuffing procedure 70 may include step 701, where bit stuffing is set to '1'. In step 702, the frame Low and High are saved. In step 703, the temporary bit mapping array is cleared. In step 704, a 5-loop is executed. In step 705, bit stuffing is checked and may be corrected. In step 706, the frame is saved in the bitmap. In step 707, it is checked whether the next loop must be executed. If another loop must be executed (result Y of step 707), bit stuffing is set to '0' in step 708, and procedure 70 returns to step 702. If the additional loop does not need to be executed (result N of step 707), bit stuffing procedure 70 terminates in exit step 709. CRC value calculation is performed after the bit stuffing procedure.
[0062] As previously discussed, in one or more embodiments, the DSPI module can support a combined serial interface (CSI) configuration, which allows interleaving of DSI data frames with SPI data frames from the transmit (TX) FIFO. Therefore, in Figure 8In one or more embodiments illustrated, the CAN FD optical master device 80 (e.g., a microcontroller) may include a DSPI module 81', which includes DSPI software 81' having DSI functionality 82 and SPI functionality 83. While DSI 82 operates to emulate the CAN FD optical protocol and transmits emulated CAN FD optical frames to the CAN FD optical network 85 via the CAN FD optical bus 84, SPI frames may be transmitted via the SPI bus 86 for different purposes, such as driving other devices, such as an external CAN module 87 with an SPI interface. This feature can be used to address (e.g., transmit) frames to another CAN network chain 88 (e.g., a CAN FD optical network or a standard CAN network), potentially expanding the network topology. According to another example, in one or more embodiments, this feature can be used to address (e.g., transmit) frames to Ethernet, such as 10 Mbps Ethernet.
[0063] Additionally or alternatively, the DSPI DSI Transmission Comparison Register (COMPRx) that transmits the DSI frame can be directly transmitted as an SPI frame (possibly using a DMA channel). Another device 89 (e.g., a microcontroller unit) can examine or manipulate this data to implement other security mechanisms, thereby providing additional ways to monitor, verify, and / or record the contents of frames transmitted by the master CAN FD optical device 80 via the DSPI module on the bus.
[0064] Figure 9 This is a flowchart example of a program 90 (e.g., a software program) implemented in one or more embodiments to simulate a CAN FD optical frame via a DSPI interface operating in CSI configuration.
[0065] like Figure 9As illustrated, program 90 begins in step 901 with the application running on the microcontroller. In step 902, the microcontroller (e.g., clock / PAD / IRQ) is set up. In step 903, the DSPI module is initialized. In step 904, the DSPI module is configured with CSI. In step 905, the clock and prescaler of the DSPI module are set according to the desired transmission bit rate. Concurrently, eDMA can be set in step 905'. In step 906, an error is checked. If an error is detected in step 906 (result Y in step 906), the program terminates (exits) in error state in step 907. If no error is detected in step 906 (result N in step 906), the user parameters defining the frame content are parsed in step 908. In step 909, the ID is checked. In step 910, the message buffer is retrieved. In step 911, an error is checked. If an error is detected in step 906 (result Y in step 906), the program terminates (exits) in error state in step 907. If an error is not detected in step 906 (result N in step 906), the user parameters defining the frame content are parsed in step 908. In step 909, the ID is checked. In step 910, the message buffer is retrieved. In step 911, it is checked whether an error has occurred. If an error is detected in step 911 (result Y in step 911), the program terminates (exits) in error state in step 907. If an error is not detected in step 911 (result N in step 911), the DSI frame is based on the previously referenced... Figure 5 and 6 The discussed procedure 50 (without DMA) or procedure 50' (with DMA) is prepared and transmitted (step 912). After the DSI frame is prepared and transmitted, procedure 90 can proceed to step 913, where a custom SPI frame is prepared and transmitted (with or without DMA), or proceed to step 914, where the contents of the CMPRx register are transmitted via the SPI frame (with or without DMA). Procedure 90 terminates in exit step 915.
[0066] Therefore, one or more embodiments relate to using DSPI serialization mode in a microcontroller to support the implementation of automotive protocols. While the emulation of the CAN FD optical protocol has been illustrated in this specification, one or more embodiments can be applied to the emulation of other protocols, such as LIN, FlexRAY, and DSI3. The asynchronous DSI mode of the DSPI module can be used to generate frames for the CAN FD optical master. In the specific case of the CAN FD optical protocol, avoiding the use of the native CAN instance available in the microcontroller is a desirable feature; therefore, utilizing the DSPI module to emulate the CAN FD optical instance is advantageous (e.g., because the cost of the device is reduced). Additionally, using the DSPI module allows the use of eDMA, thereby increasing communication speeds, for example, up to 25 Mbps.
[0067] In one or more embodiments, a flexible data mode may not be supported, and its size may be limited to 64 bytes.
[0068] Therefore, one or more embodiments may provide one or more of the following advantages:
[0069] - A low-cost solution for implementing the fundamental features of communication devices in a microcontroller;
[0070] - Implement CAN FD optical bus without using a native CAN controller;
[0071] - Cost savings due to reuse of existing hardware (differential signal availability); and
[0072] - Communication speed is improved (e.g., up to 25 Mbps) due to the use of the DSPI module in DSI mode.
[0073] Without affecting the basic principles, details and embodiments may vary, even significantly, relative to what is described by example only, without departing from the scope of protection.
[0074] The scope of protection is determined by the appended claims.
[0075] While the invention has been described with reference to illustrative embodiments, this description is not intended to be construed as limiting. Various modifications and combinations of the illustrative embodiments, as well as other embodiments of the invention, will be apparent to those skilled in the art during the description. Therefore, the appended claims are intended to cover any such modifications or embodiments.
[0076] Table 1
[0077] LSB
[0078]
[0079] MSB
[0080]
Claims
1. A microcontroller, comprising: Processing unit; as well as Deserialization - Serial Peripheral Interface (DSPI) module, The Deserialization-to-Serial Peripheral Interface (DSPI) module can be coupled to a communication bus configured to operate according to a selected communication protocol. The processing unit is configured as follows: Read user data intended to be included in outgoing frames encoded according to the selected communication protocol; Based on the user data, calculate the Cyclic Redundancy Check (CRC) value intended to be included in the outgoing frame; The outgoing frame is formed by including the user data and the calculated cyclic redundancy check (CRC) value in the outgoing frame. Based on the outgoing frame, generate a deserialized-serialized peripheral interface (DSPI) frame encoded according to the selected communication protocol; as well as The data register of the DSPI module is programmed using the DSPI frame, and... The Deserialization-Serialization Peripheral Interface (DSPI) module is configured to transmit the DSPI frames via the communication bus.
2. The microcontroller of claim 1, wherein the processing unit is configured to apply bit-stuffing processing to the deserialized-serial peripheral interface (DSPI) frame encoded according to a selected communication protocol.
3. The microcontroller of claim 1, wherein the Deserialization-Serialization Peripheral Interface (DSPI) module includes a pair of differential output pins, the differential output pins being coupled to the communication bus and configured to drive the communication bus via differential Deserialization-Serialization Peripheral Interface (DSPI) signals.
4. The microcontroller of claim 1, wherein the Deserialization-to-Serial Peripheral Interface (DSPI) module can be coupled to a transceiver circuit and is configured to provide an output DSPI signal to the transceiver circuit, the output DSPI signal indicating a DSPI frame encoded according to a selected communication protocol.
5. The microcontroller of claim 1, further comprising an enhanced direct memory access engine, wherein the enhanced direct memory access engine is configured to read the user data.
6. The microcontroller of claim 1, further comprising an enhanced direct memory access engine, wherein the enhanced direct memory access engine is configured to program the data register of the deserialized-serialized peripheral interface (DSPI) module using the deserialized-serialized peripheral interface (DSPI) frame.
7. The microcontroller of claim 1 further includes an enhanced direct memory access engine, wherein the enhanced direct memory access engine is configured to read the user data and program the data register of the deserialized-serialized peripheral interface (DSPI) module using the deserialized-serialized peripheral interface (DSPI) frame.
8. The microcontroller of claim 1, wherein the Deserialization-to-Serial Peripheral Interface (DSPI) module is configured to operate in Deserialization-to-Serial configuration mode.
9. The microcontroller of claim 1, wherein the Deserialization-Serial Peripheral Interface (DSPI) module is configured to operate in combination with a serial interface configuration, and wherein the DSPI module is configured to transmit frames in the Serial Peripheral Interface (SPI) format interleaved with the DSPI frames transmitted via the communication bus.
10. The microcontroller of claim 9, wherein the frame according to the Serial Peripheral Interface (SPI) format includes the deserialized Serial Peripheral Interface (DSPI) frame programmed into the data register of the deserialized Serial Peripheral Interface (DSPI) module.
11. The microcontroller of claim 1, wherein the selected communication protocol is the Controller Area Network (CAN) protocol.
12. The microcontroller of claim 11, wherein the controller area network CAN protocol is a CAN FD optical protocol, a LIN protocol, a FlexRAY protocol, or a DSI3 protocol.
13. A method for operating a microcontroller including a processing unit and a Deserialization-Serialization (DSPI) peripheral interface module, the method comprising: The processing unit reads user data intended to be included in outgoing frames encoded according to the selected communication protocol; The processing unit calculates a Cyclic Redundancy Check (CRC) value intended to be included in the outgoing frame based on the user data. The processing unit constructs the outgoing frame by including the user data and the calculated cyclic redundancy check (CRC) value into the outgoing frame. The processing unit generates a Deserialized-Serial Peripheral Interface (DSPI) frame encoded according to the selected communication protocol based on the outgoing frame. The processing unit programs the data register of the DSPI module using the DSPI frame. as well as The Deserialization-Serialization Peripheral Interface (DSPI) module transmits the DSPI frames via the communication bus.
14. The method of claim 13, further comprising: The processing unit applies bit stuffing to the deserialized-serialized peripheral interface (DSPI) frame encoded according to the selected communication protocol.
15. The method of claim 13, further comprising: The communication bus is driven by the Deserialization-Serialization Peripheral Interface (DSPI) module via differential DSPI signals.
16. The method of claim 13, further comprising: The user data is read from the data register of the DSPI module by the enhanced direct memory access engine; as well as The enhanced direct memory access engine programs the data register of the deserialized-serialized peripheral interface (DSPI) module using the deserialized-serialized peripheral interface (DSPI) frame.
17. The method of claim 13, further comprising: The Deserialization-Serial Peripheral Interface (DSPI) module sends frames in the Serial Peripheral Interface (SPI) format, interleaved with the DSPI frames transmitted via the communication bus.
18. The method of claim 13, wherein the frame according to the Serial Peripheral Interface (SPI) format includes the deserialized Serial Peripheral Interface (DSPI) frame programmed into the data register of the deserialized Serial Peripheral Interface (DSPI) module.
19. The method of claim 13, wherein the selected communication protocol is the Controller Area Network (CAN) protocol.
20. The method of claim 19, wherein the controller area network CAN protocol is a CAN FD optical protocol, a LIN protocol, a FlexRAY protocol, or a DSI3 protocol.
Citation Information
Patent Citations
Apparatus, method and system to exchange error information in a unified protocol communication
CN105703883A
Electronic system, corresponding method of operation and electronic device
CN112925738A
