Multichannel sampling method, multichannel sampling device, and computer-readable storage medium

By grouping and prioritizing, the high cost problem of multi-channel mixed sampling in ADC is solved, and efficient multi-channel sampling with simple circuit configuration is achieved.

CN116208156BActive Publication Date: 2026-05-29SUZHOU WATECH ELECTRONICS CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SUZHOU WATECH ELECTRONICS CO LTD
Filing Date
2022-12-30
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In existing technologies, ADCs are costly and have complex circuits when implementing multi-channel mixed sampling, and cannot effectively handle the multi-channel arbitration requirements in complex scenarios.

Method used

By acquiring trigger source information from multiple sampling channels, the channels are divided into multiple channel groups according to the target application scenario. The priority of each channel group and multiple channel groups is determined by the first preset rule and the second preset rule, and the conversion signal is output sequentially.

Benefits of technology

It enables efficient multi-channel mixed sampling with a simple circuit configuration, reducing costs and simplifying circuit design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116208156B_ABST
    Figure CN116208156B_ABST
Patent Text Reader

Abstract

The application provides a multi-channel sampling method, a multi-channel sampling device and a computer readable storage medium. The method comprises the following steps: obtaining trigger source information corresponding to a plurality of sampling channels of a target ADC module; determining a plurality of channel groups corresponding to the plurality of sampling channels according to a target application scenario; determining a first priority of at least one sampling channel included in each channel group according to a first preset rule; determining a second priority of the plurality of channel groups according to a second preset rule; and in the case that the trigger source information indicates that the plurality of sampling channels include a plurality of target sampling channels, sequentially outputting a plurality of conversion signals corresponding to the plurality of target sampling channels according to the first priority and the second priority. Through the application, the problem of high cost when the ADC implements multi-channel hybrid sampling is solved, and the effect of ADC hybrid sampling can be achieved by only simple circuit configuration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of analog-to-digital conversion, and more specifically, to a multi-channel sampling method, a multi-channel sampling device, and a computer-readable storage medium. Background Technology

[0002] For multi-channel input selection in analog-to-digital converters (ADCs), most existing designs include a hardware arbitration module. This module allows for time-division multiplexing of a channel for sampling. After the previous channel's sampling and conversion is complete, determining the next selected input channel often involves multi-channel arbitration. If only one input channel is currently being sampled, arbitration is unnecessary; the corresponding channel is switched and sampled directly. However, if multiple input channels are simultaneously being sampled, how the hardware determines which channel should be sampled first depends heavily on the application scenario.

[0003] For complex scenarios, such as some channels needing to have high priority and be able to specify corresponding priorities, some channels needing equal access, and some channels cycling in groups, such applications require classifying multiple channels and maintaining corresponding arbitration mechanisms for different categories of channels. Currently available ADCs cannot meet the requirements of such mixed applications and can only be implemented using multi-channel ADCs, which is costly and complex in design. Summary of the Invention

[0004] The main objective of this application is to provide a multi-channel sampling method, a multi-channel sampling device, and a computer-readable storage medium to at least solve the problem of high cost when implementing multi-channel mixed sampling in ADCs in the prior art.

[0005] To achieve the above objectives, according to one aspect of this application, a multi-channel sampling method is provided, comprising: acquiring trigger source information corresponding to multiple sampling channels of a target ADC module, wherein the trigger source information includes the time when the trigger sources corresponding to the multiple sampling channels send trigger signals; determining multiple channel groups corresponding to the multiple sampling channels according to a target application scenario, wherein each channel group includes at least one sampling channel, and each channel group includes different sampling channels; determining a first priority of the at least one sampling channel included in each channel group according to a first preset rule; determining a second priority of the multiple channel groups according to a second preset rule; and, when the trigger source information indicates that the multiple sampling channels include multiple target sampling channels, sequentially outputting multiple conversion signals corresponding to the multiple target sampling channels according to the first priority and the second priority, wherein the multiple target sampling channels are sampling channels among the multiple sampling channels corresponding to multiple trigger sources that simultaneously send trigger signals, and the multiple conversion signals are used to instruct the target ADC module to perform sampling conversion through the multiple target sampling channels.

[0006] Optionally, obtaining trigger source information corresponding to multiple sampling channels of the target ADC module includes: obtaining multiple trigger signals that correspond one-to-one with multiple sampling channels of the target ADC module; determining the transmission time of the multiple trigger signals; and generating trigger source information based on the correspondence between the transmission time of the multiple trigger signals and the multiple sampling channels.

[0007] Optionally, according to the first preset rule including the first arbitration mechanism, in the case of a first channel group including multiple sampling channels among multiple channel groups, the first priority of at least one sampling channel included in each channel group is determined according to the first preset rule, including: determining the first priority of multiple sampling channels in the first channel group according to the first arbitration mechanism, wherein the first arbitration mechanism includes preset priorities corresponding to the multiple sampling channels in the first channel group.

[0008] Optionally, the first preset rule further includes a second arbitration mechanism. In the case where there is a second channel group including multiple sampling channels among multiple channel groups, the first priority of at least one sampling channel included in each channel group is determined according to the first preset rule. The mechanism further includes: obtaining multiple channel numbers that correspond one-to-one with the multiple sampling channels in the second channel group; and determining the first priority of the multiple sampling channels in the second channel group according to the second arbitration mechanism, wherein the second arbitration mechanism includes a first preset order of the multiple channel numbers.

[0009] Optionally, according to the second arbitration mechanism, determining the first priority of at least one sampling channel included in each channel group includes: determining multiple priority levels corresponding to multiple sampling channels in the second channel group according to the order of multiple channel numbers, wherein the multiple priority levels correspond one-to-one with the multiple sampling channels in the second channel group, or each of the multiple priority levels corresponds to one or more sampling channels in the second channel group; generating the first priority according to the multiple priority levels corresponding to the multiple sampling channels in the second channel group.

[0010] Optionally, determining the first priority of at least one sampling channel in each channel group according to a first preset rule further includes: determining whether a first indication signal is received, wherein the first indication signal is used to indicate the determination of the first priority of multiple sampling channels in a third channel group among multiple channel groups according to a first arbitration mechanism; and if the first indication signal is not received, determining the first priority of multiple sampling channels in the third channel group according to a second arbitration mechanism.

[0011] Optionally, according to a second preset rule, the second priority of multiple channel groups is determined, including: obtaining priority configuration information corresponding to multiple channel groups; and determining the second priority of multiple channel groups based on the priority configuration information.

