A / D conversion control circuit
By using the combination of priority scanning group and FIFO memory in the A/D conversion control circuit, the problem of full FIFO status in high-speed A/D conversion processing is solved, and efficient data processing is achieved.
Patent Information
- Application Number
- CN202410715103.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-06-05
- Filing Date
- 2024-06-04
- Publication Date
- 2024-12-06
AI Technical Summary
During the high-speed A/D conversion process, interruption and restart of the analog/digital conversion process lead to a full state of FIFO memory, affecting data processing efficiency.
Multiple AD conversion channels are controlled by scanning groups with different priorities, and data processing is performed through multiple FIFO memories corresponding to each scanning group through the FIFO unit. The pointer control unit is used to start, interrupt and switch according to the priority of the scanning group. The write/read pointer position of the FIFO memory is cleared or changed at the restart timing.
High-speed A/D conversion processing is realized, which avoids the occurrence of full state of FIFO memory and improves the efficiency and stability of data processing.
Smart Images

Figure CN119093935A_ABST
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority from Japanese Patent Application No. 2023-092157 filed on Jun. 5, 2023, the contents of which are incorporated herein by reference. Technical Field
[0003] The present disclosure relates to an A / D converter control circuit for converting an analog signal into a digital signal. Background Art
[0004] An example of a semiconductor integrated circuit device is an automobile engine control microcontroller unit. As each generation of automobile engine microcontroller unit develops, it is necessary to convert analog information from a large number of sensors at high speed.
[0005] One disclosed technique is listed below.
[0006] [Patent Document 1] Japanese Patent Application Publication No. 2013-179568.
[0007] In this regard, a method is disclosed in which analog information from a sensor is divided into scan groups and the analog information is efficiently converted (see Patent Document 1). Summary of the invention
[0008] Meanwhile, when performing A / D conversion processing for each scan group, if a certain A / D conversion processing is interrupted according to the priority, the conversion result of the interrupted channel is retained. Since it takes time to delete the retained data, etc., this is a problem when performing high-speed A / D conversion processing.
[0009] The present disclosure is directed to solving the above-mentioned problems, and provides an A / D conversion control circuit capable of performing high-speed A / D conversion processing.
[0010] Other problems and novel features will become apparent from the description of this specification and the accompanying drawings.
[0011] The A / D conversion control circuit disclosed in the present invention includes: a scan group control unit, which controls multiple AD conversion channels using scan groups with different priorities; and a FIFO unit, which is set corresponding to each of the multiple scan groups, each of which has multiple FIFO memories, and these multiple FIFO memories sequentially store outputs from the scan group control unit for each corresponding scan group. The scan group control unit includes: an input receiving unit, which receives the AD conversion channel of the corresponding scan group from the multiple AD conversion channels according to instructions and outputs it to the corresponding FIFO memory; and an arbitration unit, which determines the timing of the conversion start, interruption and restart of each of the multiple scan groups. The FIFO unit also includes multiple pointer control units provided corresponding to the multiple FIFO memories, respectively. Each pointer control unit in the pointer control unit clears or changes the position of the write pointer / read pointer of the corresponding FIFO memory at the timing of any one of the start, interruption and / or restart of the corresponding scan group according to the priority of the scan group.
[0012] The A / D conversion control circuit disclosed in the present invention includes a pointer control unit, which can clear or change the position of the write pointer / read pointer of the corresponding FIFO memory at the timing of at least any one of the start, interruption and restart of the corresponding scan group according to the priority of the scan group, thereby performing high-speed A / D conversion processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 is a schematic diagram for explaining a data processing system 10 according to the first embodiment.
[0014] Figure 2 1 is a schematic diagram for explaining the configuration of the A / D conversion control circuit 125 according to the first embodiment.
[0015] Figure 3 is a diagram for explaining a determination signal from the arbitration unit 110 according to the first embodiment.
[0016] Figure 4 is a schematic diagram for explaining the configuration of the pointer control unit PCTn according to the first embodiment.
[0017] Figure 5 is a schematic diagram for explaining a scan group according to the first embodiment.
[0018] Figure 6 is a schematic diagram for explaining an interrupt process of a high priority scan group according to a comparative example.
[0019] Fig. 7Ais a schematic diagram for explaining the FIFO memory M1 in the interrupt processing of the high priority scan group according to the comparative example.
[0020] Figure 7B is a schematic diagram for explaining the FIFO memory M1 in the interrupt processing of the high priority scan group according to the comparative example.
[0021] Figure 7C is a schematic diagram for explaining the FIFO memory M1 in the interrupt processing of the high priority scan group according to the comparative example.
[0022] Figure 8 is a schematic diagram for explaining reading from a FIFO memory according to a comparative example.
[0023] Fig. 9 is a flowchart for explaining the flow of AD conversion processing according to the comparative example.
[0024] Fig.10 1 is a schematic diagram for explaining the interrupt processing of the high priority scan group according to the first embodiment.
[0025] Fig.11A 1 is a schematic diagram for explaining the FIFO memory M1 in the interrupt processing of the high priority scan group according to the first embodiment.
[0026] Fig. 11B 1 is a schematic diagram for explaining the FIFO memory M1 in the interrupt processing of the high priority scan group according to the first embodiment.
[0027] Fig.12 is a schematic diagram for explaining reading from a FIFO memory according to the first embodiment.
[0028] Fig.13 is a flowchart for explaining the flow of AD conversion processing according to the first embodiment.
[0029] Fig.14 1 is a schematic diagram for explaining the configuration of A / D conversion control circuit 125# according to the second embodiment.
[0030] Fig.15 is a schematic diagram for explaining the configuration of a pointer control unit PCT#n according to the second embodiment.
[0031] Fig.16 1 is a diagram for explaining the interrupt processing of the high priority scan group according to the second embodiment.
[0032] Fig.17A 1 is a schematic diagram for explaining the FIFO memory M1 in the interrupt processing of the high priority scan group according to the second embodiment.
[0033] Fig. 17B 1 is a schematic diagram for explaining the FIFO memory M1 in the interrupt processing of the high priority scan group according to the second embodiment.
[0034] Fig.18 is a flowchart for explaining the flow of AD conversion processing according to the second embodiment.
[0035] Fig.19 is a schematic diagram for explaining the first application example.
[0036] Fig. 20 is a schematic diagram for explaining the second application example.
[0037] Fig.21 is a schematic diagram for explaining the third application example. DETAILED DESCRIPTION
[0038] The embodiments will be described in detail with reference to the accompanying drawings. Note that the same reference numerals are attached to the same or corresponding parts in the drawings, and description thereof will not be repeated.
[0039] First embodiment
[0040] Figure 1 is a schematic diagram for explaining a data processing system 10 according to the first embodiment.
[0041] refer to Figure 1 , the data processing system 10 includes a semiconductor integrated circuit device 11 capable of processing analog signals. A micro control unit (MCU) 11 will be described as an example of the semiconductor integrated circuit device.
[0042] The MCU 11 includes a plurality of analog ports 111 (AN0 to ANn) and an A / D conversion circuit 118 that performs A / D conversion processing to convert analog signals received via the analog ports into digital signals. The MCU 11 also includes an A / D conversion control circuit 125 that controls the operation of the A / D conversion circuit and a selector 117 that selects analog signals from the plurality of analog ports 111 according to an instruction from the A / D conversion control circuit 125.
[0043] In addition, the MCU 11 includes a CPU (Central Processing Unit) 120, a built-in RAM (Random Access Memory) 121, and a DMAC (Direct Memory Access Controller) 122. The CPU 120, the built-in RAM 121, and the DMAC 122 are coupled via an internal bus 124 so that they can exchange signals with each other. A peripheral bus 123 is coupled to the internal bus 124. An A / D conversion control circuit 125 is coupled to the peripheral bus 123.
[0044] The CPU 120 controls the overall operation of the MCU 11 according to a preset program. The built-in RAM 121 is used as a work area for the CPU 120 to perform arithmetic processing, etc. The DMAC 122 directly controls data transfer without passing through the CPU 120. The selector 117 selects and outputs analog signals received via the corresponding analog ports 111 (AN0 to ANn).
[0045] The A / D conversion circuit 118 converts the analog signal selected by the selector 117 into a digital signal.
[0046] The A / D conversion control circuit 125 controls the selection operation of the selector 117 and the A / D conversion operation of the A / D conversion circuit 118 .
[0047] Figure 2 1 is a schematic diagram for explaining the configuration of the A / D conversion control circuit 125 according to the first embodiment.
[0048] refer to Figure 2 The A / D conversion control circuit 125 includes a scan group control unit 127 and a FIFO unit 129 .
[0049] The scan group control unit 127 controls a plurality of AD conversion channels by using a plurality of scan groups having different priorities.
[0050] The FIFO unit 129 is provided corresponding to multiple scanning groups SG0 to SG2 (also collectively referred to as scanning groups SG), and each scanning group has multiple FIFO memories M0 to M2 (also collectively referred to as FIFO memories M), which sequentially store the outputs from the scanning group control unit 127 for each corresponding scanning group SG.
[0051] The scanning group control unit 127 includes: input receiving units ISG0 to ISG2 (also referred to as input receiving units ISG), which receive the AD conversion channels of the corresponding scanning groups SG from multiple AD conversion channels according to instructions and output them to the corresponding FIFO memory M; and an arbitration unit 110, which determines the conversion start, interruption and restart timing of each scanning group in the multiple scanning groups.
[0052] The input receiving unit ISG receives the AD conversion channel of the corresponding scanning group SG, outputs the conversion result to the corresponding FIFO memory M of the FIFO unit 129, and also receives input of various control signals.
[0053] Specifically, the input receiving unit ISG0 receives the conversion start trigger signal of the scan group SG0 from the CPU 120 in response to the scan group SG0. The input receiving unit ISG0 outputs the control signal SGACT0 to the arbitration unit 110 in response to the scan group SG0 input according to the conversion start trigger signal of the scan group SG0. In addition, the input receiving unit ISG0 outputs information about the rise and fall of the control signal SGACT0 to the arbitration unit 110. For the scan group SG0, the control signal SGACT0 is set to "1" from the beginning until the final AD conversion channel is received. In other cases, the control signal SGACT0 is 0.
[0054] Note that as an example in this embodiment, the case where a conversion start trigger signal is output from CPU 120 will be described, but the present invention is not limited to this, and the conversion start trigger signal can be input from the outside together with the analog signal input to analog port 111 (AN0 to ANn).
[0055] Similarly, the input receiving unit ISG1 receives the conversion start trigger signal for the scan group SG1 from the CPU 120 in response to the scan group SG1. The input receiving unit ISG1 outputs the control signal SGACT1 to the arbitration unit 110 according to the input of the conversion start trigger signal of the scan group SG1 in response to the scan group SG1. In addition, the input receiving unit ISG1 will output information about the rise and fall of the control signal SGACT1 to the arbitration unit 110. For the scan group SG1, the control signal SGACT1 is set to "1" from the beginning until the final AD conversion channel is received. In other cases, the control signal SGACT1 is 0.
[0056] Similarly, the input receiving unit ISG2 receives a conversion start trigger signal for the scan group SG2 from the CPU 120 in response to the scan group SG2. The input receiving unit ISG2 outputs a control signal SGACT2 to the arbitration unit 110 according to the input of the conversion start trigger signal of the scan group SG2 in response to the scan group SG2. In addition, the input receiving unit ISG2 also outputs information about the rise and fall of the control signal SGACT2 to the arbitration unit 110. For the scan group SG2, the control signal SGACT2 is set to "1" from the beginning until the final AD conversion channel is received. In other cases, the control signal SGACT2 is 0.
[0057] The arbitration unit 110 determines the timing of conversion start, interruption and restart of the scanning groups SG0 to SG2 based on the control signals SGACT0 to SGACT2 and the information about the rise and fall of the control signals SGACT0 to SGACT2, and outputs determination signals SGA0 to SGA2, SGB0 to SGB2 and SGC0 to SGC2, respectively.
[0058] The FIFO unit 129 includes write pointer control units WP0 to WP2 (also collectively referred to as write pointer control units WP) that respectively control writing to the FIFO memories M0 to M2 provided corresponding to the FIFO memories M0 to M2. The FIFO unit 129 includes read pointer control units RP0 to RP2 (also collectively referred to as read pointer control units RP) that respectively control reading from the FIFO memories M0 to M2 provided corresponding to the FIFO memories M0 to M2. The FIFO unit 129 is provided corresponding to the FIFO memories M0 to M2, respectively, and includes pointer control units PCT0 to PCT2 (also referred to as pointer control units PCT) that control the write pointer control units WP0 to WP2 and the read pointer control units RP0 to RP2.
[0059] The pointer control unit PCT0 outputs a clear pointer position command signal and a pointer change timing signal to the write pointer control unit WP0 and the read pointer control unit RP0 based on input of the determination signals SGA0, SGB0, SGC0 and the clear timing selection signal from the arbitration unit 110.
[0060] The pointer control unit PCT1 outputs a clear pointer position command signal and a pointer change timing signal to the write pointer control unit WP1 and the read pointer control unit RP1 based on input of the determination signals SGA1, SGB1, SGC1 and the clear timing selection signal from the arbitration unit 110.
[0061] The pointer control unit PCT2 outputs a clear pointer position command signal and a pointer change timing signal to the write pointer control unit WP2 and the read pointer control unit RP2 based on input of the determination signals SGA2, SGB2, SGC2 and the clear timing selection signal from the arbitration unit 110.
[0062] Figure 3 is a diagram for explaining a determination signal from the arbitration unit 110 according to the first embodiment.
[0063] refer to Figure 3 , in this example, a case will be described where the scanning group SG0 has the highest priority, the scanning group SG1 has the second highest priority, and the scanning group SG2 has the lowest priority.
[0064] The arbitration unit 110 outputs a determination signal SGA0 indicating the timing of starting conversion of the scanning group SG0 to the pointer control unit PCT0 of the FIFO unit 129 according to the rise of the control signal SGACT0. In this example, the scanning group SG0 has a high priority, so it is not interrupted or restarted. Therefore, the determination signals SGB0 and SGC0 are not output.
[0065] Next, in the arbitration unit 110 , the control signal SGACT0 is 0, and a determination signal SGA1 indicating the start switching timing of the scan group SG1 is output to the pointer control unit PCT1 of the FIFO unit 129 .
[0066] Furthermore, in the arbitration unit 110 , the control signal SGACT1 is 1, and according to the rise of the control signal SGACT0 , a determination signal SGB1 indicating the interrupt timing of the scan group SG1 is output to the pointer control unit PCT1 of the FIFO unit 129 .
[0067] Furthermore, in the arbitration unit 110 , according to the falling of the control signal SGACT0 , a determination signal SGC1 indicating the timing of restarting the scanning of the group SG1 is output to the pointer control unit PCT1 of the FIFO unit 129 .
[0068] Next, in the arbitration unit 110 , the control signals SGACT0 and SGACT1 are 0, and according to the rise of the control signal SGACT2 , a determination signal SGA2 indicating the timing of starting the switching of the scanning group SG2 is output to the pointer control unit PCT2 of the FIFO unit 129 .
[0069] Furthermore, in the arbitration unit 110 , the control signal SGACT2 is 1 and the control signal SGACT1 is 0, and according to the rise of the control signal SGACT0 , a determination signal SGB2 indicating the timing of interrupting the scan group SG2 is output to the pointer control unit PCT2 of the FIFO unit 129 .
[0070] Furthermore, in the arbitration unit 110 , the control signal SGACT2 is 1 and the control signal SGACT0 is 0, and according to the falling of the control signal SGACT1 , a determination signal SGC2 indicating the timing of restarting the scanning group SG2 is output to the pointer control unit PCT2 of the FIFO unit 129 .
[0071] Furthermore, in the arbitration unit 110 , the control signal SGACT2 is 1 and the control signal SGACT1 is 0, and according to the falling of the control signal SGACT0 , a determination signal SGC2 indicating the timing of restarting the scanning group SG2 is output to the pointer control unit PCT2 of the FIFO unit 129 .
[0072] Figure 4 is a schematic diagram for explaining the configuration of the pointer control unit PCTn according to the first embodiment.
[0073] refer to Figure 4 The pointer control unit PCTn includes a selector SL that receives inputs of the determination signals SGAn, SGBn, and SGCn and selects according to the clear timing selection signal. "n" can be any value. In this example, the range of "n" is from 0 to 2.
[0074] The clear timing selection signal is output based on the information stored in the clear timing selection register 128. As an example, the clear timing selection register 128 is composed of three bits, which correspond to the start, interruption, and restart of the clear timing, respectively. Note that as an example, the case where the information is configured by three bits has been described, but the present invention is not limited to this, and any number of bits can be used as long as the information can be used to indicate each state.
[0075] By setting any bit of the clear timing selection register 128, a clear timing selection signal ("1") is output to the selector SL.
[0076] For example, when the bit corresponding to the start of the clear timing selection register 128 is set to "1", the selector SL outputs the determination signal SGAn as a pointer change timing signal to the write pointer control unit WPn and the read pointer control unit RPn.
[0077] In this case, at the timing of starting the switching of the scanning group SGn, the write pointer control unit WPn and the read pointer control unit RPn set the pointers at the clear pointer positions ("0").
[0078] Similarly, for example, when the bit corresponding to the interrupt of the clear timing selection register 128 is set to "1", the selector SL outputs the determination signal SGBn as the pointer change timing signal to the write pointer control unit WPn and the read pointer control unit RPn.
[0079] In this case, at the timing of interrupting the scan group SGn, the write pointer control unit WPn and the read pointer control unit RPn set the pointers to the clear pointer positions ("0").
[0080] Similarly, for example, when the bit corresponding to the restart of the clear timing selection register 128 is set to "1", the selector SL outputs the determination signal SGCn as the pointer change timing signal to the write pointer control unit WPn and the read pointer control unit RPn.
[0081] In this case, at the timing of restarting the scan group SGn, the write pointer control unit WPn and the read pointer control unit RPn set the pointer to the clear pointer position ("0").
[0082] Figure 5 is a schematic diagram for explaining a scan group according to the first embodiment.
[0083] refer to Figure 5 In this example, scanning groups SG0 to SG2 are provided. In scanning group SG0, AD conversion channels CH0 to CH2 are allocated. In scanning group SG1, AD conversion channels CH4 to CH7 are allocated. In scanning group SG2, AD conversion channels CH10 to CH12 are allocated.
[0084] AD conversion is performed for each scanning group SG. The scanning group SG0 has the highest priority, the scanning group SG1 has the next highest priority, and the scanning group SG2 has the lowest priority.
[0085] Therefore, during the AD conversion of the scanning group SG1, the AD conversion of the scanning group SG0 may be interrupted.
[0086] Comparison Examples
[0087] In the comparative example, a configuration in which the pointer control unit PCT is not provided will be described. That is, in the comparative example, a case will be described in which the timing of clearing the FIFO memory is when the memory is in a full state and when reading is performed.
[0088] Figure 6 is a schematic diagram for explaining an interrupt process of a high priority scan group according to a comparative example.
[0089] In this example, reference Figure 6 Explain the scan groups SG0 and SG1.
[0090] At time T1, the conversion start trigger signal of the scanning group SG1 is input, and the AD conversion channels of the scanning group SG1 are sequentially input to the input receiving unit ISG1. The input receiving unit ISG1 sets the control signal SGACT1 to 1.
[0091] In this example, a case is shown where the AD conversion channel CH6 is sequentially input from the AD conversion channel CH4 to the input receiving unit ISG1 , and is sequentially stored in the FIFO memory M1 .
[0092] Then, at time T2 in the middle of the timing of the input receiving unit ISG1 receiving the AD conversion channel CH7, the conversion start of the input scanning group SG0 is triggered. Therefore, the input receiving unit ISG0 sets the control signal SGACT0 to 1. Subsequently, the AD conversion of the scanning group SG1 is interrupted. Then, the input receiving unit ISG0 receives the AD conversion channels CH0 to CH2 of the scanning group SG0, and sequentially stores them in the FIFO memory M0.
[0093] Next, at time T3, the input receiving unit ISG0 receives that the conversion of the final AD conversion channel CH2 of the scanning group SG0 is completed. Therefore, the control signal SGACT0 is set to 0. Subsequently, the AD conversion of the scanning group SG1 is restarted.
[0094] In this example, a case is shown in which the AD conversion channel CH5 is sequentially input from the AD conversion channel CH4 to the input receiving unit ISG1 and is sequentially stored in the FIFO memory M1.
[0095] Then, at time T4 in the middle of the timing of the input receiving unit ISG1 receiving the AD conversion channel CH6, the conversion start of the input scanning group SG0 is triggered. Therefore, the input receiving unit ISG0 sets the control signal SGACT0 to 1. Subsequently, the AD conversion of the scanning group SG1 is interrupted. Then, the input receiving unit ISG0 receives the AD conversion channels CH0 to CH2 of the scanning group SG0, and stores them sequentially in the FIFO memory M0.
[0096] Next, at time T5, the input receiving unit ISG0 accepts that the conversion of the final AD conversion channel CH2 of the scanning group SG0 is completed. Therefore, the control signal SGACT0 is set to 0. Subsequently, the AD conversion of the scanning group SG1 is restarted.
[0097] In this example, a case is shown in which the AD conversion channel CH7 is sequentially input from the AD conversion channel CH4 to the input receiving unit ISG1 and is sequentially stored in the FIFO memory M1.
[0098] Then, at time T6, the case where the FIFO memory M1 is in a full state is shown. In this case, it is necessary to temporarily save the data in the FIFO memory M1 and ensure the safety of the storage area. Then, at time T7, the final AD conversion channel CH7 is stored in the FIFO memory M1, and the AD conversion of the scanning group SG1 is completed. Therefore, the control signal SGACT1 is set to 0.
[0099] Next, at time T8 , the conversion start trigger of the scanning group SG1 is input, and the AD conversion channels of the scanning group SG1 are sequentially input to the input receiving unit ISG1 . The input receiving unit ISG1 sets the control signal SGACT1 to 1.
[0100] In this example, a case is shown in which the AD conversion channel CH5 is sequentially input from the AD conversion channel CH4 to the input receiving unit ISG1 and is sequentially stored in the FIFO memory M1.
[0101] Then, at time T9 when the input receiving unit ISG1 receives the middle moment of the AD conversion channel CH6, the conversion start of the input scanning group SG0 is triggered. Therefore, the input receiving unit ISG0 sets the control signal SGACT0 to 1. Subsequently, the AD conversion of the scanning group SG1 is interrupted. Then, the input receiving unit ISG0 receives the AD conversion channels CH0 to CH2 of the scanning group SG0, and sequentially stores them in the FIFO memory M0.
[0102] Next, at time T10, the input receiving unit ISG0 accepts that the conversion of the final AD conversion channel CH2 of the scanning group SG0 is completed. Therefore, the control signal SGACT0 is set to 0. Subsequently, the AD conversion of the scanning group SG1 is restarted.
[0103] In this example, a case is shown in which the AD conversion channel CH7 is sequentially input from the AD conversion channel CH4 to the input receiving unit ISG1 and is sequentially stored in the FIFO memory M1.
[0104] Then, at time T11, the final AD conversion channel CH7 is stored in the FIFO memory M1, and the AD conversion of the scanning group SG1 is completed. Therefore, the control signal SGACT1 is set to 0.
[0105] FIG. 7 is a schematic diagram for explaining the FIFO memory M1 in the high priority scan group interrupt processing according to the comparative example.
[0106] refer to Fig. 7A In this example, it is assumed that the FIFO memory M1 is provided with eight levels of storage areas as an example.
[0107] The state where the FIFO memory M1 is filled with remaining data due to interrupt processing at time T6 is shown. In this case, the AD conversion channels CH4 to CH6 stored first and the AD conversion channels CH4 and CH5 stored in sequence next are unnecessary data. Then, it is necessary to temporarily save the last stored AD conversion channels CH4 to CH6.
[0108] refer to Figure 7B , shows the case where the AD conversion channel CH7 is stored after all the data in the FIFO memory M1 is read. This can obtain a set of data sets of the AD conversion channels CH4 to CH7 of the scanning group SG1.
[0109] refer to Figure 7C , showing the following situation: a data set of a set of AD conversion channels CH4 to CH7 of the scanning group SG1 is acquired at time T11.
[0110] Even in this case, the first AD conversion channels CH4 and CH5 are unnecessary data due to the interrupt processing.
[0111] Figure 8 is a schematic diagram for explaining reading from a FIFO memory according to a comparative example.
[0112] refer to Figure 8 , execute the reading process of the FIFO memory Mn (step S100).
[0113] Next, the reading channel number is acquired (step S102).
[0114] Next, it is determined whether the last channel is to be read based on the acquired channel number (step S104).
[0115] In step S104 , if it is determined that the last channel is to be read (Yes in step S104 ), data from the first channel to the last channel, including temporarily saved data, is acquired (step S108 ).
[0116] Then, unnecessary data is deleted (step S112).
[0117] Then, the processing ends (END).
[0118] Meanwhile, if it is determined in step S104 that the last channel is not read (No in step S104), it is determined whether the FIFO memory Mn is empty (step S106).
[0119] If it is determined in step S106 that the FIFO memory Mn is not empty (NO in step S106), the process returns to step S100 and the above-described process is repeated.
[0120] In step S106, if it is determined that the FIFO memory Mn is empty, only the latest data of each channel is temporarily saved (step S110).
[0121] Next, unnecessary data is deleted (step S112).
[0122] Then, the processing ends (END).
[0123] Fig. 9 is a flowchart for explaining the flow of AD conversion processing according to the comparative example.
[0124] refer to Fig. 9 , the AD conversion of the scanning group SG1 starts (step ST1). Next, the AD conversion of the AD conversion channels CH4 to CH6 is completed (step ST2). The number of data blocks in the FIFO memory M1 is three. Next, the AD conversion of the scanning group SG0 is started (step ST3). Therefore, the AD conversion of the scanning group SG1 is interrupted. Next, the AD conversion of the scanning group SG0 is completed (step ST4). Next, the AD conversion of the scanning group SG1 is restarted (step ST5). Next, the AD conversion of the AD conversion channels CH4 and CH5 is completed (step ST6). The number of data blocks in the FIFO memory M1 is five.
[0125] Next, the AD conversion of the scanning group SG0 is started (step ST7). Therefore, the AD conversion of the scanning group SG1 is interrupted. Next, the AD conversion of the scanning group SG0 is completed (step ST8). Next, the AD conversion of the scanning group SG1 is restarted (step ST9). Next, the AD conversion of the AD conversion channels CH4 to CH6 is completed (step ST10). The number of data blocks in the FIFO memory M1 is eight. This causes the FIFO memory M1 to enter a full state.
[0126] Next, the full state of the FIFO memory M1 is detected, and data is read out from the FIFO memory M1 (step ST11). As a result, the amount of data in the FIFO memory M1 becomes zero.
[0127] Next, the unnecessary data read is deleted (step ST12). Next, the AD conversion of the AD conversion channel CH7 is completed (step ST13). Next, the AD conversion of the scanning group SG1 is completed (step ST14). Next, the end of the AD conversion of the scanning group SG1 is detected, and the data in the FIFO memory M1 is read out (step ST15). Therefore, the number of data blocks in the FIFO memory M1 becomes zero.
[0128] Next, the AD conversion of the scanning group SG1 starts (step ST16). Next, the AD conversion of the AD conversion channels CH4 and CH5 is completed (step ST17). The number of data blocks in the FIFO memory M1 is two. Next, the AD conversion of the scanning group SG0 is started (step ST18). Therefore, the AD conversion of the scanning group SG1 is interrupted. Next, the AD conversion of the scanning group SG0 is completed (step ST19).
[0129] Next, the AD conversion of the scanning group SG1 is restarted (step ST20). Next, the AD conversion of the AD conversion channels CH4 to CH7 is completed (step ST21). The number of data blocks in the FIFO memory M1 is six. Next, the AD conversion of the scanning group SG1 is completed (step ST22). Next, the end of the AD conversion of the scanning group SG1 is detected, and the data in the FIFO memory M1 is read out (step ST23). Therefore, the number of data blocks in the FIFO memory M1 becomes zero. Next, the unnecessary data read is deleted (step ST24).
[0130] In the case where the scan group SG1 is interrupted by the scan group SG0, when the AD conversion channel is in the eight-stage FIFO memory M1, the conversion result before the scan group SG1 is interrupted is retained in the FIFO memory M1. After the conversion of the scan group SG0 is completed, the scan group SG1 restarts the conversion from the top channel, so if the interruption of the scan group SG0 continues to occur, the state of the FIFO memory becomes full. Therefore, software is required to read data and process and delete unnecessary data.
[0131] A problem arises here in that the processing requires high-speed A / D conversion processing.
[0132] Example
[0133] In the example, the following method will be described: the pointer control unit PCT clears the FIFO memory at the timing of at least one of the start, interruption, and restart of the scan group. As an example, a case will be described where "1" is set to the bit corresponding to the restart of the clear timing selection register 128. In this case, at the timing of restarting the scan group SG1, the write pointer control unit WP1 and the read pointer control unit RP1 set the pointer at the clear pointer position ("0").
[0134] Fig.10 1 is a schematic diagram for explaining the interrupt processing of the high priority scan group according to the first embodiment.
[0135] In this example, reference Fig.10 Scan groups SG0 and SG1 are described.
[0136] At time T21 , the conversion start trigger signal of the scanning group SG1 is input, and the AD conversion channels of the scanning group SG1 are sequentially input to the input receiving unit ISG1 . The input receiving unit ISG1 sets the control signal SGACT1 to 1.
[0137] In this example, a case is shown where the AD conversion channel CH6 is sequentially input from the AD conversion channel CH4 to the input receiving unit ISG1 , and is sequentially stored in the FIFO memory M1 .
[0138] Then, at time T22 in the middle of the timing of the input receiving unit ISG1 receiving the AD conversion channel CH7, the conversion start trigger signal of the input scanning group SG0 is input. Therefore, the input receiving unit ISG0 sets the control signal SGACT0 to 1. Then, the AD conversion of the scanning group SG1 is interrupted. Then, the input receiving unit ISG0 receives the AD conversion channels CH0 to CH2 of the scanning group SG0, and sequentially stores them in the FIFO memory M0.
[0139] Next, at time T23, the input receiving unit ISG0 accepts the completion of the conversion of the final AD conversion channel CH2 of the scanning group SG0. Therefore, the control signal SGACT0 is set to 0. Then, with the restart of the AD conversion of the scanning group SG1, the determination signal SGC1 is set to "1". Therefore, the write pointer control unit WP1 and the read pointer control unit RP1 set the pointer at the clear pointer position ("0").
[0140] In this example, a case is shown in which the AD conversion channel CH5 is sequentially input from the AD conversion channel CH4 to the input receiving unit ISG1 and is sequentially stored in the FIFO memory M1.
[0141] Then, at time T24 in the middle of the timing of the input receiving unit ISG1 receiving the AD conversion channel CH6, the conversion start trigger signal of the input scanning group SG0 is input. Therefore, the input receiving unit ISG0 sets the control signal SGACT0 to 1. Then, the AD conversion of the scanning group SG1 is interrupted. Then, the input receiving unit ISG0 receives the AD conversion channels CH0 to CH2 of the scanning group SG0, and sequentially stores them in the FIFO memory M0.
[0142] Next, at time T25, the input receiving unit ISG0 accepts the completion of the conversion of the final AD conversion channel CH2 of the scanning group SG0. Therefore, the control signal SGACT0 is set to 0. Then, with the restart of the AD conversion of the scanning group SG1, the determination signal SGC1 is set to "1". Therefore, the write pointer control unit WP1 and the read pointer control unit RP1 set the pointer at the clear pointer position ("0").
[0143] In this example, a case is shown in which the AD conversion channel CH7 is sequentially input from the AD conversion channel CH4 to the input receiving unit ISG1 and is sequentially stored in the FIFO memory M1.
[0144] Then, at time T26, the final AD conversion channel CH7 is stored in the FIFO memory M1, and the AD conversion of the scanning group SG1 is completed. Therefore, the control signal SGACT1 is set to 0.
[0145] Next, at time T28, the conversion start trigger signal of the scanning group SG1 is input, and the AD conversion channels of the scanning group SG1 are sequentially input to the input receiving unit ISG1. The input receiving unit ISG1 sets the control signal SGACT1 to 1.
[0146] In this example, a situation is generated in which the AD conversion channel CH5 is sequentially input from the AD conversion channel CH4 to the input receiving unit ISG1 and is sequentially stored in the FIFO memory M1.
[0147] Then, at time T29 in the middle of the timing of the input receiving unit ISG1 receiving the AD conversion channel CH6, the conversion start trigger signal of the input scanning group SG0 is input. Therefore, the input receiving unit ISG0 sets the control signal SGACT0 to 1. Then, the AD conversion of the scanning group SG1 is interrupted. Then, the input receiving unit ISG0 receives the AD conversion channels CH0 to CH2 of the scanning group SG0, and stores them sequentially in the FIFO memory M0.
[0148] Next, at time T30, the input receiving unit ISG0 accepts the completion of the conversion of the final AD conversion channel CH2 of the scanning group SG0. Therefore, the control signal SGACT0 is set to 0. Then, with the restart of the AD conversion of the scanning group SG1, the determination signal SGC1 is set to "1". Therefore, the write pointer control unit WP1 and the read pointer control unit RP1 set the pointer at the clear pointer position ("0").
[0149] In this example, a case is shown in which the AD conversion channel CH7 is sequentially input from the AD conversion channel CH4 to the input receiving unit ISG1 and is sequentially stored in the FIFO memory M1.
[0150] Then, at time T31, the final AD conversion channel CH7 is stored in the FIFO memory M1, and the AD conversion of the scanning group SG1 is completed. Therefore, the control signal SGACT1 is set to 0.
[0151] FIG. 11 is a schematic diagram for explaining the interrupt processing of the FIFO memory M1 of the high priority scan group according to the first embodiment.
[0152] refer to Fig.11AIn this example, it is assumed as an example that the FIFO memory M1 is provided with eight levels of storage areas.
[0153] The case where the AD conversion channels CH4 to CH7 are stored at time T26 is shown. Until this state is reached, the FIFO memory M1 is in the clear state at the time of two restarts.
[0154] refer to Fig. 11B , shows a case where AD conversion channels CH4 to CH7 are stored at time T31. Until reaching this state, the FIFO memory M1 is in a clear state at a restart.
[0155] In the case of this example, when restarting, the FIFO memory M1 is cleared so that no unnecessary data is left. Therefore, the FIFO memory M1 will not become full due to the remaining unnecessary data.
[0156] Fig.12 is a schematic diagram for explaining the read processing of the FIFO memory according to the first embodiment.
[0157] refer to Fig.12 , the read process of the FIFO memory Mn is performed (step S100). After the last AD conversion of the scanning group SGn is completed and the last AD conversion channel CH is stored, the read process of the FIFO memory Mn is performed.
[0158] Next, the reading channel number is acquired (step S102).
[0159] Next, it is determined whether the last channel is to be read based on the acquired channel number (step S104).
[0160] If it is determined in step S104 that the last channel is to be read (Yes in step S104 ), data from the top channel to the last channel is acquired (step S105 ).
[0161] Then, the processing ends (END).
[0162] Meanwhile, if it is determined in step S104 that the last channel is not read (No in step S104), it is determined whether the FIFO memory Mn is empty (step S106).
[0163] If it is determined in step S106 that the FIFO memory Mn is not empty (NO in step S106), the process returns to step S100 and the above-described process is repeated.
[0164] In step S106, if it is determined that the FIFO memory Mn is empty, the process ends (END).
[0165] Fig.13 is a flowchart for explaining the flow of AD conversion processing according to the first embodiment.
[0166] refer to Fig.13 , the AD conversion of the scanning group SG1 starts (step ST31). Next, the AD conversion of the AD conversion channels CH4 to CH6 is completed (step ST32). The number of data blocks in the FIFO memory M1 is three. Next, the AD conversion of the scanning group SG0 starts (step ST33). Therefore, the AD conversion of the scanning group SG1 is interrupted. Next, the AD conversion of the scanning group SG0 is completed (step ST34). Next, the AD conversion of the scanning group SG1 is restarted (step ST35). At the time of this restart, the pointer is set at the clear pointer position ("0"), so that the number of data in the FIFO memory M1 becomes 0. Next, the AD conversion of the AD conversion channels CH4 and CH5 is completed (step ST36). The number of data blocks in the FIFO memory M1 is two.
[0167] Next, the AD conversion of the scanning group SG0 starts (step ST37). Therefore, the AD conversion of the scanning group SG1 is interrupted. Next, the AD conversion of the scanning group SG0 ends (step ST38). Next, the AD conversion of the scanning group SG1 restarts (step ST39). At the time of this restart, the pointer is set at the clear pointer position ("0"), so that the number of data blocks in the FIFO memory M1 becomes 0.
[0168] Next, the AD conversion of the AD conversion channels CH4 to CH7 is completed (step ST40). Next, the AD conversion of the scanning group SG1 is completed (step ST41). Next, the end of the AD conversion of the scanning group SG1 is detected, and the data in the FIFO memory M1 is read out (step ST42). Therefore, the number of data blocks in the FIFO memory M1 becomes zero.
[0169] Next, the AD conversion of the scanning group SG1 starts (step ST43). Next, the AD conversion of the AD conversion channels CH4 and CH5 is completed (step ST44). The number of data blocks in the FIFO memory M1 is two. Next, the AD conversion of the scanning group SG0 starts (step ST45). Therefore, the AD conversion of the scanning group SG1 is interrupted. Next, the AD conversion of the scanning group SG0 is completed (step ST46).
[0170] Next, AD conversion of the scanning group SG1 is restarted (step ST47). At this restart, the pointer is set at the clear pointer position ("0") so that the number of data blocks in the FIFO memory M1 becomes zero.
[0171] Next, the AD conversion of the AD conversion channels CH4 to CH7 is completed (step ST48). The number of data blocks in the FIFO memory M1 is four. Next, the AD conversion of the scanning group SG1 is completed (step ST49). Next, the end of the AD conversion of the scanning group SG1 is detected, and the data in the FIFO memory M1 is read out (step ST50). Therefore, the number of data blocks in the FIFO memory M1 becomes 0.
[0172] When the AD conversion channels are stored in the 8-stage FIFO memory M1 in the case where the scan group SG1 is interrupted by the scan group SG0, the conversion results before the scan group SG1 is interrupted are not retained in the FIFO memory M1. Therefore, the full state of the FIFO memory does not occur, and the data reading and deletion processing of unnecessary data due to software becomes unnecessary.
[0173] Therefore, this processing enables high-speed A / D conversion processing.
[0174] Note that, in this example, a method of clearing the FIFO memory M1 at the time of restarting is described, but the FIFO memory may be cleared at the timing of the start of conversion or the timing of interruption.
[0175] Second embodiment
[0176] Fig.14 1 is a schematic diagram for explaining the configuration of A / D conversion control circuit 125# according to the second embodiment.
[0177] refer to Fig.14 The difference between the A / D conversion control circuit 125# and the A / D conversion control circuit 125 is that the FIFO unit 129 is replaced by a FIFO unit 129#.
[0178] The difference of FIFO unit 129# is that the pointer control unit PCTn is replaced by the pointer control unit PCT#n. Since the other configurations are the same, the detailed description will not be repeated.
[0179] The pointer control unit PCT#n has a function of storing the write pointer position.
[0180] Fig.15 is a schematic diagram for explaining the configuration of a pointer control unit PCT#n according to the second embodiment.
[0181] refer to Fig.15, the pointer control unit PCT#n includes: a recovery buffer BF storing the pointer position held by the write pointer control unit WPn according to the determination signal SGAn; and a selector SL receiving inputs of the determination signals SGBn and SGCn and selecting one of the determination signals SGBn and SGCn according to the clear timing signal. "n" can take any value. In this example, "n" ranges from 0 to 2.
[0182] The restore buffer BF instructs the write pointer control unit WPn to acquire and store the pointer position of the write pointer control unit WPn according to the input of the determination signal SGAn. The value stored in the restore buffer BF is maintained as the clear pointer position.
[0183] The clear timing selection signal is output based on the information stored in the clear timing selection register 128. The clear timing selection register 128 is configured by two bits each corresponding to the interruption or resumption of the clear timing.
[0184] By setting any bit of the clear timing selection register 128, a clear timing selection signal ("1") is output to the selector SL.
[0185] For example, when the bit corresponding to the interrupt of the clear timing selection register 128 is set to "1", the selector SL outputs the determination signal SGBn as the pointer change timing signal to the write pointer control unit WPn.
[0186] In this case, at the timing of interrupting the scan group SGn, the write pointer control unit WPn sets the pointer position to a position corresponding to the value stored in the restoration buffer BF.
[0187] Similarly, for example, when the bit corresponding to the restart of the clear timing selection register 128 is set to "1", the selector SL outputs the determination signal SGCn as the pointer change timing signal to the write pointer control unit WPn.
[0188] In this case, at the timing of restarting the scan group SGn, the write pointer control unit WPn sets the pointer position to a position corresponding to the value stored in the restoration buffer BF.
[0189] Fig.16 1 is a diagram for explaining the interrupt processing of the high priority scan group according to the second embodiment.
[0190] In this example, reference Fig.16 Scan groups SG0 and SG1 are described.
[0191] At time T41, the conversion start of the input scanning group SG1 is triggered, and the AD conversion channels of the scanning group SG1 are sequentially input to the input receiving unit ISG1. The input receiving unit ISG1 sets the control signal SGACT1 to 1.
[0192] Furthermore, as the control signal SGACT is set to "1", the determination signal SGA1 is set to "1". Therefore, the restoration buffer BF of the pointer control unit PCT#1 stores the pointer position written to the pointer control unit WP1. In this example, the restoration buffer BF stores and holds "0".
[0193] Furthermore, in this example, a case is shown in which the AD conversion channel CH6 is sequentially input from the AD conversion channel CH4 to the input receiving unit ISG1 , and is sequentially stored in the FIFO memory M1 .
[0194] Then, at time T42 in the middle of the timing of the input receiving unit ISG1 receiving the AD conversion channel CH7, the conversion start of the input scanning group SG0 is triggered. Therefore, the input receiving unit ISG0 sets the control signal SGACT0 to 1. Then, the AD conversion of the scanning group SG1 is interrupted. Then, the input receiving unit ISG0 receives the AD conversion channels CH0 to CH2 of the scanning group SG0, and sequentially stores them in the FIFO memory M0.
[0195] Next, at time T43, the input receiving unit ISG0 accepts the completion of the conversion of the final AD conversion channel CH2 of the scanning group SG0. Therefore, the control signal SGACT0 is set to 0. Then, with the restart of the AD conversion of the scanning group SG1, the determination signal SGC1 is set to "1". Therefore, based on the value stored in the recovery buffer BF, the write pointer control unit WP1 is set at the pointer position ("0").
[0196] In this example, a case is shown in which the AD conversion channel CH5 is sequentially input from the AD conversion channel CH4 to the input receiving unit ISG1 and is sequentially stored in the FIFO memory M1.
[0197] Then, at time T44 in the middle of the timing of the input receiving unit ISG1 receiving the AD conversion channel CH6, the conversion start of the input scanning group SG0 is triggered. Therefore, the input receiving unit ISG0 sets the control signal SGACT0 to 1. Then, the AD conversion of the scanning group SG1 is interrupted. Then, the input receiving unit ISG0 receives the AD conversion channels CH0 to CH2 of the scanning group SG0, and stores them sequentially in the FIFO memory M0.
[0198] Next, at time T45, the input receiving unit ISG0 accepts the completion of the conversion of the final AD conversion channel CH2 of the scanning group SG0. Therefore, the control signal SGACT0 is set to 0. Then, with the restart of the AD conversion of the scanning group SG1, the determination signal SGC1 is set to "1". Therefore, based on the value stored in the recovery buffer BF, the write pointer control unit WP1 is set at the pointer position ("0").
[0199] In this example, a case is shown in which the AD conversion channel CH7 is sequentially input from the AD conversion channel CH4 to the input receiving unit ISG1 and is sequentially stored in the FIFO memory M1.
[0200] Then, at time T46, the final AD conversion channel CH7 is stored in the FIFO memory M1, and the AD conversion of the scanning group SG1 is completed. Therefore, the control signal SGACT1 is set to 0.
[0201] Next, at time T48, the conversion start of the input scanning group SG1 is triggered, and the AD conversion channels of the scanning group SG1 are sequentially input to the input receiving unit ISG1. The input receiving unit ISG1 sets the control signal SGACT1 to 1.
[0202] Furthermore, as the control signal SGACT is set to "1", the determination signal SGA1 is set to "1". Therefore, the restoration buffer BF of the pointer control unit PCT#1 stores the pointer position written to the pointer control unit WP1. In this example, the restoration buffer BF stores and holds "4".
[0203] In this example, a case is shown in which the AD conversion channel CH5 is sequentially input from the AD conversion channel CH4 to the input receiving unit ISG1 and is sequentially stored in the FIFO memory M1.
[0204] Then, at time T49 in the middle of the timing of the input receiving unit ISG1 receiving the AD conversion channel CH6, the conversion start of the input scanning group SG0 is triggered. Therefore, the input receiving unit ISG0 sets the control signal SGACT0 to 1. Then, the AD conversion of the scanning group SG1 is interrupted. Then, the input receiving unit ISG0 receives the AD conversion channels CH0 to CH2 of the scanning group SG0, and stores them sequentially in the FIFO memory M0.
[0205] Next, at time T50, the input receiving unit ISG0 accepts the completion of the conversion of the final AD conversion channel CH2 of the scanning group SG0. Therefore, the control signal SGACT0 is set to 0. Then, with the restart of the AD conversion of the scanning group SG1, the determination signal SGC1 is set to "1". Therefore, the write pointer control unit WP1 sets the pointer position ("4") based on the value stored in the recovery buffer BF.
[0206] In this example, a case is shown in which the AD conversion channel CH7 is sequentially input from the AD conversion channel CH4 to the input receiving unit ISG1 and is sequentially stored in the FIFO memory M1.
[0207] Then, at time T51, the final AD conversion channel CH7 is stored in the FIFO memory M1, and the AD conversion of the scanning group SG1 is completed. Therefore, the control signal SGACT1 is set to 0.
[0208] In addition, the case where the FIFO memory M1 is in a full state at time T51 is shown. Therefore, the reading of the data of the FIFO memory M1 is performed.
[0209] FIG. 17 is a schematic diagram for explaining the interrupt processing of the FIFO memory M1 of the high priority scan group according to the second embodiment.
[0210] refer to Fig.17A In this example, it is assumed as an example that the FIFO memory M1 is provided with eight levels of storage areas.
[0211] A case where the AD conversion channels CH4 to CH7 are stored at time T46 is shown. Before reaching this state, the pointer of the FIFO memory M1 has been set at a position corresponding to the value ("0") stored in the restoration buffer BF at the time of two restarts.
[0212] refer to Fig. 17B , shows a case where the AD conversion channels CH4 to CH7 are stored at time T51. Before reaching this state, the pointer of the FIFO memory M1 is set at a position corresponding to the value ("4") stored in the restoration buffer BF at the time of one restart.
[0213] In the case of this example, the value of the pointer of the FIFO memory M1 is stored in the recovery buffer BF at the start, and the pointer of the FIFO memory M1 is set at a position corresponding to the value stored in the recovery buffer BF at the restart. Therefore, when AD conversion is interrupted and restarted, the value of the pointer in the FIFO memory M1 at the start is reset, so the data retained in the FIFO memory M1 at the time of interruption is reset, and unnecessary data does not remain in the FIFO memory M1.
[0214] Likewise, reading is performed when the FIFO memory M1 is in a full state. Therefore, the eight-level storage area of the FIFO memory M1 can be effectively utilized.
[0215] For example, it is desirable to set the number of stages of the FIFO memory M to an integral multiple of the total number of AD conversion channels of the scanning group SG. This makes it possible to fully utilize the storage area of the FIFO memory M.
[0216] Regarding the reading of the FIFO memory according to the second embodiment, the reading process is performed when the FIFO memory is in a full state, rather than after the last AD conversion of the scanning group SGn has been completed and the last AD conversion channel CH has been stored. Fig.12 The processing described in the flowchart is the same as that described in FIG. 1 , and thus a detailed description will not be repeated.
[0217] Fig.18 is a flowchart for explaining the flow of AD conversion processing according to the second embodiment.
[0218] refer to Fig.18 , the AD conversion of the scanning group SG1 starts (step ST61). At the start of this time, the recovery buffer BF of the pointer control unit PCT#1 stores and maintains the pointer position ("0") written to the pointer control unit WP1. Next, the AD conversion of the AD conversion channels CH4 to CH6 is completed (step ST62). The number of data blocks in the FIFO memory M1 is three. Next, the AD conversion of the scanning group SG0 starts (step ST63). Therefore, the AD conversion of the scanning group SG1 is interrupted. Next, the AD conversion of the scanning group SG0 is completed (step ST64). Next, the AD conversion of the scanning group SG1 is restarted (step ST65). At the time of this restart, in order to set the pointer at the pointer position ("0") stored in the recovery buffer BF, the number of data blocks in the FIFO memory M1 becomes 0. Next, the AD conversion of the AD conversion channels CH4 and CH5 is completed (step ST66). The number of data blocks in the FIFO memory M1 is two.
[0219] Next, the AD conversion of the scanning group SG0 starts (step ST67). Therefore, the AD conversion of the scanning group SG1 is interrupted. Next, the AD conversion of the scanning group SG0 is completed (step ST68). Next, the AD conversion of the scanning group SG1 is restarted (step ST69). At this restart, in order to set the pointer at the pointer position ("0") stored in the recovery buffer BF, the number of data blocks in the FIFO memory M1 becomes 0.
[0220] Next, the AD conversion of the AD conversion channels CH4 to CH7 is completed (step ST70). Next, the AD conversion of the scanning group SG1 is completed (step ST71). Next, the AD conversion of the scanning group SG1 starts (step ST72). At the start of this time, the recovery buffer BF of the pointer control unit PCT#1 stores and holds the pointer position ("4") of the write pointer control unit WP1.
[0221] Next, the AD conversion of the AD conversion channels CH4 and CH5 is completed (step ST73). The number of data blocks in the FIFO memory M1 is 2. Next, the AD conversion of the scanning group SG0 is started (step ST74). Therefore, the AD conversion of the scanning group SG1 is interrupted. Next, the AD conversion of the scanning group SG0 is completed (step ST75).
[0222] Next, AD conversion of the scanning group SG1 is restarted (step ST76). At this restart, the number of data blocks in the FIFO memory M1 becomes 0 in order to set the pointer at the pointer position ("4") stored in the restoration buffer BF.
[0223] Next, AD conversion of the AD conversion channels CH4 to CH7 is completed (step ST77). The number of data blocks in the FIFO memory M1 is 8. Next, AD conversion of the scanning group SG1 is completed (step ST78). Next, the data in the FIFO memory M1 is read (step ST79). Therefore, the number of data blocks in the FIFO memory M1 becomes 0.
[0224] When the AD conversion channel in the 8-stage FIFO memory M1 is interrupted in the case where the scan group SG1 is interrupted by the scan group SG0, the FIFO memory M1 is set at the pointer position stored in the recovery buffer BF at the time of restart, so the conversion result of the scan group SG1 before the interruption is not retained in the FIFO memory M1. Therefore, unnecessary data is not retained in the FIFO memory M1, and data reading and deletion processing of unnecessary data by software become unnecessary.
[0225] Therefore, this processing enables high-speed A / D conversion processing.
[0226] Note that in this example, a method of setting the pointer of the FIFO memory M1 at the pointer position stored in the recovery buffer BF at the time of restart has been explained, but the pointer of the FIFO memory M1 may be set at the pointer position stored in the recovery buffer BF at the timing of the interruption.
[0227] Application Examples
[0228] Fig.19 is a diagram for explaining the first application example.
[0229] refer to Fig.19 In this example, the following situation is shown: a motor 504 driving a load 506, a three-phase inverter 502 driving the motor 504, and an MCU 11A controlling the three-phase inverter 502 are provided. The motor 504 is provided with a rotation speed generator 509 for detecting the motor speed. In addition, the three-phase inverter 502 is provided with a current sensor 508 for detecting the current so as to detect the rotor position of the motor 504.
[0230] The detection value detected by the current sensor 508 is fed back to the MCU 11A. In addition, the detection value detected by the rotation speed generator 509 is fed back to the MCU 11A.
[0231] MCU 11A includes a CPU 120A that executes instruction calculations, a pulse generating circuit 500 that outputs PWM pulses to a three-phase inverter 502 based on the calculation results of CPU 120A, and an A / D conversion circuit 118A and an A / D conversion control circuit 125A that convert analog signals into digital values, where these analog signals are detection values of a current sensor 508 and a rotation speed generator 509.
[0232] For example, when data stored in the FIFO memory needs to be used immediately, the A / D conversion circuit 118A and the A / D conversion control circuit 125A described in the above-mentioned first embodiment can be applied.
[0233] Fig. 20 is a diagram for explaining the second application example.
[0234] refer to Fig. 20 , shows the following situation: an amplifier 510 that amplifies an analog signal 512 is provided, and an MCU 11B that receives a signal input from the amplifier 510 is provided.
[0235] The MCU 11B includes an A / D conversion circuit 118B and an A / D conversion control circuit 125B that convert the analog signal amplified by the amplifier 510 into a digital value, and a CPU 120B that performs arithmetic processing based on the converted digital signal.
[0236] For example, if the data stored in the FIFO memory does not need to be used immediately, the A / D conversion circuit 118B and the A / D conversion control circuit 125B described in the above-mentioned second embodiment may be applied.
[0237] Fig.21 is a diagram for explaining the third application example.
[0238] refer to Fig.21 , shows a voltage monitor 520 that provides a monitoring power supply 522, and a case of an MCU 11C. The MCU 11C includes an A / D conversion circuit 118C and an A / D conversion control circuit 125C that convert an analog signal monitored by the voltage monitor 520 into a digital value, and a CPU 120C that performs arithmetic processing based on the converted digital signal. As an example, the CPU 120C can perform abnormality detection based on the voltage value detected by the voltage monitor 520.
[0239] For example, in the case of abnormality detection as in this example, the A / D conversion circuit 118C and the A / D conversion control circuit 125C described in the above-mentioned first embodiment 1 or 2 can be applied.
[0240] Although the present disclosure has been specifically described above based on the embodiments, it goes without saying that the present disclosure is not limited to these embodiments and can be modified in various ways without departing from the gist of the present disclosure.
Claims
1. An A / D conversion control circuit, include: A scan group control unit controls multiple AD conversion channels using multiple scan groups with different priorities; as well as a FIFO unit provided corresponding to each of the plurality of scan groups, each scan group having a plurality of FIFO memories, the plurality of FIFO memories sequentially storing outputs from the scan group control unit for each corresponding scan group, Wherein, the scanning group control unit includes: an input receiving unit, receiving an AD conversion channel of a corresponding scanning group among the plurality of AD conversion channels according to an instruction, and outputting the AD conversion channel to the corresponding FIFO memory; and an arbitration unit that determines the timing of starting, interrupting and restarting the conversion of each of the plurality of scan groups, The FIFO unit further comprises a plurality of pointer control units, which are respectively provided corresponding to the plurality of FIFO memories, and Each of the pointer control units clears or changes the position of the write pointer / read pointer of the corresponding FIFO memory at the timing of any one of the start, the interruption and / or the restart of the corresponding scan group according to the priority of the scan group.
2. The A / D conversion control circuit according to claim 1, The corresponding FIFO memory performs a read process by using a read pointer according to reception of the last AD conversion channel of the corresponding scan group.
3. The A / D conversion control circuit according to claim 1, Each of the pointer control units includes a buffer that stores a position of the write pointer at the timing of the start of the corresponding scan group.
4. The A / D conversion control circuit according to claim 3, wherein each of the pointer control circuits instructs to store data based on a write pointer position stored in the buffer at the timing of the restart of the corresponding scan group.
5. The A / D conversion control circuit according to claim 3, The number of stages of the FIFO memory is set to an integral multiple of the total number of AD conversion channels included in the corresponding scan group.
6. The A / D conversion control circuit according to claim 1, Each of the control units outputs a clear signal, wherein the clear signal is based on a combination of a timing signal at the start, interruption and restart of conversion of the corresponding scan group from the arbitration unit and a clear timing selection signal, and clears or changes the point of the write pointer / write pointer of the corresponding FIFO memory at the timing of any one of the start, interruption and restart of the corresponding scan group.
7. The A / D conversion control circuit according to claim 1, The arbitration unit determines the timing of conversion start, interruption and restart of each of the plurality of scan groups based on the rise and fall of the conversion start trigger of each of the plurality of scan groups.
Citation Information
Patent Citations
Semiconductor integrated circuit device and data processing system
JP2013179568A
Work vehicle
JP2023092157A
