Processing systems, related integrated circuits, systems, and methods
By introducing clock management and baud rate detection circuits into the UART communication interface, the clock signal frequency is automatically adjusted, solving the problem of unstable baud rate in UART communication in long cables or hazardous environments, and improving the reliability and stability of data transmission.
Patent Information
- Application Number
- CN202310195843.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2022-03-03
- Filing Date
- 2023-03-03
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2043-03-03
AI Technical Summary
Existing UART communication is not robust in baud rate adjustment in long cables or hazardous environments, resulting in unreliable data transmission, especially during firmware updates.
By introducing clock management circuitry and baud rate detection circuitry into the UART communication interface, the clock signal frequencies of the transmitting and receiving circuits are automatically adjusted to ensure robust data transmission.
It enables automatic baud rate adjustment for UART communication in different environments, improving the reliability and stability of data transmission, especially ensuring correct data transmission during firmware updates.
Smart Images

Figure CN117251398B_ABST
Abstract
Description
[0001] Cross-references to related applications
[0002] This application claims priority to Italian Patent Application No. 102022000004055, filed on March 3, 2022, the contents of which are incorporated herein by reference in their entirety to the fullest extent permitted by law. Technical Field
[0003] Embodiments of this disclosure relate to microcontrollers including a Universal Asynchronous Receiver-Transmitter (UART). Background Technology
[0004] Figure 1 A block diagram of a digital processing system 10, particularly a microcontroller, is shown.
[0005] In the considered example, the processing system 10 includes a microprocessor (MP) 102, typically a central processing unit (CPU) programmed via software instructions. Typically, the software executed by the microprocessor 102 is stored in non-volatile program memory (Mem) 104, such as flash memory or EEPROM. Therefore, memory 104 is configured to store the firmware of the processing unit 102, which includes software instructions to be executed by the microprocessor 102. Typically, non-volatile memory 104 can also be used to store other data, such as configuration data, such as calibration data. The microprocessor 102 typically also has an associated volatile memory (Vmem) 104b, such as random access memory (RAM). For example, memory 104b can be used to store temporary data. Figure 2 As shown, communication with the memories 104 and / or 104b is typically performed via one or more memory controllers (MCs) 100. The memory controllers 100 may be integrated into the microprocessor 102 or connected to the microprocessor 102 via a communication channel (e.g., the system bus of the processing system 10). For example, the system bus may include one or more bus systems and / or a network-on-chip (NoC) based on an Advanced Scalable Interface (AXI) bus architecture. Similarly, the memories 104 and / or 104b may be integrated with the microprocessor 102 in a single integrated circuit, or the memories 104 and / or 104b may be in the form of separate integrated circuits and connected to the microprocessor 102, for example, via traces on a printed circuit board.
[0006] In the example under consideration, microprocessor 102 may have one or more associated (hardware) resources / peripherals 106 selected from the following group:
[0007] - One or more communication interfaces, configured to exchange data, for example, via communication system 20, such as Universal Asynchronous Receiver / Transmitter (UART), Serial Peripheral Interface Bus (SPI), or Internal Integrated Circuit (I2C). 2 C) Controller Area Network (CAN) bus, and / or Ethernet interface, and / or debug interface; and / or
[0008] - One or more analog-to-digital converters (AD) and / or digital-to-analog converters (DA); and / or
[0009] - One or more dedicated digital components (DCs), such as hardware timers and / or counters, or cryptographic coprocessors; and / or
[0010] - One or more analog components AC, such as comparators, sensors, such as temperature sensors, etc.; and / or
[0011] - One or more mixed signal component MSCs, such as PWM (Pulse Width Modulation) drivers.
[0012] For example, for this purpose, the system bus may actually include the Advanced Microcontroller Bus Architecture (AMBA) High Performance Bus (AHB) and the Advanced Peripheral Bus (APB) for connecting the resource / peripheral device 106 to the AMBA AHB bus.
[0013] Therefore, the digital processing system 10 can support different functions. For example, the behavior of the microprocessor 102 is determined by the firmware stored in the memory 104, such as by the software instructions executed by the microprocessor 102 of the microcontroller 10. Thus, by installing different firmware, the same hardware (microcontroller) can be used for different applications.
[0014] Various solutions for updating firmware stored in program memory 104 are known. For example, U.S. Patent Application No. US20200319876 A1 may be cited herein, which is incorporated herein by reference for this purpose.
[0015] For example, such as Figure 2 As shown, processing system 10 can receive new firmware from, for example, a removable program / diagnostic tool (T) 30 and / or another processing system (PS) 40 used in a service center. Typically, program / diagnostic tool 30 and / or processing system 40 can be connected to the processing system 10 to be updated in any suitable manner, such as communication system 20.
[0016] For example, processing system 40 can be configured to exchange data with one or more remote servers (RS) 50 via one or more wireless communication modules (WCMs) 402. For example, such processing system 40 is typically used to provide status and / or diagnostic information to server 50. Therefore, processing system 40 can also receive new firmware for a given processing system 10 from remote server 50 via communication interface 402. For example, communication interface 402 and remote server 50 can exchange data via the Internet.
[0017] For example, Figure 3 An example of the firmware update process is shown.
[0018] For example, once a product containing processing system 10 has been delivered, an update process can be activated. The update process can be handled by dedicated hardware resources of the processing system and / or by appropriate programming of processing unit 102. For example, processing unit 102 can also be shut down during the update process while dedicated hardware resources are used. Instead, when processing unit 102 is used, it executes a given firmware that also contains update functionality. Typically, this firmware can be directly the legacy firmware of processing system 10, i.e., the legacy firmware contains instructions for implementing the update process. Optionally or additionally, the update functionality can be implemented in a separate firmware image, such as separate system firmware. For example, upon receiving an update request, processing system 10 can activate such a separate firmware image to process the update request.
[0019] After step 1000 begins, the processing system 10 receives the new firmware via the communication interface of the processing system 10 in step 1002, and stores the received firmware in the program memory 104 of the processing system in step 1006.
[0020] For example, program memory 104 is typically divided into multiple updatable firmware memory regions, such as two memory regions, where, in step 1006, a corresponding firmware image can be stored in each updatable firmware memory region. For example, older firmware (currently used by processing system 10) can therefore be stored in the first memory region, and processing system 10 is configured to store new firmware received in the second memory region, i.e., without overwriting the older firmware.
[0021] Typically, before or after storing the firmware in memory 104, processing system 10 can verify the received firmware in step 1004. For example, processing system 10 can receive an encrypted version of the firmware. In this case, processing system 10 can verify the firmware by verifying whether (at least a portion of) the received firmware can be decrypted. Furthermore, when an encrypted version of the firmware is sent, processing system 10 can store either a decrypted or encrypted version in memory 104. For example, an encrypted version can be stored when the memory controller 100 of memory 104 also supports real-time decryption of firmware read from program memory 104.
[0022] In cases where processing system 10 supports multiple firmware memory regions, once the firmware has been stored in program memory 104 and optionally verified and / or acknowledged, processing system 10 can store firmware identification data in non-volatile memory in step 1008 to indicate which updatable firmware image should be used. Typically, this memory can be any non-volatile memory of processing system 10, including program memory 104 or another non-volatile memory. Therefore, in response to an event (e.g., reset), in step 1010, processing system 10 can read the firmware identification data, determine which updatable firmware image should be used, and execute the corresponding firmware image.
[0023] Finally, the update process terminates at the stop point in step 1012.
[0024] For example, in many processing systems 10, the firmware of the processing system 10 can be updated via a debug interface such as the JTAG (Joint Test Action Group) interface, which can be used, for example, to write data directly to the non-volatile memory 104.
[0025] Typically, communication system 20 is also based on UART communication. For example, in this case, processing system 10 may include a UART communication interface, and microprocessor 102 or dedicated hardware circuitry may be configured to receive firmware via the UART communication interface. For example, these are also known UART-JTAG converter circuits configured to convert communication exchanged via UART into communication for connecting to a JTAG interface. Typically, such UART-JTAG converter circuitry may be directly integrated within the integrated circuit of processing system 10, or integrated within a separate integrated circuit, which is connected to the JTAG interface of processing system 10, for example, via traces on the integrated circuit board.
[0026] Typically, UART uses two independent signals: a transmit signal TX and a receive signal RX. That is, the UART interface is configured to generate a transmit signal TX and receive a receive signal. Therefore, two UART interfaces can exchange data by connecting the transmit signal TX of the first UART interface to the receive signal RX of the second UART interface. Similarly, the transmit signal TX of the second UART interface can be connected to the receive signal RX of the first UART interface. Those skilled in the art will understand that UART can also be used in combination with additional transceivers such as RS-232 (Recommended Standard 232) transceivers, which can also allow for the implementation of bus systems, for example, by using RS-485 (Recommended Standard 485) (also known as TIA-485(-A) or EIA-485) transceivers.
[0027] Because UART is a serial asynchronous transmission protocol, both the transmitter circuitry (e.g., circuit 30 or 40) and the receiver circuitry (e.g., circuit 10) exchange UART frames using a given transmission rate. Specifically, a typical UART interface is configured to transmit and receive fixed-length UART frames that consist of only a few data bits, such as 1 byte (8 bits) or 2 bytes (16 bits). A typical UART frame also includes: - an initial start bit, set to "0" (low) to indicate the start of the UART frame; - one or more final stop bits, set to "1" (high) to indicate the end of the UART frame; and optionally, one or more parity bits between the data bits and the stop bits.
[0028] For example, the descriptor for operating mode 8N1 indicates that eight data bits (8), no parity (N), and one (1) stop bit are sent or received. Therefore, UART frames have a fixed length of bits, for example, 10 bits (including the start bit) for format 8N1.
[0029] Communication via this UART interface is typically low-speed. For example, commonly supported baud rates are 9600, 14400, 19200, 38400, and 57600 bits per second. This is particularly true when long cables are used for UART communication between system 10 and the detachable programming tool 30 or system 40, as such cables are affected by parasitic capacitance and inductance. For example, the UART interface can be configured to use a fixed or predetermined baud rate. However, in this case, the transmission speed is often not optimized for the current application scenario, for example, because a higher baud rate can be used when the cable is shorter. Therefore, solutions have been proposed, for example, in the context of modems, that allow, for example, negotiation of the baud rate between the transmitting and receiving UART interfaces by determining, for example, the maximum baud rate that still allows reliable data transmission. However, especially in cases of long cables and hazardous environments, parasitic capacitance and inductance can change, meaning that the initial conditions may no longer be valid. Therefore, in such cases, data may not be transmitted reliably, which can be particularly critical, for example, during firmware update processes.
[0030] In view of the above, there is a need in the art to provide a more robust solution for adjusting the baud rate used to transmit data between a UART transmitter and a UART receiver. Summary of the Invention
[0031] One or more embodiments relate to processing systems. Embodiments also relate to related integrated circuits, systems, and methods.
[0032] As previously described, various embodiments of this disclosure relate to a processing system capable of automatically adjusting the baud rate of UART communication. Specifically, the processing system includes a transmitting terminal configured to provide a transmit signal, a receiving terminal configured to receive a receive signal, and a UART communication interface. In various embodiments, the UART communication interface includes clock management circuitry configured to receive a clock signal and generate a reduced clock signal according to a clock scaling factor. The transmitting circuitry of the UART communication interface is configured to sequentially transmit a given number of bits stored in the transmit data register of the UART communication interface in response to the reduced clock signal and via the transmit signal. Similarly, the receiving circuitry is configured to sequentially receive a given number of bits in response to the reduced clock signal and via the receive signal, and store the received bits in the receive data register of the UART communication interface.
[0033] In various embodiments, the processing system further includes a baud rate detection circuit. Specifically, in various embodiments, the baud rate detection circuit includes another clock management circuit, an edge detector, a digital counter circuit, a verification circuit, and a register.
[0034] Specifically, another clock management circuit is configured to receive a clock signal and generate another clock signal. An edge detector is configured to generate a first control signal indicating the rising and falling edges in the received signal. A digital counter circuit is configured to monitor the first control signal and, in response to determining that the first control signal signals an edge in the received signal, reset the count value. Conversely, in response to determining that the first control signal does not signal an edge in the received signal, the digital counter increments the count value.
[0035] In various embodiments, the verification circuit is configured to monitor a first control signal and a count value. In response to determining that the first control signal signals an edge in the received signal, and when the count value is less than a maximum value, the verification circuit asserts a second control signal. Conversely, in response to determining that the first control signal does not signal an edge in the received signal, or when the count value is equal to or greater than a maximum value, the verification circuit cancels the assertion of the second control signal.
[0036] Specifically, the register is configured to provide a threshold signal by storing a count value when the second control signal is asserted, wherein the clock scaling factor is derived from the threshold signal.
[0037] For example, in various embodiments, the clock management circuitry includes a first reduction circuit configured to generate a reduced clock signal via a first counter, the first counter being configured to increment a first count value in response to the clock signal until the first count value reaches a first threshold. In this case, the first threshold may correspond to a threshold signal stored in a register.
[0038] Conversely, in other embodiments, the first reduction circuit is configured to generate a prescaled clock signal, and the clock management circuit further includes a second reduction circuit configured to receive the prescaled clock signal and generate a reduced clock signal according to a second clock scaling factor. In this case, a first threshold of the first reduction circuit can be derived from a threshold signal, or another clock management circuit may include a third reduction circuit configured to receive the clock signal and generate another clock signal according to the second clock scaling factor.
[0039] Therefore, in various embodiments, the baud rate of the UART communication interface, in particular the frequency of the reduced clock signal used by the transmitting and receiving circuits, is determined via a threshold signal stored in a register, which is updated when the time between two consecutive edges of the received signal is verified by a verification circuit.
[0040] As will be described in more detail below, in various embodiments, the maximum value (indicating the minimum allowed baud rate) can be selected within a range between the nominal count value and twice the nominal count value, or it can correspond to twice the nominal count value. In various embodiments, the nominal count value can be fixed or predetermined, or the nominal count value can correspond to a threshold signal, i.e., the baud rate detection circuit can adjust the maximum value based on a threshold signal stored in a register.
[0041] In various embodiments, the verification circuit can also be configured to assert the second control signal only if the count value is also greater than the minimum value (indicating the maximum permissible baud rate). As will be described in more detail below, in various embodiments, the minimum value can be selected within a range between the nominal count value and half of the nominal count value, or can correspond to half of the nominal count value. Therefore, also in this case, when the nominal count value corresponds to a threshold signal, the baud rate detection circuit can be configured to adjust the minimum value according to the threshold signal.
[0042] For example, as described above, the UART communication interface can be used to receive data including firmware updates for a microcontroller. In this case, the processing system therefore also includes a microprocessor configured to execute software instructions, non-volatile memory configured to store the software instructions, and a debug interface, such as a JTAG interface, configured to analyze the contents of a receive data register to determine one or more debug command packets for writing new software instructions to the non-volatile memory. Preferably, the debug interface is configured to store a corresponding debug response packet in a transmit data register in response to each debug command packet, thereby also signaling the correct reception of the debug command packet.
[0043] Therefore, in various embodiments, the UART transmitter circuitry can be configured to sequentially transmit data (e.g., including firmware) to the processing system via a receive signal according to a given baud rate, whereby, when data is received, the UART communication interface of the processing system automatically sets the frequency of a reduced clock signal used by the transmitting and receiving circuits. Furthermore, the UART transmitter circuitry can be configured to change the baud rate during data transmission, for example, by reducing the baud rate when the UART transmitter circuitry does not receive a response packet from the processing system. Attached Figure Description
[0044] Embodiments of this disclosure will now be described with reference to the accompanying drawings, which are provided purely by way of non-limiting example, in which:
[0045] Figure 1 An example of a processing system is shown;
[0046] Figure 2 It shows how to update Figure 1 An example of a system that processes the firmware of a system;
[0047] Figure 3 It shows how to update Figure 1 Examples of methods for processing system firmware;
[0048] Figure 4 An embodiment of the processing system according to the present disclosure is shown;
[0049] Figure 5 , Figure 6 and Figure 7 It shows the use of Figure 4 The UART interface of the processing system embodiment; and
[0050] Figure 8 It shows the use of Figure 5 , Figure 6 and Figure 7 An example of a baud rate detection circuit for a UART interface. Detailed Implementation
[0051] In the following description, numerous specific details are set forth to provide a thorough understanding of the embodiments. The embodiments may be implemented without one or more of these specific details, or with other methods, components, materials, etc. In other instances, well-known structures, materials, or operations have not been shown or described in detail to avoid obscuring various aspects of the embodiments.
[0052] In this specification, references to "an embodiment" or "an embodiment" mean that a particular feature, structure, or characteristic described in connection with that embodiment is included in at least one embodiment. Therefore, the appearance of the phrase "in one embodiment" or "in an embodiment" in various places throughout this specification does not necessarily refer to the same embodiment. Furthermore, in one or more embodiments, a particular feature, structure, or characteristic may be combined in any suitable manner.
[0053] The headings provided herein are for convenience only and do not define the scope or meaning of the embodiments.
[0054] In the following Figures 4 to 8 In the middle, it has been referenced Figures 1 to 3 The parts, elements or components described are indicated by the same reference numerals previously used in the figures; in order not to burden this detailed description, the description of such previously described elements will not be repeated below.
[0055] Figure 4 An embodiment of the processing system 10a according to the present description is shown.
[0056] Specifically, in the considered embodiment, the processing system 10a includes at least one processing core 102a connected to the (on-chip) communication system 114, for example, n processing cores (MPs) 102a1, ..., 102an. For example, in the context of a real-time control system, the processing cores 102a1, ..., 102an may be ARM. Core. Typically, the communication system 114 may include, for example, one or more bus systems and / or a network-on-chip (NoC) based on an Advanced Scalable Interface (AXI) bus architecture.
[0057] For example, as illustrated by the example of processing core 102a1, each processing core 102a may include a microprocessor (m) 1020 and a communication interface (i) 1022, the communication interface (i) 1022 being configured to manage communication between the microprocessor 1020 and the communication system 114. In the considered embodiment, interface 1022 is a master interface configured to forward (read or write) requests from the microprocessor 1020 to the communication system 114 and to forward optional responses from the communication system 114 to the microprocessor 1020. In various embodiments, processing core 102a may also include a slave interface (si) 1024. For example, in this way, the first microprocessor 1020 may send a request to the second microprocessor 1020 (via the communication interface 1022 of the first microprocessor, the communication system 114, and the communication interface 1024 of the second microprocessor). For example, for this purpose, the communication system 114 may include an additional coprocessor bus in addition to the system bus or NoC, such as a microprocessor 1020 connecting the same processing core 102a or all processing cores 102a.
[0058] In various embodiments, each processing core 102a1, ..., 102an may also include additional local resources, such as one or more local memories 1026, typically identified as tightly coupled memory (TCM).
[0059] As previously described, processing cores 102a1, ..., 102an are typically arranged to exchange data with non-volatile memory 104 and / or volatile memory 104b. In various embodiments, these memories are system memories, i.e., shared by processing cores 102a1, ..., 102an. For example, in various embodiments, processing system 10a includes one or more memory controllers 100 configured to connect at least one non-volatile memory 104 and at least one volatile memory 104b to communication system 114. As previously described, one or more of the memories 104 and / or 104b may be integrated into integrated circuit 30a including processing core 102a, or may be externally connected to integrated circuit 30a. For example, non-volatile memory 104 may be used to store firmware for one or more microprocessors 1020.
[0060] As previously described, processing system 10a may include one or more resources 106, such as one or more communication interfaces or coprocessors (e.g., cryptographic coprocessors). Specifically, in the considered embodiment, processing system 10a includes a UART communication interface 50, which is preferably connected to communication system 114 via a slave communication interface 504, such as a peripheral bridge.
[0061] In the considered embodiment, the UART communication interface 50 includes hardware transmit and receive interface circuitry 506 configured to interface the UART communication channel by generating transmit signals TX and receive signals RX. For communication management, the UART communication interface 50 may further include one or more transmit data registers DATATX for storing data to be transmitted, one or more control registers CTRL for storing control data, and one or more receive data registers DATARX for storing data already received. In various embodiments, the same registers may be used as the transmit data register DATATX and the receive data register DATARX.
[0062] Therefore, interface 504 can be used to interface these registers with communication system 114. For example, processing core 102a can be configured to send one or more of the following requests to slave interface 504 of communication interface 50 via communication system 114:
[0063] - Write request to write data to the transmit data register DATATX;
[0064] - Write request to write data to the control register CTRL, for example, to configure communication interface 50 and / or to start data transfer operation; and
[0065] - Read request to read data from the receive data register DATARX.
[0066] For example, for this purpose, each of the registers DATATX, DATARX, and CTRL may have a corresponding physical address (PA) of the associated communication system 114, and each read or write request may include a given target address. For example, as previously described, the communication system 114 may include an Advanced Microcontroller Bus Architecture (AMBA) High Performance Bus (AHB) and an Advanced Peripheral Bus (APB) for connecting the communication interface 50 to the AMBA AHB bus.
[0067] Typically, the UART interface 50 may also include a master interface 502, which is often identified as an integrated direct memory access (DMA) controller. For example, such a master interface 502 may be useful when the UART interface 50 must initiate communication to exchange data with another circuitry (e.g., memory 104 / 104b, resource 106, or processing core 102) connected to the communication system 114 via (read and / or write) requests. For instance, in this way, the master interface / DMA controller 502 may be configured to generate write requests to store data received via the receive signal RX into non-volatile memory 104, thereby storing new firmware into program memory 104.
[0068] Figure 4 An optional debug interface 60, such as a JTAG interface, is also shown. Such a debug interface 60 can be configured to read data from or write data to one or more registers or memory locations of the processing system 10a. For this purpose, the debug interface 60 may include a master interface 602 configured to send read or write requests to the communication system 114 and / or an additional dedicated debug communication system. Optionally, the debug interface 60 may also include a slave interface 604, which can be used, for example, to program / configure whether access to one or more registers and / or memory locations via the debug interface 60 is allowed or denied.
[0069] Therefore, in various embodiments, the UART interface 50 can be configured to exchange data with the debug interface 60 instead of sending data directly to the memory 104, which in turn can be configured to store data in the non-volatile memory 104. For example, such an arrangement is generally preferred because, in this way, the debug interface 60 can manage different debug commands and / or can implement access protection that does not allow the UART interface to directly store data in the memory 104, but the debug interface 60 can update firmware, for example, when protection is disabled, or when protection is enabled and a given command is provided to unlock the protection, for example, by providing a password via a debug command received through the UART interface 50.
[0070] For example, such a UART / JTAG interface is disclosed in Italian Patent Application No. 102021000008840, which is incorporated herein by reference for this purpose.
[0071] For example, in various embodiments, debug interface 60 is configured to receive debug command packets and optionally receive one or more debug data packets.
[0072] For example, in various embodiments, the debug data packet has a dimension corresponding to the word size of the processing system 10a, such as 1, 2, 4 or 8 bytes, for example, 4 bytes in the case of the 32-bit microprocessor 1020.
[0073] Conversely, debug command packets typically have multiple bytes, such as 2, 4, or 8 bytes, to indicate debug commands. For example, a debug command packet might indicate a read request or a write request, with one or more subsequent debug packets containing the corresponding data. Typically, the data for a write request can also be included directly in the debug command packet, thus allowing the debug command packet to have a variable size.
[0074] In various embodiments, the debug interface 60 can therefore also be configured to provide debug (response) data packets to the UART interface 50 for transmission via the transmit signal TX.
[0075] In various embodiments, the debug interface 60 can also generate debug response packets. For example, a debug response packet can be sent in response to each debug command packet to provide a corresponding status response, such as indicating whether the data included in the write request has been stored at the appropriate address. For example, the debug response packet may be 1 or 2 bytes. Typically, the data for the read request can also be directly included in the debug response packet, so the debug response packet can have a variable size.
[0076] In various embodiments, debug command packets, debug data packets, and debug response packets are exchanged with UART communication interface 50, for example, by reading data from the aforementioned register DATARX and writing data to the aforementioned register DATATX. Typically, data exchange between UART interface 50 and debug interface 60 can be implemented in any suitable manner, such as via a direct connection, master interface 502, and / or master interface 602.
[0077] In various embodiments, the UART interface is thus configured to exchange corresponding data with the communication channel 20 via UART frames, for example, by transmitting debug response packets or optional debug data packets by sending one or more UART frames via a transmit signal TX, and / or by receiving debug command packets or optional debug data packets by receiving one or more UART frames via a receive signal RX. For example, in various embodiments, each UART frame has 8 data bits, for example, by using frame format 8N1. For example, in various embodiments, by using a debug command with 16 bits and a UART frame with 8 data bits, each debug command packet will be received via two consecutive UART frames. Conversely, by using an 8-bit debug response packet, each debug command packet will be transmitted via a single UART frame.
[0078] Typically, this processing system 10a also includes one or more general-purpose direct memory access (DMA) controllers 110. Typically, the general-purpose DMA controller 110 may include at least one functional channel connected to a resource 106 such as a UART interface 50 and / or a debug interface 60. Typically, the resource 106 associated with a given channel can also be selected based on configuration data. Specifically, the channel is a read or write channel (which may also be programmable) and typically has associated configuration data indicating the range of memory address from which the DMA controller 110 should read data or the range of memory address from which the DMA controller 110 should write data. For example, in this way, the resource 106 may be connected to the DMA controller 110 via two channels:
[0079] - A read channel is configured to autonomously read data from a first memory range and provide the read data to resource 106 (e.g., to send corresponding data); and
[0080] - Write channel, configured to receive data (e.g., already received data) from resource 106 and autonomously write this data to a second memory range.
[0081] Therefore, the general-purpose DMA controller 110 typically has a main interface 1102 for sending read or write requests to the memory controller 100. Typically, for this purpose, the main interface 1102 can be directly connected to the memory controller 110 via a dedicated DMA channel, or the main interface 1102 can send requests to the communication system 114. For example, in the latter case, read and write requests can include any address managed by the communication system 114. Similarly, instead of directly interfaced with the resource 106 via a dedicated channel, the general-purpose DMA controller 110 can also be configured to exchange data with the resource 106 via the communication system 114. For example, in this case, the DMA controller 110 can be configured to first send a read request including a first address via the main interface 1102, and then send a write request including a second address.
[0082] Therefore, in various embodiments, a general-purpose DMA controller 110 can be used instead of the master interfaces 502 and / or 602. Furthermore, the general-purpose DMA controller 110 typically also includes a slave interface 1104 for receiving configuration data for configuring the DMA controller 110.
[0083] Figure 5 An embodiment of the hardware serial communication interface 506 of the UART interface 50 is shown.
[0084] Specifically, in the considered embodiment, the hardware communication interface 506 includes two shift registers 5060 and 5062. Specifically, in the considered embodiment, shift register 5060 is used to store data to be transmitted. Therefore, once data transmission is requested, the hardware communication interface 506 can, for example, transfer the contents of the transmit data register DATATX to shift register 5060 using the parallel data input PDI of shift register 5060. For this purpose, the transmit data register DATATX and shift register 5060 preferably have the same dimensions and are configured to store the data bits and optional parity bits of a UART frame (e.g., 1 byte). Typically, the UART frame stored in the transmit data register DATATX may or may not include the start bit of the UART frame. For example, in this case, the first bit of shift register 5060 can be set to "0", while the other bits of shift register 5060 are mapped to the corresponding bits of the transmit data register DATATX. Similarly, the transmit data register DATATX may or may not include one or more stop bits of the UART frame. Furthermore, in various embodiments, the data register DATATX and shift register 5060 can be implemented using the same shift register, which can be written to, for example, from interface 504 and / or DMA channels (circuit 502, 602 and / or 110).
[0085] In various embodiments, shift register 5060 is configured to sequentially send bits stored in shift register 5060 according to clock signal CLK2 and transmit enable signal TX_EN. Specifically, in the considered embodiments, hardware communication interface 506 further includes clock management circuitry (CM) 5064, which is configured to generate clock signal CLK2 for hardware communication interface 506 in response to system clock signal CLK of processing system 10a.
[0086] For example, such as Figure 6 As shown, in various embodiments, the clock management circuitry may include a clock prescaler (PSC) 5078, which is configured to generate a prescaled clock signal CLK having a frequency reduced relative to the frequency of the clock signal CLK. PRE The scaling factor can be programmable based on configuration data stored in the control register CTRL. For example, the prescaling circuit 5078 can be implemented using a counter configured to increment a count value in response to a clock signal CLK, wherein the counter changes the clock signal CLK when the count value reaches a threshold BAUD_THR. PRE The logic level, where the threshold BAUD_THR is determined based on the configuration data provided by the control register CTRL.
[0087] In various embodiments, the prescaled clock signal CLK PRE It is then provided to another optional reduction circuit (DSC) 5080, which is configured to generate a signal with respect to the clock signal CLK. PRE The frequency of the scaling factor is reduced to the frequency of the clock signal CLK2, where the scaling factor can be fixed or programmable based on configuration data stored in the control register CTRL. For example, the scaling circuit 5080 can be implemented using a counter configured to respond to the clock signal CLK. PRE The counter increments its count value, and when the count value reaches a threshold, the counter changes its clock signal CLK. PRE The logic level, wherein the threshold is optionally determined based on configuration data provided by the configuration register CTRL.
[0088] like Figure 5 As shown, in various embodiments, the operation of the reduction circuit 5080 changes in response to the synchronization signal SYNC; however, the synchronization signal SYNC is only used when receiving data and will be described herein.
[0089] Therefore, when sending data, clock signal CLK2 corresponds to a reduced version of clock signal CLK (based on the threshold BAUD_THR).
[0090] As previously described, shift register 5060 also receives an enable signal TX_EN, which enables data transmission operations. Specifically, in the considered embodiment, shift register 5060 is configured to sequentially provide its contents at the serial data output SDO when the enable signal TX_EN is asserted and in response to clock signal CLK2. Therefore, when the enable signal TX_EN is asserted, shift register 5060 sequentially provides bits of stored data to shift register 5060. In the considered embodiment, the enable signal TX_EN is generated by transmit control circuitry (TC) 5066, which is configured to determine whether a given number of requested bits have been transmitted. For example, the number of bits can be fixed or determined according to the UART frame format. For example, as previously described, for format 8N1, the number of bits can correspond to 10. However, in various embodiments, the transmit control circuit 5066 may also be configured to determine the number of request bits to be transmitted based on configuration data stored in the control register CTRL, which may, for example, indicate the number of parity bits and / or stop bits.
[0091] For example, in various embodiments, the transmit control circuit 5066 may include a counter that increments in response to a clock signal CLK2 to indicate the number of bits transmitted. Therefore, when a new data transmission operation begins, the counter can be reset to assert the enable signal TX_EN, and when the requested number of bits has been transmitted, the transmit control circuit 5066 de-asserts the enable signal TX_EN. For example, in this case, when the transmit control circuit 5066 de-asserts the enable signal TX_EN, the transmit control circuit can assert the control / interrupt signal TX_OK.
[0092] In various embodiments, the hardware communication interface 506 includes combinational logic 5070 configured to set the signal TX high when the enable signal TX_EN is deasserted. For example, when the enable signal TX_EN is set low when deasserted, the combinational logic 5070 can be implemented using a logic OR gate that receives the serial data output signal SDO from the shift register 5076 and an inverted version of the enable signal TX_EN at its inputs, and provides the signal TX at its output. The combinational logic 5070 is purely optional, as the serial data output signal SDO can also be set high when the enable signal TX_EN is deasserted, for example, because the stop bit is stored in register 5060.
[0093] Conversely, shift register 5062 is configured to store bits received via signal RX. Specifically, when no data transmission occurs, the receive signal RX is set high. Once transmission begins by another device, a start bit is sent, thereby setting the receive signal RX low. Therefore, in various embodiments, hardware communication interface 506 includes receive control circuitry (RC) 5068. Specifically, receive control circuitry 5068 is configured to assert a receive enable signal RX_EN in response to a change in signal RX from high to low, such as in response to a falling edge of signal RX.
[0094] Similar to the transmit control circuit 5066, the receive control circuit 5068 may also use a counter that is reset in response to the detection of a start bit and increments in response to a clock signal CLK2, wherein the receive control circuit 5068 de-asserts the enable signal RX_EN when the requested number of bits has been received. In various embodiments, when the receive control circuit 5068 de-asserts the enable signal RX_EN, the receive control circuit may assert the control / interrupt signal RX_OK.
[0095] Therefore, in various embodiments, shift register 5062 is configured to sequentially add the logic level of the serial data input SDI applied to shift register 5062 to the data stored in shift register 5062 in response to clock signal CLK2, when enable signal RX_EN is asserted, wherein serial data input SDI is connected to receive signal RX. Typically, receive control circuitry 5068 may assert receive enable signal RX_EN using the start bit or only for the next bit, thereby storing or not storing the start bit in shift register 5062.
[0096] Furthermore, once a given number of bits are received, for example in response to the signal RX_OK, the hardware communication interface 506 transfers the contents of shift register 5062 to the receive data register DATARX, for example, using the parallel data output PDO of shift register 5062. For this purpose, the receive data register DATARX and shift register 5062 preferably have the same dimensions. Furthermore, in various embodiments, the data register DATARX and shift register 5062 can be implemented using the same shift register, which can be read, for example, from interface 504 and / or DMA channels (circuit 502, 602, and / or 110).
[0097] in this regard, Figure 7 The modified hardware communication interface 506 is shown, which includes only a single shift register 5076. Therefore, only the following demonstration will be based on... Figure 5 The differences.
[0098] Specifically, in the considered embodiment, shift register 5076 is configured to sequentially shift the contents of shift register 5076 in response to clock signal CLK2 when enable signal EN is asserted, wherein the first bit is provided through serial data output SDO of shift register 5076, and the second bit received through serial data input SDI of shift register 5076 is added to the contents of shift register 5076.
[0099] Therefore, in this case, the serial data output SDO can be connected to the transmit signal TX, or preferably to logic gate 5070. Conversely, the serial data input SDI can be connected to the receive signal RX via circuit 5082.
[0100] In various embodiments, the serial data input SDI can be connected to an additional logic gate 5072 that sets the signal RX' provided to the serial data input SDI high when the receive enable signal RX_EN is set low. For example, in various embodiments, logic gate 5072 is an OR gate that receives the receive signal RX and the receive enable signal RX_EN at its inputs in an inverted version. Typically, logic gate 5072 can also be used for... Figure 5 In the arrangement.
[0101] Specifically, in the considered embodiment, the enable signal EN of shift register 5076 is asserted when the transmit enable signal TX_EN or the receive enable signal RX_EN is asserted. For example, for this purpose, hardware communication interface 506 includes logic gate 5074, such as an OR gate, configured to generate the enable signal EN by combining the transmit enable signal TX_EN and the receive enable signal RX_EN.
[0102] Therefore, in the same case, a transmit frame (with or without a start bit) can be transmitted directly or indirectly to shift register 5076 via transmit data register DATATX, for example, using the parallel data input PDI of shift register 5076. Similarly, a receive frame (with or without a start bit) can be transmitted directly or indirectly from shift register 5076 via receive data register DATARX, for example, using the parallel data output PDO of shift register 5076.
[0103] Therefore, in the considered embodiments, data transmission occurs in response to clock signal CLK2, and the data is shifted out synchronously with clock CLK2. Conversely, data received via receive signal RX may have a phase and / or frequency deviation from clock CLK2. Essentially, the frequency deviation results in an accumulated phase shift; that is, the frequency deviation can be considered as a phase shift sequence. In various embodiments, to compensate for the phase shift, receive control circuitry 5068 may be configured to adjust the sampling point of the received data based on detected bit transitions. Specifically, in various embodiments, a synchronization signal SYNC is used for this purpose.
[0104] Specifically, in various embodiments, the receive control circuit 5068 is configured to assert the synchronization signal SYNC in response to detecting a change in the logic level of the receive signal RX, i.e., in response to a falling edge and / or rising edge of the signal RX. For example, for this purpose, the receive control circuit 5068 may respond to a clock signal CLK. PRE The received signal RX is sampled, and the synchronization signal SYNC is asserted when the current sample is set high and the previous sample is set low and / or when the current sample is set low and the previous sample is set high.
[0105] Such as about Figure 5 and Figure 6 As mentioned, the scaling circuit 5080 can be synchronized with the synchronization signal SYNC to generate an edge for sampling the received signal RX. For example, in various embodiments, the scaling circuit 5080 is implemented using a counter configured to increment a count value CNT and reset the count value CNT when a maximum count value is reached. Furthermore, to synchronize the count value CNT with the synchronization signal SYNC, the counter CNT can be reset in response to determining that the synchronization signal SYNC has been asserted.
[0106] Typically, instead of resetting the counter 5080, the logic level of the SYNC synchronization signal can be used to determine the counter's increment. For example, by default, the increment can be set to 1. Conversely, when the count value is set to 0 and the SYNC signal is asserted, the counter's increment can be set to 0, thus repeating phase "0" twice. Conversely, when the count value has its maximum value minus 1 (e.g., 3), and the SYNC signal is asserted, the counter's increment can be set to 2, thus indirectly resetting the counter.
[0107] like Figure 7 As shown, the clock signal CLK PRE(Or another clock signal) can also be used to perform oversampling on the received signal RX (or RX'). For example, in the considered embodiment, the hardware communication interface 506 includes an oversampling circuit 5082, for example, including a shift register with multiple bits, wherein the oversampling circuit 5082 stores multiple subsequent values of the received signal RX (or RX'), and then generates a signal for the serial data input SDI provided to register 5076 (or similarly register 5062) based on the stored values. For example, in various embodiments, the oversampling circuit 5082 stores an odd number of bits, such as three, and the signal provided to register 5076 for the serial data input SDI corresponds to the logic value of most of the bits.
[0108] Therefore, in the preceding embodiments, the data transmission rate is defined by a threshold / signal BAUD_THR, which specifies the threshold of the clock reduction circuit 5078. For example, by setting the value of the BAUD_THR signal, the UART interface can use a clock signal CLK2 with a frequency of 9600Hz.
[0109] As previously mentioned, in various embodiments, the two circuits connected via their respective UART interfaces are configured to determine an optimized baud rate.
[0110] Typically, solutions are known where the two UART transceivers automatically negotiate the baud rate. For example, the paper Chuck Farrow, Application Report “Automatic Baud Rate Detection on the MSP430”, Texas Instruments, SLAA 215, October 2004 (incorporated herein by reference), discloses a solution where the transmitter circuitry transmits one or more predetermined symbols at a given requested baud rate, and the microcontroller samples the received bits to determine the baud rate used to transmit the one or more symbols. Essentially, in this case, a given maximum baud rate MAX_BAUDRATE rate is supported, and the receiver circuitry uses that frequency to (over)sample the received symbols, where the received bit sequence indicates whether the symbol has been transmitted at a baud rate BAUDRATE corresponding to a fraction of the maximum baud rate MAX_BAUDRATE. For example, when the transmitter circuit transmits symbol 0x0d (plus an additional start bit) at the maximum supported baud rate MAX_BAUDRATE of 115,200 baud, the microcontroller can sample the receive signal RX at 115,200 Hz and select the following baud rates:
[0111] -115,200 baud, when the received bit sequence corresponds to 0x0d;
[0112] -57,600 baud, when the received bit sequence corresponds to 0xe6;
[0113] -38,400 baud, when the received bit sequence corresponds to 0x1c;
[0114] -19,200 baud, when the received bit sequence corresponds to xe0; or
[0115] -14,400 baud, when the received bit sequence corresponds to 0x80.
[0116] Several inconveniences have been observed with this solution for automatically negotiating baud rates via predetermined symbols (essentially representing predetermined synchronization preambles). First, only given predetermined and fixed baud rates are supported. Furthermore, the baud rate is only negotiated at the start of data transmission and then remains fixed. This means, for example, that communication may be lost in noisy environments, for instance, because the initial baud rate can no longer be maintained. Similarly, when noise levels decrease, the baud rate will not increase during communication, even if a higher baud rate could be used.
[0117] like Figure 4 As shown, in various embodiments, the UART interface 50 includes or at least has an associated baud rate detection circuit 70, which is configured to set the frequency of the clock signal CLK2 of the hardware transmit and receive interface circuit 506.
[0118] Figure 8 An embodiment of the baud rate detection circuit 70 is shown.
[0119] In the considered embodiment, the baud rate detection circuit 70 uses a clock signal CLK1 derived from the clock signal CLK. Typically, the clock signal CLK1 may correspond to the clock signal CLK or a frequency-scaled version of the clock signal CLK. For example, in various embodiments:
[0120] - When the reduction circuit 5064 of the UART interface 506 also uses the second clock scaling circuit 5080, the clock signal CLK1 is generated via the clock reduction circuit (DS) 710, which receives the clock signal CLK at its input and has the same scaling factor as the clock scaling circuit 5080; and
[0121] - When the reduction circuit 5064 of the UART interface 506 does not use the second clock scaling circuit 5080, the clock signal CLK1 corresponds to the clock signal CLK.
[0122] In the considered embodiment, the received signal RX is provided to the edge detector (ED) 700. Typically, this edge detector 700 may also correspond to the edge detector of the receive control circuit 5086. In this respect, the baud rate detection circuit 70 may also be implemented directly within the receive control circuit 5068.
[0123] Specifically, in the considered embodiment, edge detector 700 generates a signal TRIG, such as a trigger signal, which is used to transmit signals of the rising and falling edges in the received signal RX. For example, edge detector 700 may generate a pulse in trigger signal TRIG in response to detecting an edge in the received signal RX, for example, by asserting signal TRIG within the clock cycle of clock signal CLK1 (see also the corresponding description of the edge detector of receive control circuit 5068).
[0124] In the considered embodiment, the signal TRIG is provided to a digital counter circuit (DCC) 702. Specifically, the counter circuit 702 is configured to reset the count value CNT when the signal TRIG signals an edge in the received signal RX (e.g., when the signal TRIG is asserted), and to increment the count value CNT when the signal TRIG does not signal an edge in the received signal RX (e.g., when the signal TRIG is deasserted). As will be described in more detail below, the counter 702 may also use a maximum count value MAX_CNT; that is, the counter 702 is configured to increment the count value CNT until the maximum count value MAX_CNT is reached or the signal TRIG signals an edge in the received signal RX.
[0125] In the considered embodiment, the count value CNT and the signal TRIG are provided to the verification circuit 704. Specifically, the verification circuit (VC) 704 is configured to determine whether the count value CNT is within a given range. For example, in various embodiments, the verification circuit 704 may determine whether the count value CNT is less than a maximum count value, for example, corresponding to the previously mentioned value MAX_CNT. Typically, the verification circuit 704 may also determine whether the count value CNT is greater than a minimum count value MIN_CNT, where the value MIN_CNT is less than the value MAX_CNT.
[0126] Specifically, in response to determining that the count value CNT is within a given allowable range, such as being less than the maximum count value MAX_CNT, the verification circuit 704 asserts the control signal SEL. Conversely, in response to determining that the count value CNT is not within a given allowable range, such as being greater than the maximum count value MAX_CNT, the verification circuit 704 cancels the assertion of the control signal SEL.
[0127] In the considered embodiment, the control signal SEL is provided to register (Reg) 708, which is configured to provide the signal BIT_CNT in response to clock signal CLK1 (or also clock signal CLK) by storing the count value CNT when the control signal SEL is asserted. For example, for this purpose, the control signal SEL can be provided to a multiplexer 706 configured to receive the count value CNT and the signal BIT_CNT at its input, wherein when the control signal SEL is asserted, the multiplexer 706 provides the count value CNT at its output.
[0128] Therefore, in various embodiments, the baud rate detection circuit 70 is configured to generate a signal BIT_CNT that indicates the number of clock cycles of the clock signal CLK1 between two consecutive edges of the received signal RX.
[0129] Therefore, in the considered embodiments, the baud rate detection circuit 70 automatically adjusts the signal BIT_CNT based on the actual bit time. Thus, in various embodiments, the threshold BAUD_THR of the clock scaling circuit 5078 can be derived from the signal BIT_CNT. Specifically, by using a reduction circuit 710 (when used) with the same scaling factor as the reduction circuit 5080, the signal BIT_CNT can be directly used as the threshold BAUD_THR. However, if the reduction circuit 710 is omitted or has a different scaling factor than the reduction circuit 5080 (when used), the signal BIT_CNT can also be scaled to generate the threshold BAUD_THR.
[0130] Therefore, in various embodiments, register 708 may correspond to the individual bits of the control register CTRL of the UART interface 50 that provides the signal BAUD_THR. Optionally, flags in the control register CTRL may indicate whether the signal BAUD_THR should be provided by the control register CTRL or derived from the signal BIT_CNT.
[0131] In this respect, the baud rate detection circuit 70 is configured to update the signal BIT_CNT only when the number of clock cycles CNT between two consecutive edges (as verified by the verification circuit 704) is within a given allowable range, specifically less than the maximum value MAX_CNT and optionally greater than the minimum value MIN_CNT.
[0132] In particular, in various embodiments, a transmitter circuit such as circuit 30 or 40 is intended to transmit data at a given nominal baud rate NOM_BAUD, such as 19,200, corresponding to a given nominal count value NOM_CNT of counter 702 (based on the frequency of clock signal CLK1). For example, in this case, the bit time of a single bit is on the order of 52 us (microseconds). Thus, by using a clock signal CLK1 of frequency f equal to 2 MHz, the nominal count value NOM_CNT for a single bit will be 104 for a bit time of 52 us, i.e. NOM_COUNT=f / NOM_BAUD.
[0133] In this regard, verification circuit 704 allows verifying whether count value CNT indeed indicates the time of a single bit or of several bits having the same logic value. Indeed, the count value CNT is identical for the following bit sequences:
[0134] -"000011110000" sent at 38,400 bauds; and
[0135] -"001100" sent at 19,200 bauds; and
[0136] -"010" sent at 9,600 bauds.
[0137] Thus, in various embodiments, the verification circuit is configured to assert signal SEL only if the count value CNT is lower than a maximum value MAX_CNT set to MAX_CNT=NOM_COUNT x 2, i.e. the baud rate of the reception signal RX must be higher than a minimum baud rate corresponding to NOM_BOUD / 2, 9,600 bauds for example. This condition thus also filters the transmission of several bits having the same logic level.
[0138] On the contrary, the maximum baud rate may be defined by design and / or the verification circuit 704 may be configured to assert signal SEL only if the count value CNT is also higher than a minimum value MIN_CNT set to MIN_CNT=NOM_COUNT / 2, i.e. the baud rate of the reception signal must be lower than a maximum baud rate corresponding to NOM_BOUD x 2, 38,400 bauds for example.
[0139] Thus, in this case, the transmission circuit may vary the baud rate BAUD_RATE of signal RX in a range between the minimum baud rate and the maximum baud rate, i.e. NOM_BAUD / 2<BAUD_RATE<NOM_BAUD x 2. The baud rate BAUD_RATE may thus correspond to any allowed baud rate, and not only to standard baud rates.
[0140] Usually, such as Figure 8 As shown, the thresholds MAX_CNT and MIN_CNT (when used) can also be derived from the signal BIT_CNT. For example, the baud rate detection circuit 70 may include circuit 712 configured to generate signals MAX_CNT and optionally MIN_CNT via the following operation:
[0141] -MAX_CNT = BIT_CNT x 2, for example, by performing a left shift operation, the new least significant bit is added to the signal BIT_CNT;
[0142] -MIN_CNT = BIT_CNT / 2, for example, by performing a right shift operation to remove the least significant bit of the signal BIT_CNT.
[0143] Therefore, in this way, the transmitter circuitry can change the baud rate used from the initial nominal value to increase or decrease the baud rate used during data exchange with the processing system 10a. In fact, in this case, it is sufficient for the communication baud rate of a given UART frame to be in the range of half to twice the baud rate of the previous UART frame.
[0144] In various embodiments, when the edge detector 700 does not transmit a data reception signal within a given time period, the circuit 712 can also reset the values MAX_CNT and optional MIN_CNT to the initial values calculated based on the nominal value NOM_COUNT.
[0145] In this regard, to detect whether the communication is operating correctly, the transmitter circuit 30 or 40 can therefore send one or more (e.g., debug) command packets at a given baud rate and verify whether the processing system 10 responds (within a given maximum time) with a corresponding debug response packet indicating that the communication is working correctly. Therefore, the transmitter circuit can be configured as follows:
[0146] - Increase the baud rate when (e.g., during debugging) response packets are received correctly; and
[0147] - Reduce the baud rate when (for example, during debugging) response packets are not received correctly.
[0148] Specifically, compared to traditional baud rate negotiation mechanisms, the described baud rate detection and variation solution can be used not only at the start of communication, for example, to set the highest possible baud rate, but also allows the transmitter circuitry to adjust the baud rate of the transmitted UART frames in real time during data transmission operations, and the receiver circuitry to dynamically adjust the baud rate used to receive UART frames via the baud rate detection circuit 70. Therefore, communication is more robust because, in the event of a lost response from the receiver circuitry, the transmitter circuitry can retransmit the same (command or data) packet while simultaneously reducing the baud rate until the receiver circuitry responds again with a response packet, thus avoiding communication interruption or even the loss of a single packet.
[0149] The claims are an integral part of the technical teachings disclosed herein.
[0150] Of course, without prejudice to the principles of the invention, the details of the structure and embodiments may vary considerably from what is described and shown herein purely by way of example, without departing from the scope of the invention as defined by the appended claims.
Claims
1. A processing system, comprising: The transmitting terminal is configured to provide transmission signals; The receiving terminal is configured to receive signals. The universal asynchronous receiver-transmitter communication interface includes: Transmit data register; Receive data register, The clock management circuit is configured to receive a clock signal and generate a reduced clock signal according to a clock scaling factor; A transmitting circuit is configured to sequentially transmit a given number of transmit bits stored in the transmit data register via the transmit signal in response to the reduced clock signal; and The receiving circuit is configured to sequentially receive a given number of receive bits via the receive signal in response to the reduced clock signal, and to store the receive bits in the receive data register; Baud rate detection circuit, including: Another clock management circuit is configured to receive the clock signal and generate another clock signal that is the same as the clock signal or is a frequency-reduced version of the clock signal; An edge detector is configured to generate a first control signal indicating an edge in the received signal; The digital counter circuit is configured as follows: Monitor the first control signal; In response to determining that the first control signal sends a signal to notify the edge in the received signal, the count value is reset; and In response to determining that the first control signal has not signaled an edge in the received signal, the count value is incremented based on the other clock signal; The verification circuit is configured as follows: Monitor the first control signal and the count value; When the count value is less than the maximum value, in response to determining that the first control signal signals an edge in the received signal, an assertion is made on the second control signal, wherein the maximum value indicates the minimum allowed baud rate; and When the count value is equal to or greater than the maximum value, in response to determining that the first control signal did not signal an edge in the received signal, the second control signal is asserted; and The register is configured to provide a threshold signal by storing the count value when the second control signal is asserted; The clock scaling factor is derived from the threshold signal.
2. The processing system of claim 1, wherein the clock management circuit includes a first reduction circuit, the first reduction circuit being configured to generate a prescaled clock signal or the reduced clock signal via a first counter, the first counter being configured to increment a first count value in response to the clock signal until the first count value reaches a first threshold, wherein the first threshold is derived from the threshold signal.
3. The processing system of claim 2, wherein the clock management circuit includes a second reduction circuit configured to receive the prescaled clock signal and generate the reduced clock signal according to a second clock scaling factor, and wherein the other clock management circuit includes a third scaling circuit configured to receive the clock signal and generate the other clock signal according to the second clock scaling factor.
4. The processing system according to claim 1, wherein the maximum value corresponds to twice the nominal count value.
5. The processing system of claim 4, wherein the baud rate detection circuit is configured to adjust the maximum value according to the threshold signal.
6. The processing system of claim 1, wherein the verification circuit is configured to assert the second control signal only when the count value is also greater than the minimum value.
7. The processing system of claim 6, wherein the minimum value corresponds to half of the nominal count value.
8. The processing system of claim 7, wherein the baud rate detection circuit is configured to adjust the minimum value according to the threshold signal.
9. The processing system according to claim 1, further comprising: The microprocessor is configured to execute software instructions; Non-volatile memory is configured to store the software instructions; as well as The debug interface is configured to analyze the contents of the receive data register and determine one or more debug command packages for writing new software instructions to the non-volatile memory.
10. The processing system of claim 9, wherein the debug interface is configured to store a corresponding debug response packet into the transmit data register in response to each debug command packet.
11. The processing system of claim 1, wherein the baud rate detection circuit is configured to generate the clock scaling factor for the universal asynchronous receiver-transmitter communication interface.
12. An integrated circuit comprising the processing system according to claim 1.
13. A communication system, comprising: The processing system according to claim 1; as well as UART transmitter circuitry, coupled to the processing system, is configured to sequentially transmit data via the received signal according to a given baud rate; The processing system is configured to dynamically adjust the baud rate for receiving UART frames from the UART transmitter circuit via a baud rate detection circuit.
14. The communication system of claim 13, wherein the UART transmitter circuit is configured to change the baud rate during the transmission of the data.
Citation Information
Patent Citations
Processing system, related integrated circuit, device and method
US20200319876A1
Processing system, related integrated circuit, apparatus and method
CN111913412A
System and methods for completing a cascaded clock ring bus
CN112055945A