[0012] Optionally, according to a first priority and a second priority, multiple conversion signals corresponding to multiple target sampling channels are sequentially output, including: determining whether a second indication signal is received, wherein the second indication signal is used to indicate the second priority of multiple channel groups determined according to priority configuration information; if the second indication signal is not received, obtaining multiple channel numbers corresponding one-to-one with multiple sampling channels in multiple channel groups; determining multiple group numbers corresponding one-to-one with multiple channel groups according to a first preset order of multiple channel numbers, wherein, according to the first preset order, the first sampling channel in the multiple sampling channels corresponding to each channel group is the first sampling channel, and when multiple channel groups are sorted in ascending order according to multiple group numbers, the channel numbers of multiple first sampling channels corresponding to multiple channel groups are incremented; and sequentially outputting multiple conversion signals corresponding to multiple target sampling channels according to the first preset order and the second preset order of multiple group numbers.

[0013] According to another aspect of this application, a multi-channel sampling device is provided, comprising: an acquisition module, configured to acquire trigger source information corresponding to multiple sampling channels of a target ADC module, wherein the trigger source information includes the time when the trigger sources corresponding to the multiple sampling channels send trigger signals; a first determination module, configured to determine multiple channel groups corresponding to the multiple sampling channels according to a target application scenario, wherein each channel group includes at least one sampling channel, and each channel group includes different sampling channels; a second determination module, configured to determine a first priority of the at least one sampling channel included in each channel group according to a first preset rule; a third determination module, configured to determine a second priority of the multiple channel groups according to a second preset rule; and an output module, configured to sequentially output multiple conversion signals corresponding to the multiple target sampling channels according to the first priority and the second priority when the trigger source information indicates that the multiple sampling channels include multiple target sampling channels, wherein the multiple target sampling channels are sampling channels among the multiple sampling channels corresponding to multiple trigger sources that simultaneously send trigger signals, and the multiple conversion signals are used to instruct the target ADC module to perform sampling conversion through the multiple target sampling channels.

[0014] According to another aspect of this application, a computer-readable storage medium is provided, the computer-readable storage medium including a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to perform any of the above-described multi-channel sampling methods.

[0015] According to another aspect of this application, a processor is provided for running a program, wherein the program executes any of the above-mentioned multi-channel sampling methods during runtime.

[0016] According to another aspect of this application, an electronic device is provided, comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include a multi-channel sampling method for performing any of the above.

[0017] Compared with the existing technology where multi-channel mixed sampling can only be implemented using multiple ADCs, resulting in high costs, this solution, after obtaining the trigger source information of multiple sampling channels, divides the multiple sampling channels into multiple channel groups according to the target application scenario. Through a first preset rule and a second preset rule, the first priority of multiple sampling channels in each channel group and the second priority of multiple channel groups are determined respectively. Based on the first priority and the second priority, multiple conversion signals corresponding to multiple target sampling channels are output sequentially. In this way, the ADC can achieve sequential output of conversion signals of multiple sampling channels by simply setting the first preset rule and the second preset rule. This solves the problem of high cost and complex circuits caused by the need to use multiple ADCs when implementing multi-channel mixed sampling, and achieves the effect of ADC multi-channel mixed sampling with only simple circuit configuration. Attached Figure Description

[0018] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:

[0019] Figure 1 A hardware structure block diagram of a mobile terminal performing a multi-channel sampling method according to an embodiment of this application is shown;

[0020] Figure 2 A flowchart illustrating a multi-channel sampling method according to an embodiment of this application is shown;

[0021] Figure 3 A control circuit structure diagram of a multi-channel sampling method according to an embodiment of this application is shown;

[0022] Figure 4 A structural diagram of an arbitration selector in a control circuit of a multi-channel sampling method provided according to an embodiment of this application is shown.

[0023] Figure 5A structural diagram of a multi-channel sampling device according to an embodiment of this application is shown;

[0024] Figure 6 A structural diagram of the acquisition module in a multi-channel sampling method according to an embodiment of this application is shown;

[0025] Figure 7 A structural diagram of a second determining module in a multi-channel sampling method provided according to an embodiment of this application is shown;

[0026] Figure 8 A structural diagram of a second determining submodule in a multi-channel sampling method provided according to an embodiment of this application is shown;

[0027] Figure 9 A structural diagram of the second determining submodule in another multi-channel sampling method provided according to an embodiment of this application is shown;

[0028] Figure 10 A structural diagram of a third determining module in a multi-channel sampling method provided according to an embodiment of this application is shown;

[0029] Figure 11 A structural diagram of the output module in a multi-channel sampling method provided according to an embodiment of this application is shown. Detailed Implementation

[0030] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0031] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0032] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0033] For ease of description, the following explains some of the nouns or terms used in the embodiments of this application:

[0034] ADC: Analog-to-Digital Converter. A circuit or device that converts an analog input signal into a digital signal.

[0035] As described in the background section, existing technologies can only implement multi-channel mixed sampling using multi-channel ADCs. To address the high cost associated with using multi-channel ADCs, embodiments of this application provide a multi-channel sampling method.

[0036] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.

[0037] The methods and embodiments provided in this application can be executed on a mobile terminal, computer terminal, or similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure block diagram of a mobile terminal using a multi-channel sampling method according to an embodiment of this application. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0038] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the device information display method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thus implementing the above-described method. The memory 104 may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. The transmission device 106 is used to receive or send data via a network. Specific examples of the aforementioned networks may include wireless networks provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0039] This embodiment provides a multi-channel sampling method that runs on a mobile terminal, computer terminal, or similar computing device. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Also, although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than that shown here.

[0040] Figure 2 This is a flowchart of a multi-channel sampling method according to an embodiment of this application. For example... Figure 2 As shown, the method includes the following steps:

[0041] Step S201: Obtain trigger source information corresponding to multiple sampling channels of the target ADC module, wherein the trigger source information includes the time when the trigger source corresponding to the multiple sampling channels sends the trigger signal;

[0042] Specifically, commercially available ADC (Analog-to-Digital Converter) modules integrated into ASICs (Application Specific Integrated Circuits) or SOCs (System on Chips) generally employ specific channel arbitration mechanisms for controlling multi-channel circuits. These mechanisms include polling and fixed priority mechanisms to switch between channels. Since the number of channels, sampling accuracy, and sampling rate are technically mutually constrained, most commercially available ADC designs balance these parameters, resulting in a limited number of channels; currently, 16-channel input is commonly used.

[0043] The ADC module starts upon triggering by a trigger source, sampling signals from multiple input channels. Since the ADC module's channels can operate in either regular or injected mode, the corresponding trigger sources are regular and injected, respectively. Trigger sources can be broadly categorized into software triggers and hardware triggers, used to set the aforementioned regular and injected channels, respectively. For hardware triggers, the ADC only starts when an external event occurs. External events can include: timer compare / capture times, event triggers from internal hardware peripheral modules, and external input pins, etc. Software triggers generally refer to initiating a trigger source request through a software program. Therefore, this application does not specifically limit the types of trigger sources mentioned above.

[0044] Step S202: Based on the target application scenario, determine multiple channel groups corresponding to multiple sampling channels, wherein each channel group includes at least one sampling channel, and each channel group includes different sampling channels;

[0045] Specifically, based on the requirements of specific target application scenarios, multiple sampling channels corresponding to multiple trigger sources are classified. For example, multiple sampling channels within the same channel group can have the same trigger source type. Each channel group includes one or more sampling channels, and each channel group includes different sampling channels.

[0046] Step S203: Determine the first priority of at least one sampling channel included in each channel group according to the first preset rule;

[0047] Specifically, the first preset rule is used to specify the priority of multiple sampling channels within a multiple channel group, thereby obtaining the first priority.

[0048] Step 204: Determine the second priority of multiple channel groups according to the second preset rule;

[0049] Specifically, the second preset rule is used to specify the priority of multiple channel groups, thereby obtaining the second priority.

[0050] Step 205: When the trigger source information indicates that multiple sampling channels include multiple target sampling channels, multiple conversion signals corresponding to the multiple target sampling channels are sequentially output according to the first priority and the second priority. The multiple target sampling channels are the sampling channels among the multiple sampling channels that correspond to the multiple trigger sources that send trigger signals at the same time. The multiple conversion signals are used to instruct the target ADC module to perform sampling conversion through the multiple target sampling channels.

[0051] Specifically, each target sampling channel corresponds to a conversion signal, which instructs the target ADC module to perform signal sampling and conversion for the corresponding channel. When the trigger source information indicates multiple sampling channels, including multiple target sampling channels, i.e., multiple trigger sources output trigger signals simultaneously, and there are also multiple corresponding channel groups, after determining the first priority and the second priority, the multiple conversion signals corresponding to the multiple target sampling channels are output sequentially according to the first priority and the second priority.

[0052] In this embodiment, compared with the existing technology where multi-channel mixed sampling can only be implemented using multiple ADCs, resulting in high costs, this solution, after obtaining the trigger source information of multiple sampling channels, divides the multiple sampling channels into multiple channel groups according to the target application scenario. Through a first preset rule and a second preset rule, the first priority of multiple sampling channels in each channel group and the second priority of multiple channel groups are determined respectively. Based on the first priority and the second priority, multiple conversion signals corresponding to multiple target sampling channels are output sequentially. In this way, the ADC can achieve sequential output of conversion signals of multiple sampling channels by simply setting the first preset rule and the second preset rule. This solves the problem of high cost and complex circuits caused by the need to use multiple ADCs to implement multi-channel mixed sampling, and achieves the effect of ADC multi-channel mixed sampling with only simple circuit configuration.

[0053] The execution subject of this method can be any compiler in the prior art, specifically, a Verilog compiler.

[0054] In specific implementation, step S201 can be achieved through the following steps: acquiring multiple trigger signals that correspond one-to-one with multiple sampling channels of the target ADC module; determining the transmission time of the multiple trigger signals; and generating trigger source information based on the correspondence between the transmission time of the multiple trigger signals and the multiple sampling channels. Each sampling channel in this method has multiple trigger signals that correspond one-to-one with it. These multiple trigger signals are generated by multiple trigger sources, so there is a one-to-one correspondence between the transmission time of the multiple sampling channels and the transmission time of the trigger signals from the multiple trigger sources. Based on this correspondence, trigger source information is generated, thus accurately obtaining the transmission time of the trigger signals from the trigger sources, ensuring that multiple channels are sampled according to priority when the trigger times are the same.

[0055] To set the priority of multiple sampling channels in multiple channel groups, step S203 of this application can be implemented through the following steps: In the case of a first channel group comprising multiple sampling channels among multiple channel groups, according to a first preset rule including a first arbitration mechanism, determining the first priority of at least one sampling channel in each channel group according to the first preset rule includes: determining the first priority of multiple sampling channels in the first channel group according to the first arbitration mechanism, wherein the first arbitration mechanism includes preset priorities corresponding to the multiple sampling channels in the first channel group. This method, in the case of a first channel group comprising multiple sampling channels among multiple channel groups, determines the first priority of at least one sampling channel in the first channel group through the first arbitration mechanism of the first preset rule, i.e., the preset priorities corresponding to the multiple sampling channels in the first channel group, thereby determining the priority of each sampling channel in the first channel group.

[0056] Specifically, the control circuit of this application is as follows: Figure 3 As shown, the core control circuit consists of an arbitration selector and a configurator. The arbitration selector determines the priority of multiple sampling channels that are triggered simultaneously and decides the output of the conversion signals of multiple sampling channels according to the configuration of the configurator. For example, channels 1, 2, 3, ..., n are different sampling channels that receive trigger signals from the same or different trigger sources. After the configuration of the configurator takes effect, when the trigger sources of multiple sampling channels are triggered simultaneously, the arbitration selector causes the arbitration circuit of the corresponding channel group of each triggered sampling channel to start working and output the arbitration result respectively. Finally, the arbitration selector outputs the sampling channel of the final arbitration, and the remaining channels wait for re-arbitration.

[0057] The control circuit of the arbitration selector is as follows: Figure 4As shown, Group 1, Group 2, Group 3, ..., Group n are different channel groups, configured by the channel grouper. This grouping classifies all corresponding channels according to application scenario requirements, performs arbitration, and outputs the arbitration results. For example, Group 1 includes sampling channel 1, sampling channel 2, and sampling channel 3; Group 2 includes sampling channel 4, sampling channel 5, and sampling channel 6; and other sampling channels are assigned to Group 3. After input to the configurator, the priority configurator assigns priority to all channels within each group, i.e., sets the preset priority. If no preset priority is set, the default is a round-robin mechanism, with the loop configurator specifying the looping method. The first arbitration mechanism is the preset priority set by the priority configurator. For example, in Group 1, the priority configurator sets the preset priority of sampling channel 1, sampling channel 2, and sampling channel 3 as follows: sampling channel 2 has the highest priority, sampling channel 1 has the second highest priority, and sampling channel 3 has the lowest priority.

[0058] Step S203 above can also be implemented in other ways, for example: according to the first preset rule, it also includes a second arbitration mechanism. In the case where there is a second channel group comprising multiple sampling channels among multiple channel groups, according to the first preset rule, the first priority of at least one sampling channel included in each channel group is determined, and the method further includes: obtaining multiple channel numbers corresponding one-to-one with the multiple sampling channels in the second channel group; and determining the first priority of the multiple sampling channels in the second channel group according to the second arbitration mechanism, wherein the second arbitration mechanism includes a first preset order of the multiple channel numbers. In the case where there is a second channel group comprising multiple sampling channels among multiple channel groups, this method determines the first priority of the multiple sampling channels in the second channel group through the first preset order of the multiple channel numbers corresponding one-to-one with the multiple sampling channels in the second channel group, thereby setting the priority of each sampling channel in the second channel group.

[0059] Specifically, the first channel group and the second channel group mentioned above may be the same or different.

[0060] Specifically, the second arbitration mechanism is a round-robin approach, and the first preset order is used to instruct the order generated by multiple sampling channels in a polling manner. For example, multiple sampling channels in the second channel group are not assigned priority and are queried according to the first preset order. The first preset order can be an ascending or descending order of the channel numbers corresponding to the multiple sampling channels in the second channel group. That is, this application does not impose specific restrictions on the arrangement of the aforementioned first preset order.

[0061] In some embodiments, step S203 above can also be implemented through the following steps: determining the first priority of at least one sampling channel included in each channel group according to the second arbitration mechanism, including: determining multiple priority levels corresponding to multiple sampling channels in the second channel group according to the sorting of multiple channel numbers, wherein the multiple priority levels correspond one-to-one with the multiple sampling channels in the second channel group, or each of the multiple priority levels corresponds to one or more sampling channels in the second channel group; generating a first priority according to the multiple priority levels corresponding to the multiple sampling channels in the second channel group. This method determines multiple priority levels corresponding one-to-one with one or more sampling channels in the second channel group by sorting multiple channel numbers, thus determining the first priority based on the priority levels.

[0062] Specifically, the second channel group can also have its looping pattern set via a loop configurator. For example, if the second channel group has 8 channels, it can continuously sample 2 channels each time it is triggered, i.e., the step size is 2. The next trigger will then loop through the next 2 channels, and so on. That is, each priority level can correspond to one or more sampling channels in the second channel group. If the step size is 2, then each priority level corresponds to 2 sampling channels. Multiple priority levels correspond one-to-one with each pair of sampling channels. In other words, this application does not impose a specific limit on the number of sampling channels corresponding to each of the above priority levels.

[0063] In some embodiments, step S203 above can also be implemented through the following steps: determining the first priority of at least one sampling channel included in each channel group according to a first preset rule, further including: determining whether a first indication signal is received, wherein the first indication signal is used to indicate the determination of the first priority of multiple sampling channels in a third channel group among multiple channel groups according to a first arbitration mechanism; and determining the first priority of multiple sampling channels in the third channel group according to a second arbitration mechanism if the first indication signal is not received. This method determines the first priority of multiple sampling channels in the third channel group according to the first arbitration mechanism when the first indication signal is received, and determines the first priority of multiple sampling channels in the third channel group according to the second arbitration mechanism if the first indication signal is not received. This allows for more flexible sampling methods for multiple sampling channels, meeting different sampling requirements.

[0064] Specifically, since the first indication signal is used to indicate the first priority of multiple sampling channels in the third channel group according to the first arbitration mechanism, when the third channel group receives the first indication signal, the first priority of multiple sampling channels in the third channel group is set according to the first arbitration mechanism, that is, through the priority configurator; when the third channel group does not receive the first indication signal, the first priority of multiple sampling channels in the third channel group is determined according to the second arbitration mechanism, that is, the first priority of multiple sampling channels in the third channel group is set in a cyclic manner.

[0065] In some embodiments, step S204 can be implemented through the following steps: determining the second priority of multiple channel groups according to a second preset rule, including: obtaining priority configuration information corresponding to the multiple channel groups; and determining the second priority of the multiple channel groups based on the priority configuration information. This method determines the second priority of multiple channel groups by obtaining the priority configuration information of each channel group. This allows for further setting of the priority of multiple channel groups after prioritizing multiple sampling channels within those groups, ensuring more efficient sampling of data from multiple sampling channels.

[0066] Specifically, the second priority is used to specify the priority of multiple channel groups, and the priority among multiple channel groups is also specified through the priority configurator. For example, group 1, group 2 and group 3 are different channel groups, with group 2 having the highest priority, group 3 having the second highest priority, and group 1 having the lowest priority.

[0067] In some embodiments, step S205 can be implemented through the following steps: sequentially outputting multiple conversion signals corresponding to multiple target sampling channels according to a first priority and a second priority, including: determining whether a second indication signal is received, wherein the second indication signal is used to indicate the second priority of multiple channel groups according to priority configuration information; if the second indication signal is not received, obtaining multiple channel numbers corresponding one-to-one with multiple sampling channels in multiple channel groups; determining multiple group numbers corresponding one-to-one with multiple channel groups according to a first preset order of the multiple channel numbers, wherein, according to the first preset order, the first sampling channel in the multiple sampling channels corresponding to each channel group is the first sampling channel, and when multiple channel groups are sorted in ascending order according to multiple group numbers, the channel numbers of multiple first sampling channels corresponding to multiple channel groups are incremented; sequentially outputting multiple conversion signals corresponding to multiple target sampling channels according to the first preset order and the second preset order of the multiple group numbers. In the absence of a second indication signal, this method determines multiple group numbers corresponding one-to-one with multiple channel groups according to a first preset order of multiple channel numbers, and sequentially outputs multiple conversion signals corresponding to multiple target sampling channels according to the first preset order and the second preset order of multiple group numbers. In this way, multiple conversion signals corresponding to target sampling channels can be output in the above manner even without receiving a second indication signal, making the sampling method more flexible and applicable to a variety of practical scenarios.

[0068] Specifically, since the second indication signal is used to indicate the second priority of multiple channel groups based on priority configuration information, when the second indication signal is received, the second priority of multiple channel groups is determined according to the priority configuration information of the priority configurator; when the second indication signal is not received, the sequence numbers of multiple channels are obtained, and the sequence numbers of multiple channel groups are determined according to a first preset order. When the sequence numbers of multiple channel groups are sorted in ascending order, the channel sequence numbers of multiple first sampling channels corresponding to multiple channel groups are incremented; similarly, when the sequence numbers of multiple channel groups are sorted in descending order, the channel sequence numbers of multiple first sampling channels corresponding to multiple channel groups are decremented, thereby obtaining the second preset order of the multiple group sequence numbers, and outputting multiple conversion signals corresponding to multiple target sampling channels in the above order. In the above embodiment, when a certain channel in a group is sampled and converted, the priority of all channels in that group is reduced to the lowest, and they must wait until all other groups have been polled once before continuing.

[0069] To enable those skilled in the art to better understand the technical solution of this application, the implementation process of the multi-channel sampling method of this application will be described in detail below with reference to specific embodiments.

[0070] This embodiment relates to a specific multi-channel sampling method, such as... Figure 3 and Figure 4 As shown, it includes the following steps:

[0071] Step S1: Figure 4 The arbitration mechanisms for Group 1, Group 2, ..., Group n are configured by the channel grouper. This means that all corresponding sampling channels are grouped according to the application scenario requirements, and channels within the same group have the same arbitration mechanism. For example, sampling channels 1, 2, and 3 are assigned to Group 1, channels 4, 5, and 6 are assigned to Group 2, and the other channels are assigned to Group 3.

[0072] Step S2: Use the priority configurator to assign priorities to all channels within each group (first arbitration mechanism). If no priority is specified, the default is a round-robin mechanism (second arbitration mechanism). For example, in group 1, channels 1, 2, and 3 are configured with channel 2 having the highest priority, channel 1 the next highest, and channel 3 the lowest. Group 2, if no priority is specified, defaults to a round-robin mechanism. Group 3 specifies the looping method using the loop configurator. For example, if group 3 has 8 channels, it can continuously sample 2 channels (i.e., step) each time it is triggered, and then loop through the next 2 channels again, repeating the cycle.

[0073] Step S3: Specify the priority among channel groups using the priority configurator (after receiving the second indication signal). If not specified (without receiving the second indication signal), group polling will be performed by default (i.e., after a channel in a group is sampled and converted, the priority of all channels in that group drops to the lowest level, and they must wait until all other groups have been polled once before continuing). For example: Group 2 has the highest priority, Group 3 has the next highest priority, and Group 1 has the lowest priority.

[0074] Step S4: If sampling channels 2, 4, 5, 7, and 8 are triggered, then since group 2 has the highest priority, channels 4 and 5 have the highest priority. Since the group uses a polling mechanism, channel 4 is sampled and converted first, then channel 5 is sampled and converted. Then, since group 1 has the highest priority, channel 2 is sampled and converted. Next, since group 3 has the lowest priority, channels 7 and 8 are sampled consecutively.

[0075] Step S5: If channel 4 is triggered again when channel 4 is being converted, then in group 2, after channel 4 is converted, the channel 4 that is triggered again must wait until channel 5 is completed before it can continue to sample channel 4 again. This is the polling mechanism configured in group 2.

[0076] Step S6: If Channel 1 and Channel 2 are triggered when Channel 2 is sampled and converted, then according to the fixed priority mechanism of Group 1, after Channel 2 is converted, Channel 2 will continue to be sampled, and then Channel 1 will be sampled.

[0077] Step S7: For the cyclic arbitration mechanism of group 3, each trigger completes the continuous sampling of the channel with step 2. That is, after the first trigger, channels 7 and 8 are sampled and converted in sequence, and after the next trigger, channels 9 and 10 are sampled and converted in sequence, and so on.

[0078] This application also provides a multi-channel sampling device. It should be noted that the multi-channel sampling device of this application can be used to execute the multi-channel sampling method provided in this application. This device is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0079] The following describes the multi-channel sampling device provided in the embodiments of this application.

[0080] Figure 5 This is a schematic diagram of a multi-channel sampling device according to an embodiment of this application. Figure 5 As shown, the device includes:

[0081] The acquisition module 10 is used to acquire trigger source information corresponding to multiple sampling channels of the target ADC module, wherein the trigger source information includes the time when the trigger source corresponding to the multiple sampling channels sends the trigger signal;

[0082] The first determining module 20 is used to determine multiple channel groups corresponding to the multiple sampling channels according to the target application scenario, wherein each channel group includes at least one sampling channel and each channel group includes different sampling channels.

[0083] The second determining module 30 is used to determine the first priority of the at least one sampling channel included in each channel group according to the first preset rule;

[0084] The third determining module 40 is used to determine the second priority of the plurality of channel groups according to the second preset rule;

[0085] The output module 50 is configured to, when the trigger source information indicates that the plurality of sampling channels include a plurality of target sampling channels, sequentially output a plurality of conversion signals corresponding to the plurality of target sampling channels according to the first priority and the second priority, wherein the plurality of target sampling channels are sampling channels among the plurality of sampling channels corresponding to a plurality of trigger sources that simultaneously send trigger signals, and the plurality of conversion signals are used to instruct the target ADC module to perform sampling conversion through the plurality of target sampling channels.

[0086] Specifically, commercially available ADC (Analog-to-Digital Converter) modules integrated into ASICs (Application Specific Integrated Circuits) or SOCs (System on Chips) generally employ specific channel arbitration mechanisms for controlling multi-channel circuits. These mechanisms include polling and fixed priority mechanisms to switch between channels. Since the number of channels, sampling accuracy, and sampling rate are technically mutually constrained, most commercially available ADC designs balance these parameters, resulting in a limited number of channels; currently, 16-channel input is commonly used.

[0087] The ADC module starts up upon triggering by a trigger source, sampling signals from multiple input channels. Since the ADC module's channels can operate in either regular or injected mode, the corresponding trigger sources are regular and injected trigger sources, respectively. Trigger sources can be broadly categorized into software triggers and hardware triggers, used to set the aforementioned regular and injected channels, respectively. For hardware triggers, the ADC only starts when an external event occurs. External events can include: timer compare / capture times, ADC triggering by a high-precision timer, and external input pins, etc. Therefore, this application does not specifically limit the types of trigger sources mentioned above.

[0088] Specifically, based on the requirements of specific target application scenarios, multiple sampling channels corresponding to multiple trigger sources are classified. For example, multiple sampling channels within the same channel group can have the same trigger source type. Each channel group includes one or more sampling channels, and each channel group includes different sampling channels.

[0089] Specifically, the first preset rule is used to specify the priority of multiple sampling channels within a multiple channel group, thereby obtaining the first priority.

[0090] Specifically, the second preset rule is used to specify the priority of multiple channel groups, thereby obtaining the second priority.

[0091] Specifically, each target sampling channel corresponds to a conversion signal, which instructs the target ADC module to perform signal sampling and conversion for the corresponding channel. When the trigger source information indicates multiple sampling channels, including multiple target sampling channels, i.e., multiple trigger sources output trigger signals simultaneously, and there are also multiple corresponding channel groups, after determining the first priority and the second priority, the multiple conversion signals corresponding to the multiple target sampling channels are output sequentially according to the first priority and the second priority.

[0092] In this embodiment, compared with the existing technology where multi-channel mixed sampling can only be implemented using multiple ADCs, resulting in high costs, this solution, after obtaining the trigger source information of multiple sampling channels, divides the multiple sampling channels into multiple channel groups according to the target application scenario. Through a first preset rule and a second preset rule, the first priority of multiple sampling channels in each channel group and the second priority of multiple channel groups are determined respectively. According to the first priority and the second priority, multiple conversion signals corresponding to multiple target sampling channels are output sequentially. In this way, the ADC can achieve sequential output of conversion signals of multiple sampling channels by simply setting the first preset rule and the second preset rule. This solves the problem of high cost and complex circuits caused by the need to use multiple ADCs to implement multi-channel mixed sampling, and achieves the effect of ADC multi-channel mixed sampling with only simple circuit configuration.

[0093] The execution entity of this device can be any compiler in the prior art, specifically, a Verilog compiler.

[0094] In the specific implementation process, such as Figure 6 As shown, the acquisition module 10 includes: a first acquisition submodule 11, a first determination submodule 12, and a first generation submodule 13. The first acquisition submodule is used to acquire multiple trigger signals that correspond one-to-one with the multiple sampling channels of the target ADC module; the first determination submodule is used to determine the transmission time of the multiple trigger signals; and the first generation submodule is used to generate trigger source information based on the correspondence between the transmission time of the trigger signals and the multiple sampling channels. Each sampling channel of this device has multiple trigger signals that correspond one-to-one with it. These multiple trigger signals are generated by multiple trigger sources, so there is a one-to-one correspondence between the transmission times of the multiple sampling channels and the trigger signals of the multiple trigger sources. Based on this correspondence, trigger source information is generated, thus accurately obtaining the time when the trigger source sends the trigger signal, ensuring that multiple channels are sampled according to priority when the trigger times are the same.

[0095] To prioritize multiple sampling channels within multiple channel groups, a second determining module, according to a first preset rule and including a first arbitration mechanism, determines the first priority of at least one sampling channel in each channel group according to the first preset rule. This includes: determining the first priority of multiple sampling channels in the first channel group according to the first arbitration mechanism, wherein the first arbitration mechanism includes preset priorities corresponding to the multiple sampling channels in the first channel group. When the device has a first channel group with multiple sampling channels, it determines the first priority of at least one sampling channel in the first channel group through the first arbitration mechanism of the first preset rule, i.e., the preset priorities corresponding to the multiple sampling channels in the first channel group, thereby determining the priority of each sampling channel in the first channel group.

[0096] like Figure 7 As shown, the second determining module further includes a second acquisition submodule 21 and a second determining submodule 22. According to the first preset rule, it also includes a second arbitration mechanism. In the case where there is a second channel group comprising multiple sampling channels among multiple channel groups, the first priority of at least one sampling channel in each channel group is determined according to the first preset rule. The second acquisition submodule is used to acquire multiple channel numbers corresponding one-to-one with the multiple sampling channels in the second channel group; the second determining submodule is used to determine the first priority of the multiple sampling channels in the second channel group according to the second arbitration mechanism, wherein the second arbitration mechanism includes a first preset order of the multiple channel numbers. When there is a second channel group comprising multiple sampling channels among multiple channel groups, the device determines the first priority of the multiple sampling channels in the second channel group through the first preset order of the multiple channel numbers corresponding one-to-one with the multiple sampling channels in the second channel group, thereby setting the priority of each sampling channel in the second channel group.

[0097] Specifically, the first channel group and the second channel group mentioned above may be the same or different.

[0098] Specifically, the second arbitration mechanism is a round-robin approach, and the first preset order is used to instruct the order generated by multiple sampling channels in a polling manner. For example, multiple sampling channels in the second channel group are not assigned priority and are queried according to the first preset order. The first preset order can be an ascending or descending order of the channel numbers corresponding to the multiple sampling channels in the second channel group. That is, this application does not impose specific restrictions on the arrangement of the aforementioned first preset order.

[0099] In some embodiments, such as Figure 8As shown, the second determining submodule further includes a third determining submodule 31 and a second generating submodule 32, wherein: the third determining submodule is used to determine multiple priority levels corresponding to multiple sampling channels in the second channel group according to the sorting of multiple channel numbers, wherein the multiple priority levels correspond one-to-one with the multiple sampling channels in the second channel group, or each priority level corresponds to one or more sampling channels in the second channel group; the second generating submodule is used to generate a first priority according to the multiple priority levels corresponding to the multiple sampling channels in the second channel group. This device determines multiple priority levels corresponding one-to-one with one or more sampling channels in the second channel group by sorting multiple channel numbers, thus determining the first priority based on the priority levels.

[0100] In some embodiments, such as Figure 9 As shown, the second determining module further includes a fourth determining submodule 41 and a fifth determining submodule 42. The fourth determining submodule determines whether a first indication signal is received, wherein the first indication signal indicates the determination of the first priority of multiple sampling channels in the third channel group within the multiple channel groups according to the first arbitration mechanism. The fifth determining submodule, in the absence of the first indication signal, determines the first priority of multiple sampling channels in the third channel group according to the second arbitration mechanism. When the first indication signal is received, the device determines the first priority of multiple sampling channels in the third channel group according to the first arbitration mechanism; when the first indication signal is not received, it determines the first priority of multiple sampling channels in the third channel group according to the second arbitration mechanism. This allows for more flexible sampling methods for multiple sampling channels, meeting different sampling requirements.

[0101] Specifically, since the first indication signal is used to indicate the first priority of multiple sampling channels in the third channel group according to the first arbitration mechanism, when the third channel group receives the first indication signal, the first priority of multiple sampling channels in the third channel group is set according to the first arbitration mechanism, that is, through the priority configurator; when the third channel group does not receive the first indication signal, the first priority of multiple sampling channels in the third channel group is determined according to the second arbitration mechanism, that is, the first priority of multiple sampling channels in the third channel group is set in a cyclic manner.

[0102] In some embodiments, such as Figure 10As shown, the third determining module includes a third acquisition submodule 51 and a sixth determining submodule 52, wherein: the third acquisition submodule is used to acquire priority configuration information corresponding to multiple channel groups; the sixth determining submodule is used to determine the second priority of multiple channel groups based on the priority configuration information. This device determines the second priority of multiple channel groups by acquiring the priority configuration information of each channel group. This allows for further prioritization of multiple channel groups after setting priorities for multiple sampling channels within those groups, ensuring more efficient sampling of data from multiple sampling channels.

[0103] Specifically, the second priority is used to specify the priority of multiple channel groups, and the priority among multiple channel groups is also specified through the priority configurator. In some embodiments, such as Figure 11 As shown, the output module includes: a seventh determining submodule 61, a fourth acquiring submodule 62, an eighth determining submodule 63, and an output submodule 64. The seventh determining submodule is used to determine whether a second indication signal has been received, wherein the second indication signal indicates the determination of the second priority of multiple channel groups based on priority configuration information. The fourth acquiring submodule is used to acquire multiple channel numbers corresponding one-to-one with multiple sampling channels in multiple channel groups when the second indication signal has not been received. The eighth determining submodule is used to determine multiple group numbers corresponding one-to-one with multiple channel groups according to a first preset order of the multiple channel numbers, wherein, according to the first preset order, the first sampling channel among the multiple sampling channels corresponding to each channel group is the first sampling channel, and when multiple channel groups are sorted in ascending order according to multiple group numbers, the channel numbers of the multiple first sampling channels corresponding to multiple channel groups are incremented. The output submodule is used to sequentially output multiple conversion signals corresponding to multiple target sampling channels according to the first preset order and the second preset order of the multiple group numbers. In the absence of a second indication signal, the device determines multiple group numbers corresponding to multiple channel groups according to a first preset order of multiple channel numbers. Based on the first preset order and the second preset order of the multiple group numbers, it sequentially outputs multiple conversion signals corresponding to multiple target sampling channels. In this way, multiple conversion signals corresponding to target sampling channels can be output in the above manner even without receiving a second indication signal, making the sampling method more flexible and applicable to a variety of practical scenarios.

[0104] Specifically, since the second indication signal is used to indicate the second priority of multiple channel groups based on priority configuration information, when the second indication signal is received, the second priority of multiple channel groups is determined according to the priority configuration information of the priority configurator; when the second indication signal is not received, the sequence numbers of multiple channels are obtained, and the sequence numbers of multiple channel groups are determined according to a first preset order. When the sequence numbers of multiple channel groups are sorted in ascending order, the channel sequence numbers of multiple first sampling channels corresponding to multiple channel groups are incremented; similarly, when the sequence numbers of multiple channel groups are sorted in descending order, the channel sequence numbers of multiple first sampling channels corresponding to multiple channel groups are decremented, thereby obtaining the second preset order of the multiple group sequence numbers, and outputting multiple conversion signals corresponding to multiple target sampling channels in the above order. In this device, after a channel within a group is sampled and converted, the priority of all channels within that group is reduced to the lowest, and they must wait until all other groups have been polled once before continuing.

[0105] The multi-channel sampling device includes a processor and a memory. The aforementioned acquisition module 10, first determination module 20, second determination module 30, third determination module 40, and output module 50 are all stored as program units in the memory. The processor executes these program units stored in the memory to achieve the corresponding functions. All of the above modules are located in the same processor; alternatively, the modules may be located in different processors in any combination.

[0106] The processor contains a core that retrieves the corresponding program unit from memory. One or more cores can be configured. By adjusting the core parameters, the high cost of multi-channel mixed sampling in ADCs can be addressed, achieving the effect of ADC mixed sampling with only simple circuit configuration.

[0107] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0108] This application provides a computer-readable storage medium including a stored program, wherein the program, when running, controls the device where the computer-readable storage medium is located to execute the multi-channel sampling method described in this application.

[0109] This application provides a processor for running a program, wherein the program executes the multi-channel sampling method described above in this application.

[0110] This application provides an electronic device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs at least the following steps:

[0111] Acquire trigger source information corresponding to multiple sampling channels of the target ADC module, wherein the trigger source information includes the time when the trigger source corresponding to the multiple sampling channels sends the trigger signal;

[0112] Based on the target application scenario, multiple channel groups corresponding to the multiple sampling channels are determined, wherein each channel group includes at least one sampling channel, and each channel group includes different sampling channels;

[0113] According to the first preset rule, determine the first priority of the at least one sampling channel included in each channel group;

[0114] According to the second preset rule, the second priority of the plurality of channel groups is determined;

[0115] When the trigger source information indicates that the plurality of sampling channels include a plurality of target sampling channels, a plurality of conversion signals corresponding to the plurality of target sampling channels are sequentially output according to the first priority and the second priority. The plurality of target sampling channels are the sampling channels among the plurality of sampling channels that correspond to the plurality of trigger sources that simultaneously send trigger signals. The plurality of conversion signals are used to instruct the target ADC module to perform sampling conversion through the plurality of target sampling channels.

[0116] The devices mentioned in this article can be servers, PCs, tablets, mobile phones, etc.

[0117] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program having at least the following method steps:

[0118] Acquire trigger source information corresponding to multiple sampling channels of the target ADC module, wherein the trigger source information includes the time when the trigger source corresponding to the multiple sampling channels sends the trigger signal;

[0119] Based on the target application scenario, multiple channel groups corresponding to the multiple sampling channels are determined, wherein each channel group includes at least one sampling channel, and each channel group includes different sampling channels;

[0120] According to the first preset rule, determine the first priority of the at least one sampling channel included in each channel group;

[0121] According to the second preset rule, the second priority of the plurality of channel groups is determined;

[0122] When the trigger source information indicates that the plurality of sampling channels include a plurality of target sampling channels, a plurality of conversion signals corresponding to the plurality of target sampling channels are sequentially output according to the first priority and the second priority. The plurality of target sampling channels are the sampling channels among the plurality of sampling channels that correspond to the plurality of trigger sources that simultaneously send trigger signals. The plurality of conversion signals are used to instruct the target ADC module to perform sampling conversion through the plurality of target sampling channels.

[0123] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.

[0124] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0125] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0126] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0127] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0128] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0129] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0130] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0131] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0132] As can be seen from the above description, the embodiments of this application achieve the following technical effects:

[0133] Compared to existing technologies where multi-channel mixed sampling can only be achieved using multiple ADCs, resulting in high costs, this solution, after acquiring the trigger source information of multiple sampling channels, divides the multiple sampling channels into multiple channel groups according to the target application scenario. Through a first preset rule and a second preset rule, the first priority of multiple sampling channels in each channel group and the second priority of the multiple channel groups are determined respectively. Based on the first and second priorities, multiple conversion signals corresponding to the multiple target sampling channels are output sequentially. This allows the ADC to achieve sequential output of conversion signals from multiple sampling channels simply by setting the first and second preset rules, thus solving the problem of high cost and complex circuitry caused by the need for multiple ADCs to achieve multi-channel mixed sampling. It achieves the effect of multi-channel mixed sampling with only simple circuit configuration.

[0134] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A multi-channel sampling method, characterized in that, include: Acquire trigger source information corresponding to multiple sampling channels of the target ADC module, wherein the trigger source information includes the time when the trigger source corresponding to the multiple sampling channels sends the trigger signal; Based on the target application scenario, multiple channel groups corresponding to the multiple sampling channels are determined, wherein each channel group includes at least one sampling channel, and each channel group includes different sampling channels; According to the first preset rule, determine the first priority of the at least one sampling channel included in each channel group; According to the second preset rule, the second priority of the plurality of channel groups is determined; When the trigger source information indicates that the plurality of sampling channels include a plurality of target sampling channels, a plurality of conversion signals corresponding to the plurality of target sampling channels are sequentially output according to the first priority and the second priority. The plurality of target sampling channels are the sampling channels among the plurality of sampling channels that correspond to the plurality of trigger sources that simultaneously send trigger signals. The plurality of conversion signals are used to instruct the target ADC module to perform sampling conversion through the plurality of target sampling channels.

2. The multi-channel sampling method according to claim 1, characterized in that, The acquisition of trigger source information corresponding to multiple sampling channels of the target ADC module includes: Acquire multiple trigger signals that correspond one-to-one with multiple sampling channels of the target ADC module; Determine the transmission time of the plurality of trigger signals; The trigger source information is generated based on the correspondence between the transmission time of the multiple trigger signals and the multiple sampling channels.

3. The multi-channel sampling method according to claim 1, characterized in that, The first preset rule includes a first arbitration mechanism. In the case where there is a first channel group comprising multiple sampling channels among the multiple channel groups, determining the first priority of the at least one sampling channel included in each channel group according to the first preset rule includes: According to the first arbitration mechanism, a first priority of multiple sampling channels in the first channel group is determined, wherein the first arbitration mechanism includes a preset priority corresponding to the multiple sampling channels in the first channel group.

4. The multi-channel sampling method according to claim 3, characterized in that, The first preset rule also includes a second arbitration mechanism. In the case where there is a second channel group comprising multiple sampling channels among the multiple channel groups, determining the first priority of the at least one sampling channel included in each channel group according to the first preset rule further includes: Obtain multiple channel numbers that correspond one-to-one with multiple sampling channels in the second channel group; According to the second arbitration mechanism, a first priority of multiple sampling channels in the second channel group is determined, wherein the second arbitration mechanism includes a first preset order of the multiple channel numbers.

5. The multi-channel sampling method according to claim 4, characterized in that, The determination of the first priority of multiple sampling channels in the second channel group according to the second arbitration mechanism includes: Based on the sorting of the multiple channel numbers, multiple priority levels corresponding to multiple sampling channels in the second channel group are determined, wherein the multiple priority levels correspond one-to-one with the multiple sampling channels in the second channel group, or each of the multiple priority levels corresponds to one or more sampling channels in the second channel group. The first priority is generated based on multiple priority levels corresponding to multiple sampling channels in the second channel group.

6. The multi-channel sampling method according to claim 4, characterized in that, The step of determining the first priority of the at least one sampling channel included in each channel group according to the first preset rule further includes: Determine whether a first indication signal is received, wherein the first indication signal is used to indicate the first priority of a plurality of sampling channels in a third channel group among the plurality of channel groups according to the first arbitration mechanism; In the absence of the first indication signal, the first priority of multiple sampling channels in the third channel group is determined according to the second arbitration mechanism.

7. The multi-channel sampling method according to any one of claims 1 to 6, characterized in that, The step of determining the second priority of the plurality of channel groups according to the second preset rule includes: Obtain priority configuration information corresponding to the multiple channel groups; Based on the priority configuration information, the second priority of the plurality of channel groups is determined.

8. The multi-channel sampling method according to claim 7, characterized in that, The step of sequentially outputting multiple conversion signals corresponding to the multiple target sampling channels according to the first priority and the second priority includes: Determine whether a second indication signal is received, wherein the second indication signal is used to indicate that a second priority of the plurality of channel groups is determined according to the priority configuration information; In the absence of the second indication signal, acquire multiple channel numbers that correspond one-to-one with multiple sampling channels in the multiple channel groups; According to the first preset order of the multiple channel numbers, multiple group numbers corresponding one-to-one with the multiple channel groups are determined. In this case, according to the first preset order, the first sampling channel among the multiple sampling channels corresponding to each channel group is the first sampling channel. When the multiple channel groups are sorted in ascending order according to the multiple group numbers, the channel numbers of the multiple first sampling channels corresponding to the multiple channel groups are incremented. According to the first preset order and the second preset order of the multiple group numbers, multiple conversion signals corresponding to the multiple target sampling channels are sequentially output.

9. A multi-channel sampling device, characterized in that, include: The acquisition module is used to acquire trigger source information corresponding to multiple sampling channels of the target ADC module, wherein the trigger source information includes the time when the trigger source corresponding to the multiple sampling channels sends the trigger signal; The first determining module is used to determine multiple channel groups corresponding to the multiple sampling channels according to the target application scenario, wherein each channel group includes at least one sampling channel and each channel group includes different sampling channels; The second determining module is used to determine the first priority of the at least one sampling channel included in each channel group according to the first preset rule; The third determining module is used to determine the second priority of the plurality of channel groups according to the second preset rule; The output module is configured to, when the trigger source information indicates that the plurality of sampling channels include a plurality of target sampling channels, sequentially output a plurality of conversion signals corresponding to the plurality of target sampling channels according to the first priority and the second priority, wherein the plurality of target sampling channels are sampling channels among the plurality of sampling channels corresponding to a plurality of trigger sources that simultaneously send trigger signals, and the plurality of conversion signals are used to instruct the target ADC module to perform sampling conversion through the plurality of target sampling channels.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device on which the computer-readable storage medium is located to perform the multi-channel sampling method according to any one of claims 1 to 8.