JP6695158B2 - Motor control circuit, fan using it - Google Patents

Motor control circuit, fan using it Download PDF

Info

Publication number
JP6695158B2
JP6695158B2 JP2016018957A JP2016018957A JP6695158B2 JP 6695158 B2 JP6695158 B2 JP 6695158B2 JP 2016018957 A JP2016018957 A JP 2016018957A JP 2016018957 A JP2016018957 A JP 2016018957A JP 6695158 B2 JP6695158 B2 JP 6695158B2
Authority
JP
Japan
Prior art keywords
conversion
mode
register
signal
event
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2016018957A
Other languages
Japanese (ja)
Other versions
JP2017139884A (en
Inventor
輝 佐々木
輝 佐々木
健治 浅井
健治 浅井
勇気 郷原
勇気 郷原
政輝 諸泉
政輝 諸泉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Rohm Co Ltd
Original Assignee
Rohm Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Rohm Co Ltd filed Critical Rohm Co Ltd
Priority to JP2016018957A priority Critical patent/JP6695158B2/en
Publication of JP2017139884A publication Critical patent/JP2017139884A/en
Application granted granted Critical
Publication of JP6695158B2 publication Critical patent/JP6695158B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Control Of Electric Motors In General (AREA)

Description

本発明は、モータの制御回路に関する。   The present invention relates to a motor control circuit.

モータの駆動方式として、矩形波駆動、正弦波駆動、ベクトル制御などが知られている。このうちベクトル制御は、モータのコイル電流を直交するd軸成分およびq軸成分に分解し、それぞれを個別に制御するものであり、正弦波駆動の一種とも言える。ベクトル制御は、制御効率が高いという利点を有するが、制御が複雑である。   Known methods of driving a motor include rectangular wave drive, sine wave drive, and vector control. Of these, the vector control is to decompose the coil current of the motor into the d-axis component and the q-axis component which are orthogonal to each other and individually control each, and can be said to be a kind of sinusoidal drive. Vector control has the advantage of high control efficiency, but is complex to control.

矩形波駆動や正弦波駆動は、アナログ回路あるいはデジタル回路などのハードウェアのみで実現することが可能である。一方、ベクトル制御は、その複雑さゆえに、ハードウェアのみで制御回路を構成することが困難であり、プロセッサ(マイコン)とプログラムの組み合わせによってソフトウェア制御に頼るのが一般的である。   The rectangular wave drive and the sine wave drive can be realized only by hardware such as an analog circuit or a digital circuit. On the other hand, in the vector control, it is difficult to configure the control circuit only by hardware due to its complexity, and it is common to rely on software control by combining a processor (microcomputer) and a program.

モータを適切に駆動するために、モータの機械的状態(回転数やロータの位置)に関する情報が必要となる。モータの機械的状態は、ロータリエンコーダやレゾルバといった回転センサによって検出することが可能である。あるいはセンサレス方式では、モータの電気的状態(モータのコイル電流および/またはコイル電圧)にもとづいて、モータの機械的状態を推定し、推定された状態にもとづいて駆動制御信号を生成する必要がある。   In order to drive the motor properly, information on the mechanical state of the motor (rotational speed and rotor position) is required. The mechanical state of the motor can be detected by a rotation sensor such as a rotary encoder or a resolver. Alternatively, in the sensorless system, it is necessary to estimate the mechanical state of the motor based on the electrical state of the motor (coil current and / or coil voltage of the motor) and generate the drive control signal based on the estimated state. ..

図1は、ソフトウェア制御を利用したモータの駆動装置4Rのブロック図である。ここではセンサレス駆動を例とする。モータ2は三相ブラシレスモータである。駆動装置4Rは、主として、三相インバータ6およびモータ制御回路10Rを備える。   FIG. 1 is a block diagram of a motor driving device 4R using software control. Here, sensorless drive is taken as an example. The motor 2 is a three-phase brushless motor. The drive device 4R mainly includes a three-phase inverter 6 and a motor control circuit 10R.

モータ制御回路10Rは、主としてA/Dコンバータモジュール12、プロセッサ14、パルス幅変調器16を備える。A/Dコンバータモジュール12は、モータ2の電気的状態、すなわちコイル電流やコイルの電圧に応じたアナログの検出信号S1を、デジタルの検出信号S2に変換する。たとえばインバータ6には、U相、V相、W相の電流を検出するためのセンス抵抗Rs,Rs,Rsが設けられている(3シャント構成という)。センス抵抗Rsには、対応する相のコイル電流に比例した電圧降下が発生する。センス抵抗RsU〜Wの電圧降下は、複数のアナログポートを介して、A/Dコンバータモジュール12に入力される。A/Dコンバータモジュール12には、そのほかにも図示しないアナログ信号が入力可能となっている。 The motor control circuit 10R mainly includes an A / D converter module 12, a processor 14, and a pulse width modulator 16. The A / D converter module 12 converts the analog detection signal S1 according to the electrical state of the motor 2, that is, the coil current and the coil voltage into a digital detection signal S2. For example, the inverter 6, U-phase, V-phase, W-phase sense resistor Rs U for detecting the current, Rs v, Rs w is provided (referred to three-shunt configuration). A voltage drop proportional to the coil current of the corresponding phase occurs in the sense resistor Rs. The voltage drop of the sense resistors Rs U to W is input to the A / D converter module 12 via a plurality of analog ports. Other analog signals (not shown) can be input to the A / D converter module 12.

プロセッサ14は、A/Dコンバータモジュール12からのデジタルの検出信号S2にもとづいて、モータ2の駆動制御信号(たとえば三相電圧の指令値)S3を生成する。プロセッサ14は、ユーザがあらかじめ記述したプログラム18を実行するように構成される。   The processor 14 generates a drive control signal (for example, a command value of a three-phase voltage) S3 for the motor 2 based on the digital detection signal S2 from the A / D converter module 12. The processor 14 is configured to execute a program 18 previously described by the user.

パルス幅変調器16は、駆動制御信号S3をパルス幅変調(PWM:Pulse Width Modulation)し、インバータ6の制御信号S4を生成する。インバータ6は、パルス幅変調器16からの制御信号S4に応じてスイッチングする。   The pulse width modulator 16 performs pulse width modulation (PWM) on the drive control signal S3 to generate a control signal S4 for the inverter 6. The inverter 6 switches according to the control signal S4 from the pulse width modulator 16.

特開平3−243193号公報JP-A-3-243193 特開平3−277194号公報JP-A-3-277194

松本 修、プロが教える!CortexTM-Mマイコンでここまでできるモータ制御、[online]、[平成28年1月7日検索]、インターネット<URL:http://toshiba.semicon-storage.com/product/micro/pdf/armcortex-m_ws2012_2.pdf>Osamu Matsumoto, a professional teaches! Motor control that can be done so far with CortexTM-M microcomputer, [online], [January 7, 2016 search], Internet <URL: http://toshiba.semicon-storage.com/product/micro/pdf/armcortex- m_ws2012_2.pdf >

モータ制御回路10Rに求められる機能は、組み合わせられるモータ2の種類、駆動形式、用途によってさまざまである。たとえば電流検出の方式として、図1に示す3シャント構成の他に、3相で1個のセンス抵抗が共有される1シャント構成が存在する。A/Dコンバータは、前者において3個の電流検出信号を処理し、後者においては1個の電流検出信号を処理することとなり、A/D変換の適切なタイミングも両者で異なる。   The functions required of the motor control circuit 10R vary depending on the type of the motor 2 to be combined, the drive format, and the application. For example, as a method of current detection, there is a one-shunt configuration in which one sense resistor is shared by three phases, in addition to the three-shunt configuration shown in FIG. The A / D converter processes three current detection signals in the former case and processes one current detection signal in the latter case, and the appropriate timing of A / D conversion is different between the two.

モータ制御回路10Rに、多様な用途、駆動形式、モータとの組み合わせで使用可能な汎用性、柔軟性を持たせることができれば、モータ制御回路10Rのベンダーにとっては、品種数を減らすことができ、開発コスト、在庫管理の観点から有利である。またモータ制御回路10Rの購入者(ユーザ)にとっても、ハードウェア(すなわちモータ制御回路10R)を共通として、ソフトウェア(すなわちプログラム18)を修正することによりさまざまな用途、駆動形式、モータに対応することができれば、モータ2を搭載するさまざまな機器1の開発期間を短縮できる。   If the motor control circuit 10R can have versatility and flexibility that can be used in various applications, drive formats, and combinations with motors, the vendor of the motor control circuit 10R can reduce the number of types. It is advantageous from the viewpoint of development cost and inventory management. Also for the purchaser (user) of the motor control circuit 10R, the hardware (that is, the motor control circuit 10R) is common, and the software (that is, the program 18) is modified to support various applications, drive types, and motors. If so, the development period of various devices 1 equipped with the motor 2 can be shortened.

本発明者は、従来のモータ制御回路10Rについて検討した結果、以下の課題を認識するに至った。すなわち従来のモータ制御回路10Rでは、A/Dコンバータモジュール12によるA/D変換の順序、タイミング、A/D変換の対象となるアナログポートをソフトウェアによって自由に設定、制御することができず、このことが、モータ制御回路10Rの汎用性、柔軟性を高めることの障壁の一因となっていた。   As a result of examining the conventional motor control circuit 10R, the present inventor has come to recognize the following problems. That is, in the conventional motor control circuit 10R, the order and timing of A / D conversion by the A / D converter module 12 and the analog port that is the target of A / D conversion cannot be freely set and controlled by software. This has been one of the obstacles to increasing the versatility and flexibility of the motor control circuit 10R.

本発明は係る課題に鑑みてなされたものであり、そのある態様の例示的な目的のひとつは、モータの制御回路において、ソフトウェア制御の容易性や柔軟性を提供することにある。   The present invention has been made in view of the above problem, and one of the exemplary objects of an aspect thereof is to provide software control easiness and flexibility in a motor control circuit.

本発明のある態様は、モータの制御回路に関する。モータの制御回路は、複数m個(mは2以上の整数)のアナログポートと、A/Dコンバータと、プロセッサと、インタフェース回路と、を備える。各アナログポートには前記モータの電気的状態を示す検出信号が入力可能となっている。A/Dコンバータは、m個のアナログポートそれぞれの検出信号を受けるマルチプレクサを有し、マルチプレクサが選択した検出信号をデジタルデータに変換する。プロセッサは、デジタルデータにもとづいてモータの駆動指令を生成する。インタフェース回路は、プロセッサからの制御指令に応じてA/Dコンバータの動作を制御するとともに、デジタルデータをプロセッサに受け渡す。インタフェース回路によるA/Dコンバータの1制御周期は、n(nは2以上の整数)を最大とするk回(1≦k≦n)のA/D変換を含む。インタフェース回路は、n個のデータレジスタ(DATA0〜DATAn-1)と、n個のポート選択レジスタ(PORT_SEL0〜PORT_SELn-1)と、アクセス制御部と、を備える。i番目(1≦i≦n)のポート選択レジスタ(PORT_SELi-1)は、i回目のA/D変換において、マルチプレクサが選択すべきアナログポートを示す値を格納する。
アクセス制御部は、バッファモードにおいて、i回目のデジタルデータDOUTi-1を、i番目のデータレジスタ(DATAi-1)に格納する。
One aspect of the present invention relates to a control circuit for a motor. The motor control circuit includes a plurality of m (m is an integer of 2 or more) analog ports, an A / D converter, a processor, and an interface circuit. A detection signal indicating the electric state of the motor can be input to each analog port. The A / D converter has a multiplexer that receives the detection signal of each of the m analog ports, and converts the detection signal selected by the multiplexer into digital data. The processor generates a motor drive command based on the digital data. The interface circuit controls the operation of the A / D converter in accordance with a control command from the processor and also transfers digital data to the processor. One control cycle of the A / D converter by the interface circuit includes k times (1 ≦ k ≦ n) A / D conversion that maximizes n (n is an integer of 2 or more). The interface circuit includes n data registers (DATA0 to DATAn-1), n port selection registers (PORT_SEL0 to PORT_SELn-1), and an access control unit. The i-th (1 ≦ i ≦ n) port selection register (PORT_SELi-1) stores a value indicating an analog port to be selected by the multiplexer in the i-th A / D conversion.
In the buffer mode, the access control unit stores the i-th digital data DOUT i-1 in the i-th data register (DATA i-1).

この態様によれば、バッファモードにおいて、n個のデータレジスタには、変換の時系列の順序でデータが格納されることとなる。バッファモードでは、n回のA/D変換のうち、複数回で、同じアナログポートのデータを取得することも可能である。ユーザはこのことを念頭においてソフトウェアを設計することができ、プログラミングが容易となる。   According to this aspect, in the buffer mode, the data is stored in the n data registers in the order of conversion time series. In the buffer mode, it is also possible to acquire the data of the same analog port a plurality of times out of n times of A / D conversion. The user can design the software with this in mind, which facilitates programming.

アクセス制御部はさらに通常モードをサポートしてもよい。通常モードにおいて、アクセス制御部は、i回目のデジタルデータDOUTi-1を、n個のデータレジスタ(DATA0〜DATAn-1)のうち対応するポート選択レジスタ(PORT_SELi-1)の値に応じたひとつに格納してもよい。インタフェース回路はさらに、バッファモードと通常モードの一方を指示するデータを格納するモードバッファレジスタ(MODE_BUF)を含んでもよい。
制御回路に必要な機能に応じて、通常モードとバッファモードを選択することができ、ソフトウェア制御の柔軟性が提供される。
The access controller may also support normal mode. In the normal mode, the access control unit sets the i-th digital data DOUTi-1 to one according to the value of the corresponding port selection register (PORT_SELi-1) among the n data registers (DATA0 to DATAn-1). May be stored. The interface circuit may further include a mode buffer register (MODE_BUF) that stores data indicating one of the buffer mode and the normal mode.
The normal mode and the buffer mode can be selected depending on the required function of the control circuit, and the flexibility of software control is provided.

インタフェース回路はさらに、1制御周期内の変換回数kを指定する値を格納する回数レジスタ(BURST_SEL)を含んでもよい。
これにより、必要最低限の変換処理が行われるため、プロセッサの負荷を減らすことができる。
The interface circuit may further include a count register (BURST_SEL) that stores a value that specifies the conversion count k within one control cycle.
As a result, the minimum necessary conversion processing is performed, so that the load on the processor can be reduced.

インタフェース回路はさらに、ランレジスタ(RUN)を含んでもよい。アクセス制御部は、ソフトウェアモードにおいて、ランレジスタのアサートを、A/Dコンバータの動作スタートのトリガとしてもよい。
なお本明細書において、「レジスタのアサート」とは、そのレジスタに所定値(たとえば1)が書き込まれたことに対応する。これにより、ハードウェアの状態に依存せずに、ソフトウェア制御によって、A/Dコンバータをトリガできる。
The interface circuit may further include a run register (RUN). In the software mode, the access control unit may use the assertion of the run register as a trigger for starting the operation of the A / D converter.
In this specification, "assert a register" corresponds to writing a predetermined value (for example, 1) in the register. As a result, the A / D converter can be triggered by software control without depending on the state of hardware.

インタフェース回路はさらに、制御回路において生成される少なくともひとつの内部信号を受け、少なくともひとつの内部信号のひとつであるスタートイベント信号にもとづいてスタートタイミング信号を生成するタイミング信号生成回路を含んでもよい。アクセス制御部は、ハードウェアモードにおいて、スタートタイミング信号を、A/Dコンバータの動作スタートのトリガとしてもよい。ハードウェアモードでは、A/Dコンバータの制御周期を、制御回路の状態に同期させることができる。   The interface circuit may further include a timing signal generation circuit that receives at least one internal signal generated in the control circuit and generates a start timing signal based on a start event signal that is one of the at least one internal signal. The access control unit may use the start timing signal as a trigger for starting the operation of the A / D converter in the hardware mode. In the hardware mode, the control cycle of the A / D converter can be synchronized with the state of the control circuit.

インタフェース回路はさらに、ランレジスタ(RUN)と、ソフトウェアモードとハードウェアモードの一方を指定する値を格納するモードスタートレジスタ(MODE_START)と、制御回路において生成される少なくともひとつの内部信号を受け、少なくともひとつの内部信号のひとつであるスタートイベント信号にもとづいてスタートタイミング信号を生成するタイミング信号生成回路と、を含んでもよい。アクセス制御部は、(i)ソフトウェアモードにおいて、ランレジスタのアサートをA/Dコンバータの動作スタートのトリガとし、(ii)ハードウェアモードにおいて、スタートタイミング信号をA/Dコンバータの動作スタートのトリガとしてもよい。
制御回路に必要な機能に応じて、ソフトウェアモードとハードウェアモードを選択することができ、ソフトウェア制御の柔軟性が提供される。
The interface circuit further receives a run register (RUN), a mode start register (MODE_START) that stores a value designating one of a software mode and a hardware mode, and at least one internal signal generated in the control circuit. A timing signal generation circuit that generates a start timing signal based on a start event signal, which is one of the internal signals, may be included. The access control unit also uses (i) the assertion of the run register as a trigger for the operation start of the A / D converter in the software mode, and (ii) the start timing signal as the trigger for the operation start of the A / D converter in the hardware mode. Good.
Depending on the function required of the control circuit, the software mode and the hardware mode can be selected, and the flexibility of software control is provided.

インタフェース回路はさらに、ハードウェアモードにおいて、少なくともひとつの内部信号のひとつであるスタートイベント信号のアサートから、スタートタイミング信号のアサートまでの遅延時間の設定値を格納する遅延設定レジスタ(EVENT_DELAY_SEL,EVENT_DELAY_EN)を含んでもよい。タイミング信号生成回路は、スタートイベント信号に遅延設定レジスタの値に応じた遅延を与えて、スタートタイミング信号を出力する遅延回路を含んでもよい。
本明細書において、「信号のアサート」とは、その信号が所定レベルに遷移することに対応し、別の観点からは、その信号の所定のエッジが発生することに対応する。これにより動作スタートのタイミングを細かくソフトウェア制御できる。
The interface circuit further includes a delay setting register (EVENT_DELAY_SEL, EVENT_DELAY_EN) that stores the setting value of the delay time from the assertion of the start event signal, which is one of at least one internal signal, to the assertion of the start timing signal in the hardware mode. But it's okay. The timing signal generation circuit may include a delay circuit that delays the start event signal according to the value of the delay setting register and outputs the start timing signal.
As used herein, "asserting a signal" corresponds to the transition of the signal to a predetermined level, and from another perspective, to the occurrence of a predetermined edge of the signal. As a result, the operation start timing can be finely controlled by software.

インタフェース回路はさらに、イベント選択レジスタ(EVENT_SEL)と、制御回路において生成される複数の内部信号を受け、イベント選択レジスタに格納される値に応じたひとつを選択し、スタートイベント信号を出力するイベントセレクタと、を含んでもよい。タイミング信号生成回路は、スタートイベント信号にもとづいてスタートタイミング信号を生成してもよい。
これにより、動作スタートのトリガとなる内部信号(すなわちイベント)をソフトウェア制御できる。
The interface circuit further receives an event selection register (EVENT_SEL) and a plurality of internal signals generated by the control circuit, selects one according to the value stored in the event selection register, and outputs a start event signal. And may be included. The timing signal generation circuit may generate the start timing signal based on the start event signal.
This allows software control of the internal signal (ie, event) that triggers the operation start.

複数の内部信号は、パルス幅変調器から供給されてもよい。複数の内部信号はひとつまたは複数のPWM信号を含んでもよく、好ましくは、U相、V相、W相それぞれの、正相および/または逆相のPWM信号を含んでもよい。   The plurality of internal signals may be provided by the pulse width modulator. The plurality of internal signals may include one or a plurality of PWM signals, and preferably may include positive phase and / or negative phase PWM signals of the U phase, V phase, and W phase, respectively.

また複数の内部信号は、パルス幅変調に使用される三角波のピーク、ボトムで1サイクル、所定レベルとなるピークボトム検出信号を含んでもよい。インタフェース回路はさらに、ピークボトム検出信号を受け、ピーク、ボトムそれぞれで遷移するパルス状のピークボトムパルスを生成するピークボトムパルス発生器を含んでもよい。これにより、ピーク、ボトムを、PWM信号と同等に扱うことが可能となる。   Further, the plurality of internal signals may include a peak-bottom detection signal that has a predetermined level for one cycle at the peak and bottom of the triangular wave used for pulse width modulation. The interface circuit may further include a peak-bottom pulse generator that receives the peak-bottom detection signal and generates a pulse-shaped peak-bottom pulse that transits at each of peak and bottom. This makes it possible to handle the peak and bottom in the same manner as the PWM signal.

さらにインタフェース回路はさらに、内部信号のポジティブエッジ、ネガティブエッジのいずれを、スタートタイミング信号の生成に用いるかを指定する値を格納するレジスタ(EVENT_EDGE)を含んでもよい。   Furthermore, the interface circuit may further include a register (EVENT_EDGE) that stores a value that specifies which of a positive edge and a negative edge of the internal signal is used to generate the start timing signal.

インタフェース回路は、オートモードとシーケンシャルモードの一方を指定する値を格納するモードシーケンスレジスタ(MODE_SEQ)と、制御回路において生成される少なくともひとつの内部信号を受け、シーケンシャルモードにおいて、A/D変換ごとに、少なくともひとつの内部信号のひとつである変換イベント信号にもとづいて変換タイミング信号を生成するタイミング信号生成回路を含んでもよい。アクセス制御部は、(i)オートモードにおいて、k回のA/D変換を自動的に実行し、(ii)シーケンシャルモードにおいて、k回のA/D変換それぞれを、対応する変換タイミング信号をトリガとして実行してもよい。
オートモードでは、k回のA/D変換を、インタフェース回路が自動生成するタイミングで行うことができ、A/D変換のタイミングがそれほどシビアでない状況において有用である。シーケンシャルモード(マニュアルモード)では、各A/D変換のタイミングを個別にマニュアルで指定することができ、シビアなタイミング制御に対応できる。
The interface circuit receives a mode sequence register (MODE_SEQ) that stores a value that specifies one of the auto mode and the sequential mode, and at least one internal signal generated in the control circuit, and in the sequential mode, for each A / D conversion. A timing signal generation circuit that generates a conversion timing signal based on a conversion event signal that is one of at least one internal signal may be included. The access control unit automatically executes k times A / D conversion in (i) auto mode, and (ii) triggers the corresponding conversion timing signal for each k times A / D conversion in sequential mode. May be executed as
In the auto mode, k times of A / D conversion can be performed at the timing automatically generated by the interface circuit, which is useful in a situation where the timing of A / D conversion is not so severe. In the sequential mode (manual mode), the timing of each A / D conversion can be manually specified individually, and severe timing control can be supported.

インタフェース回路はさらに、最大n回のA/D変換それぞれについて、変換イベント信号のアサートから変換タイミング信号のアサートまでの遅延時間の設定値を格納する遅延設定レジスタ(EVENT_DELAY_SEL0〜EVENT_DELAY_SELn-1、EVENT_DELAY_EN0〜EVENT_DELAY_ENn-1)を含んでもよい。タイミング信号生成回路は、A/D変換ごとに、対応する変換イベント信号に、対応する遅延設定レジスタの設定値に応じた遅延を与えて、変換タイミング信号を出力する遅延回路を含んでもよい。
これにより、A/D変換のタイミングを細かくソフトウェア制御できる。
The interface circuit further includes delay setting registers (EVENT_DELAY_SEL0 to EVENT_DELAY_SELn-1, EVENT_DELAY_EN0 to EVENT_DELAY_ENn) that store setting values of the delay time from the assertion of the conversion event signal to the assertion of the conversion timing signal for each of up to n A / D conversions. -1) may be included. The timing signal generation circuit may include a delay circuit that outputs a conversion timing signal by delaying the corresponding conversion event signal for each A / D conversion according to the setting value of the corresponding delay setting register.
As a result, the timing of A / D conversion can be finely controlled by software.

インタフェース回路はさらに、最大n回のA/D変換それぞれについて、トリガとすべき内部信号を個別に指定する値を格納するn個の個別イベント選択レジスタ(EVENT_SEL0-EVENT_SELn-1)と、制御回路において生成される複数の内部信号を受け、A/D変換ごとに、複数の内部信号のうち、対応する個別イベント選択レジスタに格納される値に応じたひとつを選択し、変換イベント信号を出力するイベントセレクタと、を含んでもよい。タイミング信号生成回路は、シーケンシャルモードにおいて、A/D変換ごとに、変換イベント信号にもとづいて変換タイミング信号を生成してもよい。
これにより、変換毎に、トリガとするイベントを独立かつ個別に設定できる。
The interface circuit further includes n individual event selection registers (EVENT_SEL0-EVENT_SELn-1) that store values that individually specify the internal signal to be triggered for each maximum A / D conversion, and the control circuit. An event that receives a plurality of generated internal signals, selects one of the plurality of internal signals according to the value stored in the corresponding individual event selection register for each A / D conversion, and outputs the converted event signal. And a selector, may be included. The timing signal generation circuit may generate the conversion timing signal based on the conversion event signal for each A / D conversion in the sequential mode.
This makes it possible to set an event to be a trigger independently and individually for each conversion.

インタフェース回路はさらに、最大n回のA/D変換それぞれについて、内部信号のポジティブエッジ、ネガティブエッジのいずれを変換タイミング信号の生成に用いるかを指定する値を格納するn個のレジスタ(EVENT_EDGE0-EVENT_EDGEn-1)を含んでもよい。
これにより、内部信号のポジティブエッジ、ネガティブエッジの両方を、イベントとして扱うことができる。
The interface circuit further includes n registers (EVENT_EDGE0-EVENT_EDGEn) that store a value that specifies which of the positive edge and the negative edge of the internal signal is used to generate the conversion timing signal for each of the A / D conversions performed up to n times. -1) may be included.
As a result, both the positive edge and the negative edge of the internal signal can be treated as an event.

インタフェース回路はさらに、1回変換モードと連続変換モードの一方を指定する値を格納するモードバーストレジスタ(MODE_BURST)を含んでもよい。アクセス制御部は、(i)1回変換モードにおいて、1制御周期の変換処理が終了すると、次の動作スタートを待機してもよい。(ii)連続変換モードにおいて、1制御周期の変換処理が終了すると、次の動作スタートを待たずに、次の制御周期に移行してもよい。
1回変換モードと連続変換モードを選択可能とすることで、さらなる柔軟性が提供される。
The interface circuit may further include a mode burst register (MODE_BURST) that stores a value designating one of the once conversion mode and the continuous conversion mode. In the (i) single conversion mode, the access control unit may wait for the start of the next operation after the conversion processing of one control cycle is completed. (Ii) In the continuous conversion mode, when the conversion process of one control cycle is completed, the next control cycle may be started without waiting for the start of the next operation.
The additional flexibility is provided by the ability to select between the single conversion mode and the continuous conversion mode.

制御回路は、A/Dコンバータを、複数チャンネル備えてもよい。   The control circuit may include a plurality of A / D converter channels.

制御回路は、ひとつの半導体基板に一体集積化されてもよい。
「一体集積化」とは、回路の構成要素のすべてが半導体基板上に形成される場合や、回路の主要構成要素が一体集積化される場合が含まれ、回路定数の調節用に一部の抵抗やキャパシタなどが半導体基板の外部に設けられていてもよい。
The control circuit may be integrated on one semiconductor substrate.
"Integrated integration" includes the case where all the components of the circuit are formed on the semiconductor substrate and the case where the main components of the circuit are integrated, and some of them are used for adjusting the circuit constants. A resistor or a capacitor may be provided outside the semiconductor substrate.

本発明の別の態様は、ファンに関する。ファンは、ファンモータと、ファンモータを駆動する上述のいずれかの制御回路と、を備える。   Another aspect of the invention relates to a fan. The fan includes a fan motor and any one of the control circuits described above that drives the fan motor.

なお、以上の構成要素の任意の組み合わせや本発明の構成要素や表現を、方法、装置、システムなどの間で相互に置換したものもまた、本発明の態様として有効である。   It should be noted that any combination of the above constituent elements and constituent elements and expressions of the present invention that are mutually replaced among methods, devices, systems, etc. are also effective as an aspect of the present invention.

本発明のある態様によれば、ソフトウェア制御の容易性や柔軟性を提供できる。   According to an aspect of the present invention, ease and flexibility of software control can be provided.

ソフトウェア制御を利用したモータの駆動装置のブロック図である。It is a block diagram of the drive device of the motor using software control. 実施の形態に係る制御回路を備える駆動装置のブロック図である。3 is a block diagram of a drive device including the control circuit according to the embodiment. FIG. 図2の制御回路の一部の詳細なブロック図である。FIG. 3 is a detailed block diagram of a part of the control circuit of FIG. 2. ADCインタフェースとA/Dコンバータのインタフェースを説明する図である。It is a figure explaining the interface of an ADC interface and an A / D converter. A/DコンバータおよびADCインタフェースの1制御周期の動作波形図である。FIG. 6 is an operation waveform diagram of one control cycle of the A / D converter and the ADC interface. パルス幅変調器およびピークボトムパルス発生器の動作波形図である。It is an operation waveform diagram of a pulse width modulator and a peak bottom pulse generator. 内部信号とイベントを示す図である。It is a figure which shows an internal signal and an event. イベントセレクタおよびインタフェースユニットの構成例を示す図である。It is a figure which shows the structural example of an event selector and an interface unit. A/Dコンバータの制御シーケンスを示す図である。It is a figure which shows the control sequence of an A / D converter. 図10(a)は、バッファモードにおけるアクセス制御部の動作を説明する図であり、図10(b)は、通常モードにおけるアクセス制御部の動作を説明する図である。FIG. 10A is a diagram for explaining the operation of the access control unit in the buffer mode, and FIG. 10B is a diagram for explaining the operation of the access control unit in the normal mode. ハードウェアモード、シーケンシャルモードの組み合わせを示す波形図である。It is a wave form diagram which shows the combination of a hardware mode and a sequential mode.

(全体構成)
図2は、実施の形態に係る制御回路10を備える駆動装置4のブロック図である。駆動装置4はモータ2とともに機器1に用いられる。機器1の種類は特に限定されないが、家電製品をはじめ、OA機器、産業機器、車載機器、携帯用電子機器など多岐にわたって利用することができる。身近なところでは、エアコンや冷蔵庫などのコンプレッサや、多くの機器の冷却用のファンに、モータ2が用いられている。駆動装置4は、制御回路10に加えて、インバータ6を備える。インバータ6は、U相、V相、W相のブリッジ回路(ドライバ)を含む。
(overall structure)
FIG. 2 is a block diagram of the drive device 4 including the control circuit 10 according to the embodiment. The drive device 4 is used in the device 1 together with the motor 2. Although the type of the device 1 is not particularly limited, it can be used in various fields such as home appliances, OA devices, industrial devices, vehicle-mounted devices, and portable electronic devices. In familiar places, the motor 2 is used for a compressor such as an air conditioner or a refrigerator and a fan for cooling many devices. The drive device 4 includes an inverter 6 in addition to the control circuit 10. The inverter 6 includes U-phase, V-phase, and W-phase bridge circuits (drivers).

本実施の形態において、制御回路10の制御対象は三相ブラシレスモータであり、センサレス方式でインバータ6を制御するものとする。制御回路10からインバータ6へは、U,V,W相それぞれのハイサイドスイッチ、ローサイドスイッチを制御するために必要な駆動信号が出力される。   In this embodiment, the control target of the control circuit 10 is a three-phase brushless motor, and the inverter 6 is controlled by a sensorless method. The control circuit 10 outputs to the inverter 6 drive signals necessary for controlling the high-side switch and the low-side switch of each of the U, V, and W phases.

制御回路10は、ひとつの半導体基板に集積化された機能IC(Integrated Circuit)であり、モータ2の電気的状態を監視し、その結果にもとづいて、駆動信号を生成する。制御回路10は、複数m個(mは2以上の整数)のアナログポートPORT-0〜PORT-m-1が設けられる。本実施の形態ではm=8とし、PORT-0〜PORT-7が設けられる。各アナログポートには、モータ2の電気的状態を示す検出信号が入力可能である。なお各アナログポートには、そのほかの電気信号、たとえばサーミスタなどの温度センサの出力電圧や、モータ2の回転数を指示するアナログ電圧などを入力してもよい。   The control circuit 10 is a functional IC (Integrated Circuit) integrated on one semiconductor substrate, monitors the electrical state of the motor 2, and generates a drive signal based on the result. The control circuit 10 is provided with a plurality of m (m is an integer of 2 or more) analog ports PORT-0 to PORT-m-1. In this embodiment, m = 8 and PORT-0 to PORT-7 are provided. A detection signal indicating the electrical state of the motor 2 can be input to each analog port. It should be noted that other electric signals such as the output voltage of a temperature sensor such as a thermistor and the analog voltage for instructing the rotation speed of the motor 2 may be input to each analog port.

図2には3シャント構成が示されており、U,V,W相ごとにセンス抵抗(シャント抵抗)Rが設けられ、各センス抵抗は、ひとつのアナログポートに割り当てられ、それぞれの電圧降下が検出信号として割り当てられたアナログポートに入力される。1シャント構成の場合、1個のシャント抵抗の電圧降下が、いずれかのアナログポートに入力される。 A three-shunt configuration is shown in FIG. 2. A sense resistor (shunt resistor) R S is provided for each of the U, V, and W phases, each sense resistor is assigned to one analog port, and each voltage drop occurs. Is input to the analog port assigned as the detection signal. In the case of the one-shunt configuration, the voltage drop of one shunt resistor is input to any analog port.

制御回路10は、主として、デジタル演算処理部30、A/Dコンバータ50、メモリ60、クロック発生器70を備える。本発明と関係のないブロックは省略されている。A/Dコンバータ50は、その入力側に、m個のアナログポートそれぞれの検出信号を受けるマルチプレクサ52を有する。A/Dコンバータ50は、マルチプレクサ52が選択した検出信号をデジタルデータ(変換データ)DOUTに変換する。図2の制御回路10は、3チャンネル分ch0〜ch2のA/Dコンバータ50を備えるが、チャンネル数は任意である。A/Dコンバータ50の構成、方式は特に限定されないが、たとえば逐次比較型のA/Dコンバータを用いてもよい。   The control circuit 10 mainly includes a digital arithmetic processing unit 30, an A / D converter 50, a memory 60, and a clock generator 70. Blocks not relevant to the present invention have been omitted. The A / D converter 50 has a multiplexer 52 on its input side that receives the detection signals of the m analog ports. The A / D converter 50 converts the detection signal selected by the multiplexer 52 into digital data (conversion data) DOUT. The control circuit 10 in FIG. 2 includes A / D converters 50 for three channels ch0 to ch2, but the number of channels is arbitrary. The configuration and system of the A / D converter 50 are not particularly limited, but for example, a successive approximation type A / D converter may be used.

デジタル演算処理部30は、A/Dコンバータ50からの変換データDOUTを受け、インバータ6を制御するためのPWM信号(PWM_U,PWM_V,PWM_Wおよびそれらの反転信号#PWM_U,#PWM_V,#PWM_W)を生成する。デジタル演算処理部30のシステムプラットフォーム32は、いわゆる組み込みプロセッサであり、たとえばARM社が提供するARMアーキテクチャを用いて構成してもよい。システムプラットフォーム32は、CPUコア34に加えて、メモリコントローラ36,38、パワーマネージメントユニット40、システムコントローラ42などが内蔵される。   The digital arithmetic processing unit 30 receives the conversion data DOUT from the A / D converter 50 and outputs PWM signals (PWM_U, PWM_V, PWM_W and their inverted signals #PWM_U, #PWM_V, #PWM_W) for controlling the inverter 6. To generate. The system platform 32 of the digital arithmetic processing unit 30 is a so-called embedded processor, and may be configured using, for example, the ARM architecture provided by ARM Limited. In addition to the CPU core 34, the system platform 32 includes memory controllers 36 and 38, a power management unit 40, a system controller 42, and the like.

メモリ60は、フラッシュメモリなどの不揮発性メモリ62と、SRAMなどの揮発性メモリ64を含む。不揮発性メモリ62には、CPUコア34が実行すべきプログラムが格納される。揮発性メモリ64は、主記憶装置として利用される。   The memory 60 includes a non-volatile memory 62 such as a flash memory and a volatile memory 64 such as an SRAM. A program to be executed by the CPU core 34 is stored in the non-volatile memory 62. The volatile memory 64 is used as a main storage device.

デジタル演算処理部30のうちモータ制御ブロック44は、モータ2の制御に固有の回路ブロックである。ADCインタフェース(インタフェース回路)46は、システムプラットフォーム32とA/Dコンバータ50のインタフェースであり、A/Dコンバータ50からの変換データをCPUコア34に受け渡す。また詳しくは後述するが、A/Dコンバータ50の動作は、CPUコア34によってソフトウェア制御可能となっている。ADCインタフェース46は、CPUコア34からの制御指令に応じて、A/Dコンバータ50の動作を制御する。CPUコア34からADCインタフェース46への制御指令は、後述する制御レジスタへの書き込みによって行われる。   The motor control block 44 of the digital arithmetic processing unit 30 is a circuit block specific to the control of the motor 2. The ADC interface (interface circuit) 46 is an interface between the system platform 32 and the A / D converter 50, and transfers the conversion data from the A / D converter 50 to the CPU core 34. Further, as will be described later in detail, the operation of the A / D converter 50 can be software controlled by the CPU core 34. The ADC interface 46 controls the operation of the A / D converter 50 according to the control command from the CPU core 34. A control command from the CPU core 34 to the ADC interface 46 is issued by writing to a control register described later.

システムプラットフォーム32は、プログラムを実行することにより、モータ2の駆動指令(たとえば3相の電圧指令値)を生成する。パルス幅変調器48は、システムプラットフォーム32が生成した駆動指令をパルス幅変調し、U,V,W相のPWM信号およびその反転信号を生成する。なおモータの制御方式やアルゴリズムは特に限定されず、公知のベクトル制御の技術を用いることができる。   The system platform 32 executes a program to generate a drive command for the motor 2 (for example, a three-phase voltage command value). The pulse width modulator 48 pulse-width modulates the drive command generated by the system platform 32, and generates U, V, and W-phase PWM signals and their inverted signals. The motor control method and algorithm are not particularly limited, and a known vector control technique can be used.

システムプラットフォーム32内の各ブロックと、モータ制御ブロック44内の各ブロックは、バス31を介して接続され、レジスタを介してさまざまなデータや制御ビットを、相互に参照し、あるいは書き込み可能となっている。   Each block in the system platform 32 and each block in the motor control block 44 are connected via a bus 31, and various data and control bits can be mutually referred to or written via a register. There is.

以上が制御回路10の全体構成である。続いて、ADCインタフェース46について説明する。   The above is the overall configuration of the control circuit 10. Next, the ADC interface 46 will be described.

(ADCインタフェース)
図3は、図2の制御回路10の一部の詳細なブロック図である。図3には、ADCインタフェース46の構成が詳細に示されている。ADCインタフェース46は、ADC I/Fレジスタ(以下、単にレジスタと称する)80、インタフェースユニット82_1〜82_3、イベントセレクタ84を備える。インタフェースユニット82は、チャンネルごとに設けられ、それらは同様に構成される。
(ADC interface)
FIG. 3 is a detailed block diagram of part of the control circuit 10 of FIG. FIG. 3 shows the configuration of the ADC interface 46 in detail. The ADC interface 46 includes an ADC I / F register (hereinafter, simply referred to as a register) 80, interface units 82_1 to 82_3, and an event selector 84. The interface unit 82 is provided for each channel, and they are similarly configured.

ADCインタフェース46は、CPUコア34と同じシステムクロックCLK_SYS(たとえば40MHz)と同期して動作する。一方、複数のA/Dコンバータ50は、A/Dコンバータ50の変換周波数動作範囲(たとえば16MHz)のクロックCLK_IRと同期して動作する。ADCインタフェース46とA/Dコンバータ50は、非同期であってよい。   The ADC interface 46 operates in synchronization with the same system clock CLK_SYS (for example, 40 MHz) as the CPU core 34. On the other hand, the plurality of A / D converters 50 operate in synchronization with the clock CLK_IR in the conversion frequency operation range (for example, 16 MHz) of the A / D converter 50. The ADC interface 46 and the A / D converter 50 may be asynchronous.

図4は、ADCインタフェース46とA/Dコンバータ50のインタフェースを説明する図である。図4には1回の変換動作が示される。A/Dコンバータ50はたとえば12ビット逐次比較型であり、1回の変換に、クロックCLK_IRの12サイクルを要する。変換に先だって、ADCインタフェース46からA/Dコンバータ50に対して、アナログポートを指定するポート選択信号PORT_SEL[2:0]が与えられる。変換開始信号CONV_IHがアサートされると、A/D変換が開始される。そして12サイクルの経過後に、12ビット分の変換が完了すると、変換完了信号TRIG_OUT_OHがアサートされ、12ビットの変換データDOUT[11:0]が有効となる。なおA/Dコンバータ50のビット数は特に限定されず、10ビットあるいは8ビットであってもよく、あるいはビット数が可変であってもよい。   FIG. 4 is a diagram illustrating an interface between the ADC interface 46 and the A / D converter 50. FIG. 4 shows one conversion operation. The A / D converter 50 is, for example, a 12-bit successive approximation type and requires 12 cycles of the clock CLK_IR for one conversion. Prior to conversion, a port selection signal PORT_SEL [2: 0] designating an analog port is given from the ADC interface 46 to the A / D converter 50. When the conversion start signal CONV_IH is asserted, A / D conversion is started. When the conversion of 12 bits is completed after 12 cycles, the conversion completion signal TRIG_OUT_OH is asserted and the 12-bit conversion data DOUT [11: 0] becomes valid. The number of bits of A / D converter 50 is not particularly limited, and may be 10 bits or 8 bits, or the number of bits may be variable.

図3に戻る。レジスタ80は、CPUコア34からバス31を介してアクセス可能である。レジスタ80は、チャンネルごとに、データレジスタと制御レジスタを含む。各チャンネルのデータレジスタには、そのチャンネルのA/Dコンバータ50が生成した変換データDOUTが格納される。CPUコア34は、データレジスタにアクセスすることにより、複数のアナログポートPORT-0〜PORT7に入力された検出信号のデジタル値を取得する。また各チャンネルのA/Dコンバータ50の動作は、CPUコア34がそのチャンネルの制御レジスタに書き込んだ値にもとづいて制御される。具体的にはADCインタフェース46は、制御レジスタの値にもとづいて、ポート選択信号PORT_SELおよび変換開始信号CONV_IHのタイミングを制御する。   Returning to FIG. The register 80 is accessible from the CPU core 34 via the bus 31. The register 80 includes a data register and a control register for each channel. The conversion data DOUT generated by the A / D converter 50 of the channel is stored in the data register of each channel. The CPU core 34 obtains the digital value of the detection signal input to the plurality of analog ports PORT-0 to PORT7 by accessing the data register. The operation of the A / D converter 50 of each channel is controlled based on the value written in the control register of the channel by the CPU core 34. Specifically, the ADC interface 46 controls the timing of the port selection signal PORT_SEL and the conversion start signal CONV_IH based on the value of the control register.

(制御周期)
続いて、制御周期について説明する。ADCインタフェース46によるA/Dコンバータ50の1制御周期は、n(nは2以上の整数)を最大とするk回(1≦k≦n)のA/D変換を含む。本実施の形態ではn=8とする。以下では1チャンネル分について説明する。
(Control cycle)
Next, the control cycle will be described. One control cycle of the A / D converter 50 by the ADC interface 46 includes k times (1 ≦ k ≦ n) A / D conversion in which n (n is an integer of 2 or more) is maximized. In this embodiment, n = 8. Hereinafter, one channel will be described.

回数kを設定するために、以下の制御レジスタが設けられる。なお本明細書に示す制御レジスタの値は例示であり、別の値を割り当ててもよい。またレジスタの名称も便宜的なものである。   The following control registers are provided to set the number of times k. It should be noted that the values of the control register shown in this specification are mere examples, and other values may be assigned. The names of the registers are also for convenience.

・回数レジスタ (BURST_SEL)
000: k=1
001: k=2

111: k=8
レジスタBURST_SELには、変換回数kを指定する値が格納される。変換回数kの最大値はnと等しい。すなわち、1≦k≦nである。
・ Count register (BURST_SEL)
000: k = 1
001: k = 2
~
111: k = 8
The register BURST_SEL stores a value designating the number of conversions k. The maximum number of conversions k is equal to n. That is, 1 ≦ k ≦ n.

つまり、1制御周期の間にk回のA/D変換が行われ、したがってk個(最大8個)の変換データDOUT0〜DOUTk-1が生成される。DOUTi-1はi回目の変換データを表し、図4のDOUT[11:0]に相当する。最大n個の変換データDOUT0〜DOUTn-1を格納するために、n個のデータレジスタが設けられる。   That is, k / A conversion is performed during one control cycle, and thus k (maximum 8) conversion data DOUT0 to DOUTk-1 are generated. DOUTi-1 represents the i-th converted data and corresponds to DOUT [11: 0] in FIG. In order to store the maximum n conversion data DOUT0 to DOUTn-1, n data registers are provided.

・データレジスタ (DATA0-DATAn-1)
データレジスタDATAの個数は、最大変換回数nと等しい。n個のデータレジスタ(DATA0-DATAn-1)は、n回分の変換データDOUT0〜DOUTn-1を格納する。変換データDOUT0〜DOUTn-1の格納は、上述したアクセス制御部92が行う。
・ Data register (DATA0-DATAn-1)
The number of data registers DATA is equal to the maximum conversion number n. The n data registers (DATA0-DATAn-1) store the converted data DOUT0 to DOUTn-1 for n times. Storage of the conversion data DOUT0 to DOUTn-1 is performed by the access control unit 92 described above.

・ポート選択レジスタ (PORT_SEL0-PORT_SELn-1)
000: 1番目のポート PORT-0
001: 2番目のポート PORT-1
010: 3番目のポート PORT-2

110: 7番目のポート PORT-6
111: 8番目のポート PORT-7
マルチプレクサ52の制御のために、ポート選択レジスタは、最大変換回数と等しいn個、設けられる。i番目のポート選択レジスタPORT_SELiの値Xi-1は、i回目のA/D変換において、マルチプレクサ52が選択すべきアナログポートを指定する。ポート選択レジスタPORT_SEL3の値X3が0であるとき、4回目のA/D変換において、1番目のアナログポートPORT-0が選択される。
・ Port selection register (PORT_SEL0-PORT_SELn-1)
000: 1st port PORT-0
001: Second port PORT-1
010: 3rd port PORT-2
~
110: 7th port PORT-6
111: 8th port PORT-7
To control the multiplexer 52, n port selection registers are provided, which is equal to the maximum conversion count. The value Xi−1 of the i-th port selection register PORT_SELi specifies the analog port that the multiplexer 52 should select in the i-th A / D conversion. When the value X3 of the port selection register PORT_SEL3 is 0, the first analog port PORT-0 is selected in the fourth A / D conversion.

図5は、A/Dコンバータ50およびADCインタフェース46の1制御周期の動作波形図である。はじめに、1回目の変換に先立ち、マルチプレクサ52に対するポート選択信号PORT_SELとして、1番目のポート選択レジスタPORT_SEL0の値がセットされる。続いて、変換開始信号CONV_IHがアサートされると変換が開始し、変換が終了すると、変換終了信号TRIG_OUT_OHがアサートされ、1回目の変換データDOUT0が有効となる。続いて、2回目の変換に先立ち、マルチプレクサ52に対するポート選択信号PORT_SELとして、2番目のポート選択レジスタPORT_SEL1の値がセットされる。続いて、変換開始信号CONV_IHがアサートされると変換が開始し、変換が終了すると、変換終了信号TRIG_OUT_OHがアサートされ、2回目の変換データDOUT1が有効となる。同様の処理をk回繰り返すと1制御周期が終了する。   FIG. 5 is an operation waveform diagram of the A / D converter 50 and the ADC interface 46 in one control cycle. First, prior to the first conversion, the value of the first port selection register PORT_SEL0 is set as the port selection signal PORT_SEL for the multiplexer 52. Subsequently, when the conversion start signal CONV_IH is asserted, the conversion starts, and when the conversion ends, the conversion end signal TRIG_OUT_OH is asserted and the first conversion data DOUT0 becomes valid. Subsequently, prior to the second conversion, the value of the second port selection register PORT_SEL1 is set as the port selection signal PORT_SEL for the multiplexer 52. Subsequently, when the conversion start signal CONV_IH is asserted, the conversion starts, and when the conversion ends, the conversion end signal TRIG_OUT_OH is asserted and the second conversion data DOUT1 becomes valid. When the same process is repeated k times, one control cycle ends.

(イベント)
続いて図3に戻り、イベントについて説明する。制御回路10は、制御回路10の内部で発生するさまざまなイベントをトリガとして制御可能に構成される。制御回路10の内部において生成され、そのエッジ(あるいはレベル)がイベントの発生を表す信号を、内部信号と称する。
(Event)
Next, returning to FIG. 3, the event will be described. The control circuit 10 is configured to be controllable by using various events that occur inside the control circuit 10 as a trigger. A signal that is generated inside the control circuit 10 and whose edge (or level) represents the occurrence of an event is called an internal signal.

本実施の形態において、制御回路10では、以下のイベントのうち、少なくともひとつ、好ましくは複数が利用可能となっている。
・ U相 ターンオンイベント
・ U相 ターンオフイベント
・ V相 ターンオンイベント
・ V相 ターンオフイベント
・ W相 ターンオンイベント
・ W相 ターンオフイベント
In the present embodiment, the control circuit 10 can use at least one, preferably a plurality of the following events.
・ U-phase turn-on event ・ U-phase turn-off event ・ V-phase turn-on event ・ V-phase turn-off event ・ W-phase turn-on event ・ W-phase turn-off event

たとえばU相のターンオン、ターンオフのイベントを用いたい場合、パルス幅変調器48において生成されるU相PWM信号PWM_Uを内部信号として用いればよく、そのポジティブエッジ、ネガティブエッジそれぞれが、U相のターンオン、ターンオフに対応する。あるいは反転信号#PWM_Uを内部信号として用いてもよく、そのネガティブエッジ、ポジティブエッジそれぞれが、U相のターンオン、ターンオフに対応する。本明細書において#は、論理反転を表す。   For example, when it is desired to use U-phase turn-on and turn-off events, the U-phase PWM signal PWM_U generated in the pulse width modulator 48 may be used as an internal signal, and the positive edge and the negative edge thereof are the U-phase turn-on and Corresponds to turn-off. Alternatively, the inversion signal #PWM_U may be used as an internal signal, and the negative edge and the positive edge thereof respectively correspond to turn-on and turn-off of the U phase. In the present specification, # represents logical inversion.

同様に、V相のターンオン、ターンオフのイベントを用いたい場合、V相PWM信号PWM_V(もしくはその反転信号#PWM_V)を内部信号として用いればよく、W相のターンオン、ターンオフのイベントを用いたい場合、W相PWM信号PWM_W(もしくはその反転信号#PWM_W)を内部信号として用いればよい。   Similarly, when the V-phase turn-on and turn-off events are to be used, the V-phase PWM signal PWM_V (or its inverted signal #PWM_V) may be used as an internal signal, and when the W-phase turn-on and turn-off events are to be used, The W-phase PWM signal PWM_W (or its inverted signal #PWM_W) may be used as the internal signal.

また制御回路10では、イベントとして、パルス幅変調器48において使用される三角波のピーク(山)およびボトム(谷)が利用可能となっている。
・PWMの三角波のピークイベント、ボトムイベント
In the control circuit 10, the peak (peak) and the bottom (valley) of the triangular wave used in the pulse width modulator 48 are available as events.
・ PWM triangular wave peak and bottom events

ピーク、ボトムに対応する内部信号として、パルス幅変調器48からADCインタフェース46には、三角波のピークおよびボトムを表すピークボトム検出信号SP/Bが供給される。たとえばピークボトム検出信号SP/Bは、ピーク、ボトムそれぞれにおいて、システムクロックCLK_SYSの1サイクル、アサート(たとえばハイレベル)される。 As an internal signal corresponding to the peak and the bottom, the peak / bottom detection signal S P / B representing the peak and the bottom of the triangular wave is supplied from the pulse width modulator 48 to the ADC interface 46. For example, the peak-bottom detection signal SP / B is asserted (for example, high level) for one cycle of the system clock CLK_SYS at each of the peak and the bottom.

ピークボトムパルス発生器86は、ピークボトム検出信号SP/Bを受け、ピーク、ボトムごとにレベルが遷移するピークボトムパルスPP/Bを生成する。 Peak bottom pulse generator 86 receives the peak-bottom detection signal S P / B, peak, level of each bottom to generate a peak-bottom pulse P P / B of transition.

図6は、パルス幅変調器48およびピークボトムパルス発生器86の動作波形図である。パルス幅変調器48においてタイマカウンタは、PWM周期の三角波を生成し、ピーク、ボトムそれぞれにおいて、ピークボトム検出信号SP/Bをアサート(たとえばハイレベル)する。ピークボトムパルス発生器86は、ピークボトム検出信号SP/Bがアサートされるたびに、ピークボトムパルスPP/Bのレベルを遷移させる。こうして生成されたピークボトムパルスPP/Bは、そのほかの内部信号(PWM_U〜PWM_W)と同様に、PWM周期を有するパルス信号となり、それらを同等に扱うことが可能である。 FIG. 6 is an operation waveform diagram of the pulse width modulator 48 and the peak bottom pulse generator 86. In the pulse width modulator 48, the timer counter generates a triangular wave having a PWM cycle, and asserts a peak-bottom detection signal SP / B (for example, high level) at each of the peak and the bottom. The peak-bottom pulse generator 86 changes the level of the peak-bottom pulse P P / B every time the peak-bottom detection signal S P / B is asserted. The peak-bottom pulse P P / B generated in this way becomes a pulse signal having a PWM cycle, like the other internal signals (PWM_U to PWM_W), and they can be treated equally.

図3に戻る。イベントセレクタ84は、各チャンネルについて、複数の内部信号からひとつを選択し、イベント信号EVTとして、対応するインタフェースユニット82に供給する。イベント信号EVTに使用する内部信号は、レジスタ80の制御レジスタの値に応じてチャンネルごとに個別に選択可能である。   Returning to FIG. The event selector 84 selects one of a plurality of internal signals for each channel and supplies it as an event signal EVT to the corresponding interface unit 82. The internal signal used for the event signal EVT can be individually selected for each channel according to the value of the control register of the register 80.

各チャンネルにおいて、インタフェースユニット82は、イベントセレクタ84からのイベント信号EVTにもとづいて、タイミング信号TMGを生成し、タイミング信号TMGに応じてA/Dコンバータ50の動作を制御する。これをハードウェアモードという。なお後述するように、A/Dコンバータ50を、イベント信号EVTに依存せずに制御することも可能であり、これをソフトウェアモードと称する。   In each channel, the interface unit 82 generates the timing signal TMG based on the event signal EVT from the event selector 84, and controls the operation of the A / D converter 50 according to the timing signal TMG. This is called hardware mode. As will be described later, it is possible to control the A / D converter 50 without depending on the event signal EVT, and this is called a software mode.

図7は、内部信号とイベントを示す図である。図3に示すように、ADCインタフェース46には、複数の内部信号PWM_U,PWM_V,PWM_W,ピークボトムパルスPP/Bが入力される。したがって各PWM周期において、8個のイベント(i)〜(viii)を、タイミング制御(具体的には後述するスタート状態の制御や変換タイミング)に利用することができる。非特許文献1に記載の従来技術では、17ページに記載のように、A/D変換の動作タイミングが、ハードウェアとして構成されるトリガ発生器(Trigger generator)によって生成されており、したがって、A/Dコンバータのタイミング制御に、ソフトウェアを介在させることができず、柔軟性に欠けていた。これに対して本実施の形態によれば、内部信号(イベント)を利用して、自由にA/Dコンバータ50のタイミングを制御することができる。これは、プログラムの自由度を高め、あるいはモータの制御性を高めることに寄与する。 FIG. 7 is a diagram showing internal signals and events. As shown in FIG. 3, a plurality of internal signals PWM_U, PWM_V, PWM_W and a peak / bottom pulse P P / B are input to the ADC interface 46. Therefore, in each PWM cycle, eight events (i) to (viii) can be used for timing control (specifically, start state control and conversion timing described later). In the conventional technique described in Non-Patent Document 1, as described on page 17, the operation timing of A / D conversion is generated by a trigger generator (Trigger generator) configured as hardware. Software was not able to intervene in the timing control of the / D converter, which lacked flexibility. On the other hand, according to the present embodiment, the timing of the A / D converter 50 can be freely controlled by using the internal signal (event). This contributes to increasing the degree of freedom of the program or the controllability of the motor.

(イベントセレクタ84およびインタフェースユニット82)
図8は、イベントセレクタ84およびインタフェースユニット82の構成例を示す図である。イベントセレクタ84は、チャンネルごとに設けられたセレクタ88_1〜88_3を含む。各セレクタ88は、対応する制御レジスタに格納された値に応じた内部信号を選択してイベント信号EVTを生成し、対応するインタフェースユニット82に出力する。
(Event selector 84 and interface unit 82)
FIG. 8 is a diagram showing a configuration example of the event selector 84 and the interface unit 82. The event selector 84 includes selectors 88_1 to 88_3 provided for each channel. Each selector 88 selects an internal signal corresponding to the value stored in the corresponding control register to generate an event signal EVT and outputs it to the corresponding interface unit 82.

続いてインタフェースユニット82の構成を説明する。ここでは第3チャンネルch2の構成のみを示すが、そのほかのチャンネルも同様に構成される。インタフェースユニット82は、タイミング信号生成回路90、アクセス制御部92、変換データバッファ94、エラー検出部96を備える。   Next, the configuration of the interface unit 82 will be described. Although only the configuration of the third channel ch2 is shown here, the other channels have the same configuration. The interface unit 82 includes a timing signal generation circuit 90, an access control unit 92, a conversion data buffer 94, and an error detection unit 96.

タイミング信号生成回路90は、イベントセレクタ84からのイベント信号EVTに応じて、タイミング信号TMGを生成する。たとえばタイミング信号生成回路90は、エッジセレクタ100、遅延回路102、遅延セレクタ104、非同期処理回路106を含む。   The timing signal generation circuit 90 generates the timing signal TMG according to the event signal EVT from the event selector 84. For example, the timing signal generation circuit 90 includes an edge selector 100, a delay circuit 102, a delay selector 104, and an asynchronous processing circuit 106.

上述のように、イベントセレクタ84から出力されるイベント信号EVTは、PWM周期を有するパルス信号である。エッジセレクタ100は、イベント信号EVTのポジティブエッジ、ネガティブエッジのうち、対応する制御レジスタの値に応じた一方を検出し、それを切り出す。つまり、ポジティブエッジ、ネガティブエッジそれぞれに対応する一方のイベントを選択する。遅延回路102は、カウンタを用いて構成され、切り出されたエッジ信号に、対応する制御レジスタの値に応じた遅延を与える。遅延セレクタ104は、それと対応する制御レジスタに応じて、遅延された、および遅延されない信号の一方を選択する。非同期処理回路106は、システムクロックCLK_SYSと同期した遅延セレクタ104の出力を、A/Dコンバータ側のクロックCLK_IRに同期処理し、タイミング信号TMGを生成する。   As described above, the event signal EVT output from the event selector 84 is a pulse signal having a PWM cycle. The edge selector 100 detects one of the positive edge and the negative edge of the event signal EVT according to the value of the corresponding control register, and cuts it out. That is, one event corresponding to each of the positive edge and the negative edge is selected. The delay circuit 102 is configured by using a counter, and gives the cut-out edge signal a delay according to the value of the corresponding control register. Delay selector 104 selects one of a delayed and an undelayed signal according to its corresponding control register. The asynchronous processing circuit 106 synchronously processes the output of the delay selector 104 synchronized with the system clock CLK_SYS with the clock CLK_IR on the A / D converter side to generate the timing signal TMG.

アクセス制御部92は、主として2つの機能を担う。ひとつは、ハードウェアモードにおいて、タイミング信号TMGをトリガとして、A/Dコンバータ50の変換タイミングを制御する機能(アクセスタイミング生成)である。もうひとつは、A/Dコンバータ50から得られた変換データDOUTを、レジスタ80のデータレジスタDATAに格納する機能(ADC制御)である。   The access control unit 92 mainly has two functions. One is a function (access timing generation) of controlling the conversion timing of the A / D converter 50 by using the timing signal TMG as a trigger in the hardware mode. The other is a function (ADC control) of storing the conversion data DOUT obtained from the A / D converter 50 in the data register DATA of the register 80.

変換データバッファ94は、A/Dコンバータ50が生成したデジタル値を一時的に格納する。エラー検出部96は、アクセス制御部92の状態にもとづいて、A/Dコンバータ50やインタフェースユニット82における異常の有無を判定する。エラー検出部96は、たとえば以下のエラーを検出する。エラー検出時においては、エラー通知用のレジスタに所定値(たとえば1)を書き込み、またCPUコア34に割り込みをかけてもよい。   The conversion data buffer 94 temporarily stores the digital value generated by the A / D converter 50. The error detection unit 96 determines whether there is an abnormality in the A / D converter 50 or the interface unit 82 based on the state of the access control unit 92. The error detection unit 96 detects the following errors, for example. When an error is detected, a predetermined value (for example, 1) may be written in the error notification register, and the CPU core 34 may be interrupted.

・イベントエラー
イベントエラーは、A/D変換中に、新たにA/D変換の開始のトリガとなるイベントが発生したときに、発生したものと判定される。
-Event error An event error is judged to have occurred when a new event that triggers the start of A / D conversion occurs during A / D conversion.

モータ制御では、高電圧を扱う必要があるため、意図しない制御が行われている場合には、いち早く検知して、モータを停止するなどの適切な保護処理が求められる。エラー検出部96にイベントエラーの検知機能を実装することにより、ADCインタフェース46に入力するイベントの関係が正しく制御できていないことをハードウェアレベルで迅速に検知することができ、回路を保護するができる。また機器1の設計段階においては、イベントエラーの検知は、ソフトウェアあるいはハードウェア設計のデバッグに大いに有用である。   Since high voltage needs to be handled in motor control, when unintentional control is performed, appropriate protection processing such as early detection and stopping the motor is required. By implementing the event error detection function in the error detection unit 96, it is possible to quickly detect at the hardware level that the relationship of the events input to the ADC interface 46 is not correctly controlled, and the circuit is protected. it can. Also, in the design stage of the device 1, detection of event error is very useful for debugging software or hardware design.

続いて、A/Dコンバータ50のタイミング制御について説明する。本実施の形態においては、制御回路10の代表的な制御可能なタイミングとして
(1) 動作スタートのタイミング
(2) k回のA/D変換のタイミング
が存在する。
Next, the timing control of the A / D converter 50 will be described. In the present embodiment, there are (1) operation start timing (2) k times of A / D conversion timing as typical controllable timing of the control circuit 10.

図9は、A/Dコンバータ50の制御シーケンスを示す図である。動作スタートとは、あるモードにおいては、A/Dコンバータ50の1制御周期の開始に対応する。動作スタートに応じて、スタートフラグ(START)が立つと、A/Dコンバータ50がk回のA/D変換を実行可能な状態となる。実施の形態に係る制御回路10では、動作スタートのタイミングならびに複数のA/D変換のタイミングの少なくともひとつが、内部信号から得られるイベント信号(タイミング信号)によって制御可能となっている。   FIG. 9 is a diagram showing a control sequence of the A / D converter 50. The operation start corresponds to the start of one control cycle of the A / D converter 50 in a certain mode. When the start flag (START) is set in response to the operation start, the A / D converter 50 is in a state in which it can execute k A / D conversions. In the control circuit 10 according to the embodiment, at least one of the operation start timing and the plurality of A / D conversion timings can be controlled by an event signal (timing signal) obtained from an internal signal.

制御回路10は、多様なモードが切り替え可能となっている。以下、制御回路10のモードについて説明する。なお、3チャンネルch0〜ch2は同様であるため、一個のチャンネルのみに着目して説明する。なお制御レジスタおよびデータレジスタは、チャンネルごとに設けられる。   The control circuit 10 can switch between various modes. Hereinafter, modes of the control circuit 10 will be described. Since the three channels ch0 to ch2 are similar, only one channel will be focused and described. The control register and the data register are provided for each channel.

<バッファモードと通常モード>
実施の形態に係る制御回路10は、バッファモードと通常モードという2つのモードをサポートしており、レジスタMODE_BUFの値によって一方を指定可能となっている。2つのモードでは、変換データDOUT0〜DOUTn-1のデータレジスタDATA0〜DATAn-1への格納方法が異なる。
<Buffer mode and normal mode>
The control circuit 10 according to the embodiment supports two modes, a buffer mode and a normal mode, and one of them can be designated by the value of the register MODE_BUF. In the two modes, the method of storing the converted data DOUT0 to DOUTn-1 in the data registers DATA0 to DATAn-1 is different.

・モードバッファレジスタ(MODE_BUF)
値0: 通常モード
値1: バッファモード
-Mode buffer register (MODE_BUF)
Value 0: Normal mode Value 1: Buffer mode

図10(a)は、バッファモードにおけるアクセス制御部92の動作を説明する図である。図10(a)には、ポート選択レジスタも併せて示される。バッファモードにおいて、i回目(i=1〜8)の変換データDOUTi-1は、i番目のデータレジスタ(DATAi-1)に格納される。このバッファモードにおいて、n個のデータレジスタには、変換の時系列の順序でデータが格納されることとなる。バッファモードでは、n回のうち複数回、同じアナログポートを指定し、そのデータを取得することが可能である。ユーザはこのことを念頭においてソフトウェアを設計すればよく、プログラミングが容易となる。   FIG. 10A is a diagram for explaining the operation of the access control unit 92 in the buffer mode. Port selection registers are also shown in FIG. In the buffer mode, the i-th (i = 1 to 8) conversion data DOUTi-1 is stored in the i-th data register (DATAi-1). In this buffer mode, data is stored in the n data registers in the order of conversion time series. In the buffer mode, the same analog port can be designated and the data can be acquired multiple times out of n times. The user may design the software with this in mind, which facilitates programming.

図10(b)は、通常モードにおけるアクセス制御部92の動作を説明する図である。ポート選択レジスタの値は、図10(a)と同じである。通常モードにおいて、アクセス制御部92は、ポート選択レジスタPORT_SEL0〜PORT_SEL7を参照して、変換データDOUT〜DOUT7の格納先を決定する。具体的にはアクセス制御部92は、i回目の変換データDOUTi-1を、対応するポート選択レジスタPORT_SELi-1値に応じたデータレジスタDATAjに格納する。たとえば図10(b)において、1回目の変換データDOUT0に着目する。対応するポート選択レジスタPORT_SEL0の値は2であるから、変換データDOUT0は、データレジスタDATA2に格納される。同様に2回目の変換データDOUT1に着目すると、対応するポート選択レジスタPORT_SEL1の値は4であるから、変換データDOUT1は、データレジスタDATA4に格納される。   FIG. 10B is a diagram for explaining the operation of the access control unit 92 in the normal mode. The value of the port selection register is the same as that in FIG. In the normal mode, the access control unit 92 refers to the port selection registers PORT_SEL0 to PORT_SEL7 to determine the storage destination of the conversion data DOUT to DOUT7. Specifically, the access control unit 92 stores the i-th conversion data DOUTi-1 in the data register DATAj corresponding to the corresponding port selection register PORT_SELi-1 value. For example, in FIG. 10B, attention is paid to the first conversion data DOUT0. Since the value of the corresponding port selection register PORT_SEL0 is 2, the conversion data DOUT0 is stored in the data register DATA2. Similarly, focusing on the second conversion data DOUT1, the value of the corresponding port selection register PORT_SEL1 is 4, so the conversion data DOUT1 is stored in the data register DATA4.

つまり通常モードでは、i番目のアナログポートPORT-iの変換データが、i番目のデータレジスタDATAi-1に格納されることとなる。通常モードでは、1制御周期につき、ひとつのアナログポートのデータを、1回だけ取得することができる。制御回路10に必要な機能に応じて、通常モードとバッファモードを選択することができ、ソフトウェア制御の柔軟性が提供される。   That is, in the normal mode, the conversion data of the i-th analog port PORT-i is stored in the i-th data register DATAi-1. In the normal mode, the data of one analog port can be acquired only once per control cycle. The normal mode and the buffer mode can be selected depending on the function required of the control circuit 10, and the flexibility of software control is provided.

<ハードウェアモードとソフトウェアモード>
動作スタートに関して、以下で説明するハードウェアモードとソフトウェアモードが用意されている。これらのモードは、モードスタートレジスタ(MODE_START)の値で指定できる。
<Hardware mode and software mode>
Regarding the operation start, the hardware mode and software mode described below are prepared. These modes can be specified by the value of the mode start register (MODE_START).

・モードスタートレジスタ(MODE_START)
0:ソフトウェアモード
1:ハードウェアモード
・ Mode start register (MODE_START)
0: Software mode 1: Hardware mode

ソフトウェアモードは、動作スタートが、ハードウェアの状態(つまり内部信号やイベント信号)に依存せずに、ソフトウェアによって発生する。ソフトウェア的に動作スタートするために、ランレジスタが設けられる。
・ランレジスタ(RUN)
1: 1の書き込みで動作スタート
具体的にはソフトウェア制御にもとづいてCPUコア34が、ランレジスタRUNをアサートする(1を書き込み)と、それをトリガとして、A/Dコンバータ50の動作が開始する。
In the software mode, the operation start is generated by software without depending on the state of hardware (that is, internal signal or event signal). A run register is provided to start the operation by software.
・ Run register (RUN)
Operation start by writing 1: 1 Specifically, when the CPU core 34 asserts the run register RUN (writes 1) based on software control, the operation of the A / D converter 50 is started by using it as a trigger. ..

ハードウェアモードでは、ランレジスタRUNがアサートされた後に、ハードウェアの所定の状態をトリガとして、動作スタートが発生する。具体的にはランレジスタRUNに1が書き込まれた後に、イベントセレクタ84からのスタートイベント信号EVT_STARTが入力されると、それをトリガとして、A/Dコンバータ50の動作がスタートする。スタートイベント信号EVT_STARTは、イベントセレクタ84が出力するイベント信号のひとつである。   In the hardware mode, after the run register RUN is asserted, the operation start is triggered by a predetermined state of the hardware. Specifically, when the start event signal EVT_START is input from the event selector 84 after 1 is written in the run register RUN, the operation of the A / D converter 50 is started by using it as a trigger. The start event signal EVT_START is one of the event signals output by the event selector 84.

スタートイベント信号EVT_STARTの生成のために、以下の制御レジスタが用意される。   The following control registers are prepared for generating the start event signal EVT_START.

・イベント選択レジスタ(EVENT_SEL)
0000: PWM_Uを選択
0001: PWM_Vを選択
0010: PWM_Wを選択
0011: #PWM_Uを選択
0100: #PWM_Vを選択
0101: #PWM_Wを選択
0110: PP/Bを選択
0111: #PP/Bを選択
スタートイベント信号EVT_STARTとなる内部信号を指定する。図3のイベントセレクタ84(図8のセレクタ88)を制御するために使用される。
-Event selection register (EVENT_SEL)
0000: Select PWM_U 0001: Select PWM_V 0010: Select PWM_W 0011: Select #PWM_U 0100: Select #PWM_V 0101: Select #PWM_W 0110: Select P P / B 0111: Select #P P / B An internal signal to be the start event signal EVT_START is designated. It is used to control the event selector 84 of FIG. 3 (selector 88 of FIG. 8).

インタフェースユニット82は、スタートイベント信号EVT_STARTにもとづいて、スタートタイミング信号TMG_STARTを生成する。スタートタイミング信号TMG_STARTの生成に関して、以下の制御レジスタが用意される。   The interface unit 82 generates the start timing signal TMG_START based on the start event signal EVT_START. The following control registers are prepared for generating the start timing signal TMG_START.

・エッジ選択レジスタ(EVENT_EDGE)
0: ポジティブエッジ
1: ネガティブエッジ
内部信号のポジティブエッジ、ネガティブエッジのいずれを、スタートイベント信号EVT_STARTの生成に用いるかを指定する。図8のエッジセレクタ100を制御するために使用される。
-Edge selection register (EVENT_EDGE)
0: Positive edge 1: Negative edge Specifies whether the positive edge or the negative edge of the internal signal is used for generating the start event signal EVT_START. It is used to control the edge selector 100 of FIG.

イベント選択レジスタEVENT_SELとエッジ選択レジスタEVENT_EDGEの組み合わせによって、動作スタートのトリガとなるイベント(スタートイベント)が指定される。   A combination of the event selection register EVENT_SEL and the edge selection register EVENT_EDGE specifies the event (start event) that triggers the operation start.

・遅延設定レジスタ(EVENT_DELAY)
スタートイベント信号EVT_STARTのアサートから、スタートタイミング信号TMG_STARTのアサートまでの遅延時間を指定。図8の遅延回路102を制御するために使用される。
・ Delay setting register (EVENT_DELAY)
Specify the delay time from the assertion of the start event signal EVT_START to the assertion of the start timing signal TMG_START. It is used to control the delay circuit 102 of FIG.

・遅延イネーブルレジスタ(EVENT_DELAY_EN)
スタートタイミング信号TMG_STARTの遅延の有無を指定する。図8の遅延セレクタ104を制御するために使用される。
・ Delay enable register (EVENT_DELAY_EN)
The presence or absence of delay of the start timing signal TMG_START is designated. It is used to control the delay selector 104 of FIG.

また、動作スタートを解除するために、ストップレジスタ(STOP)が設けられる。
・ストップレジスタ(STOP)
1: 1の書き込みで動作停止(スタート状態の解除)
以上が動作スタートに関する説明である。
A stop register (STOP) is provided to release the operation start.
・ Stop register (STOP)
1: Stops operation by writing 1 (release of start state)
The above is the description regarding the operation start.

<オートモードとシーケンシャルモード>
続いて、変換タイミングについて説明する。変換タイミングに関連して、2つのモード、すなわちオートモードとシーケンシャルモードが用意され、その選択のために以下の制御レジスタが用意される。
<Auto mode and sequential mode>
Next, the conversion timing will be described. Two modes, that is, an auto mode and a sequential mode, are prepared in relation to the conversion timing, and the following control registers are prepared for selection thereof.

・モードシーケンスレジスタ(MODE_SEQ)
0:オートモード
1:シーケンシャルモード
・ Mode sequence register (MODE_SEQ)
0: Auto mode 1: Sequential mode

アクセス制御部92は、(i)オートモードにおいて、1制御周期に含まれるk回のA/D変換を自動的に実行する。すなわち、複数の変換タイミングCONV0〜CON7は、動作スタート後に、アクセス制御部92が自動生成する。   The access control unit 92 automatically executes k / A conversions included in one control cycle in (i) auto mode. That is, the plurality of conversion timings CONV0 to CON7 are automatically generated by the access control unit 92 after the operation starts.

アクセス制御部92は、(ii)シーケンシャルモードにおいて、1制御周期に含まれるk回のA/D変換それぞれを、A/D変換ごとにイベントが発生するごとに実行する。具体的には、シーケンシャルモードにおいて、図8のイベントセレクタ84は、スタートイベント信号EVT_STARTに続いて、変換イベント信号EVT0〜EVT7を順に発生する。   In the (ii) sequential mode, the access control unit 92 executes k times of A / D conversion included in one control cycle each time an event occurs for each A / D conversion. Specifically, in the sequential mode, the event selector 84 of FIG. 8 sequentially generates the conversion event signals EVT0 to EVT7 following the start event signal EVT_START.

変換イベント信号EVT0〜EVT7に関して、以下の制御レジスタが用意される。
・個別イベント選択レジスタ(EVENT_SEL0-EVENT_SELn-1)
それぞれ、変換イベント信号EVT0〜EVT7となる内部信号を指定する。値についてはEVENT_SELと同様であり、図3のイベントセレクタ84(図8のセレクタ88)を制御するために使用される。
The following control registers are prepared for the conversion event signals EVT0 to EVT7.
-Individual event selection register (EVENT_SEL0-EVENT_SELn-1)
The respective internal signals to be the conversion event signals EVT0 to EVT7 are designated. The value is similar to EVENT_SEL and is used to control the event selector 84 in FIG. 3 (selector 88 in FIG. 8).

・個別エッジ選択レジスタ(EVENT_EDGE0-EVENT_EDGE7)
0: ポジティブエッジ
1: ネガティブエッジ
内部信号のポジティブエッジ、ネガティブエッジのいずれを、変換イベント信号EVT_CONVの生成に用いるかを指定する。図8のエッジセレクタ100を制御するために使用される。
-Individual edge selection register (EVENT_EDGE0-EVENT_EDGE7)
0: Positive edge 1: Negative edge Designate which of the positive edge and the negative edge of the internal signal is used to generate the conversion event signal EVT_CONV. It is used to control the edge selector 100 of FIG.

個別イベント選択レジスタEVENT_SELi-1と個別エッジ選択レジスタEVENT_EDGEi-1の組み合わせによって、i回目のA/D変換のトリガとなるイベント(変換イベント)が指定される。   A combination of the individual event selection register EVENT_SELi-1 and the individual edge selection register EVENT_EDGEi-1 specifies an event (conversion event) that triggers the i-th A / D conversion.

図8のタイミング信号生成回路90は、レジスタ80からの変換イベント信号EVT0〜EVT7にもとづいて、変換タイミング信号TMG0〜TMG7を生成する。変換タイミング信号TMG0〜TMG7の生成に関して、以下の制御レジスタが用意される。   The timing signal generation circuit 90 of FIG. 8 generates conversion timing signals TMG0 to TMG7 based on the conversion event signals EVT0 to EVT7 from the register 80. The following control registers are prepared for generation of the conversion timing signals TMG0 to TMG7.

・遅延設定レジスタ(EVENT_DELAY0-EVENT_DELAY7)
各変換イベント信号EVTiのアサートから、変換タイミング信号TMGiのアサートまでの遅延時間を指定。値についてはEVENT_DELAYと同様であり、図8の遅延回路102を制御するために使用される。
・ Delay setting register (EVENT_DELAY0-EVENT_DELAY7)
Designate the delay time from the assertion of each conversion event signal EVTi to the assertion of the conversion timing signal TMGi. The value is similar to EVENT_DELAY and is used to control the delay circuit 102 in FIG.

・遅延イネーブルレジスタ(EVENT_DELAY_EN0-EVENT_DELAY_ENn-1)
各変換イベント信号TMGiの遅延の有無を指定する。値についてはEVENT_DELAY_EN0と同様であり、図8の遅延セレクタ104を制御するために使用される。
・ Delay enable register (EVENT_DELAY_EN0-EVENT_DELAY_ENn-1)
The presence or absence of delay of each conversion event signal TMGi is designated. The value is similar to EVENT_DELAY_EN0 and is used to control the delay selector 104 in FIG.

オートモードでは、n回のA/D変換を自動的に、インタフェースユニット82が生成するタイミングで行うことができ、A/D変換のタイミングがそれほどシビアでない状況において有用である。シーケンシャルモード(マニュアルモード)では、各A/D変換のタイミング(変換タイミング)を個別にマニュアルで指定することができ、シビアなタイミング制御に対応できる。   In the auto mode, n times of A / D conversion can be automatically performed at the timing generated by the interface unit 82, which is useful in a situation where the A / D conversion timing is not so severe. In the sequential mode (manual mode), the timing (conversion timing) of each A / D conversion can be manually specified individually, and severe timing control can be supported.

<1回変換モードと連続変換モード>
アクセス制御部92は、以下で説明する1回変換モードと連続変換モードが選択可能となっている。これらのモードの切りかえのために、以下の制御レジスタが設けられる。
<One-time conversion mode and continuous conversion mode>
The access control unit 92 can select one-time conversion mode and continuous conversion mode described below. The following control registers are provided for switching between these modes.

・モードバーストレジスタ(MODE_BURST)
0: 1回変換モード
1: 連続変換モード
・ Mode burst register (MODE_BURST)
0: Single conversion mode 1: Continuous conversion mode

アクセス制御部92は、(i)1回変換モードにおいて、k回の変換処理が終了すると、動作エンドとなり、図9のスタートフラグ(START)が一旦ネゲートされ、次の動作スタートを待機する。ソフトウェアモードでは、次にRUNレジスタがライトされると、動作スタートとなり、ハードウェアモードでは、RUNレジスタのライト、スタートイベントの発生によって、動作スタートとなる。   In the (i) one-time conversion mode, when the conversion process of k times is completed, the access control unit 92 becomes an operation end, the start flag (START) of FIG. 9 is negated once, and waits for the next operation start. In the software mode, the operation is started when the RUN register is written next. In the hardware mode, the operation is started by writing the RUN register and generating a start event.

またアクセス制御部92は(ii)連続変換モードでは、1制御周期の変換処理が終了すると、次の動作スタートを待たずに、次の制御周期に移行する。つまり、1制御周期が終了しても、スタートフラグが立った状態が維持される。   Further, in the (ii) continuous conversion mode, the access control unit 92 shifts to the next control cycle without waiting for the start of the next operation when the conversion processing of one control cycle is completed. That is, even after one control cycle ends, the state in which the start flag is raised is maintained.

言い換えれば1回変換モードでは、制御周期毎に動作スタートが要求されるのに対して、連続変換モードでは、初回のみ、動作スタートが要求される。1回変換モードと連続変換モードを選択可能とすることで、さらなる柔軟性が提供される。   In other words, in the single conversion mode, the operation start is requested every control cycle, whereas in the continuous conversion mode, the operation start is requested only for the first time. The additional flexibility is provided by the ability to select between the single conversion mode and the continuous conversion mode.

以上が、制御回路10がサポートするモードの説明である。続いて、制御回路10の具体的な動作を説明する。図11は、ハードウェアモード、シーケンシャルモードの組み合わせを示す波形図である。時刻t0にRUNレジスタに1がライトされると、回路がイネーブル状態となるが、ハードウェアモードではスタート状態にはならない。ここではPWMのボトム(PWM周期の先頭)が、スタートイベントとして指定される。つまりピークボトムパルスPP/Bのポジティブエッジにもとづいて、スタートタイミング信号TMG_STARTが生成され、時刻t1にスタート状態となる。ボトムイベントを選択することで、A/Dコンバータの制御周期を、PWM動作に同期させることができる。 The above is the description of the modes supported by the control circuit 10. Subsequently, a specific operation of the control circuit 10 will be described. FIG. 11 is a waveform diagram showing a combination of the hardware mode and the sequential mode. When 1 is written to the RUN register at time t0, the circuit is enabled, but not in the hardware mode. Here, the bottom of PWM (the beginning of the PWM cycle) is designated as the start event. That is, the start timing signal TMG_START is generated based on the positive edge of the peak bottom pulse P P / B , and the start state is reached at time t1. By selecting the bottom event, the control cycle of the A / D converter can be synchronized with the PWM operation.

1回目の変換は、W相PWM信号のネガティブエッジイベントを、2回目の変換は、V相PWM信号のネガティブエッジイベントを、3回目の変換は、U相PWM信号のネガティブエッジイベントを、トリガとしており、各イベントに応答して、変換タイミング信号TMG_CONV1〜TMG_CONV3が生成される。以降も同様である。そして設定した回数(k回)、の変換が完了すると、スタートフラグがネゲートされ、非スタート状態となる。そして、次のPWMの周期に移行すると、ボトムイベントに応答してスタートタイミング信号が生成され、再びスタート状態となる。   The first conversion is triggered by the negative edge event of the W-phase PWM signal, the second conversion is triggered by the negative edge event of the V-phase PWM signal, and the third conversion is triggered by the negative edge event of the U-phase PWM signal. Therefore, the conversion timing signals TMG_CONV1 to TMG_CONV3 are generated in response to each event. The same applies hereafter. When the set number of conversions (k times) are completed, the start flag is negated and the non-start state is set. Then, when shifting to the next PWM cycle, a start timing signal is generated in response to the bottom event, and the start state is resumed.

以上、本発明について、実施の形態をもとに説明した。この実施の形態は例示であり、それらの各構成要素や各処理プロセスの組み合わせにいろいろな変形例が可能なこと、またそうした変形例も本発明の範囲にあることは当業者に理解されるところである。以下、こうした変形例について説明する。   The present invention has been described above based on the embodiment. This embodiment is merely an example, and it will be understood by those skilled in the art that various modifications can be made to the combinations of their respective constituent elements and processing processes, and that such modifications are also within the scope of the present invention. is there. Hereinafter, such modified examples will be described.

モータの相数は特に限定されない。またレゾルバやロータリエンコーダを用いてモータの機械的状態を直接モニタする方式にも、制御回路10を利用することが可能である。この場合、レゾルバからの検出信号(速度信号や位置信号)を、いずれかのアナログポートに入力すればよい。   The number of phases of the motor is not particularly limited. The control circuit 10 can also be used in a method of directly monitoring the mechanical state of a motor using a resolver or rotary encoder. In this case, the detection signal (speed signal or position signal) from the resolver may be input to any analog port.

2…モータ、4…駆動装置、6…インバータ、10…制御回路、12…A/Dコンバータモジュール、14…プロセッサ、16…パルス幅変調器、18…プログラム、30…デジタル演算処理部、31…バス、32…システムプラットフォーム、34…CPUコア、36,38…メモリコントローラ、40…パワーマネージメントユニット、42…システムコントローラ、44…モータ制御ブロック、46…ADCインタフェース、48…パルス幅変調器、50…A/Dコンバータ、52…マルチプレクサ、60…メモリ、62…不揮発性メモリ、64…揮発性メモリ、70…クロック発生器、80…レジスタ、82…インタフェースユニット、84…イベントセレクタ、86…ピークボトムパルス発生器、88…セレクタ、90…タイミング信号生成回路、92…アクセス制御部、94…変換データバッファ、96…エラー検出部、100…エッジセレクタ、102…遅延回路、104…遅延セレクタ、106…非同期処理回路。 2 ... Motor, 4 ... Drive device, 6 ... Inverter, 10 ... Control circuit, 12 ... A / D converter module, 14 ... Processor, 16 ... Pulse width modulator, 18 ... Program, 30 ... Digital arithmetic processing unit, 31 ... Bus, 32 ... System platform, 34 ... CPU core, 36, 38 ... Memory controller, 40 ... Power management unit, 42 ... System controller, 44 ... Motor control block, 46 ... ADC interface, 48 ... Pulse width modulator, 50 ... A / D converter, 52 ... Multiplexer, 60 ... Memory, 62 ... Nonvolatile memory, 64 ... Volatile memory, 70 ... Clock generator, 80 ... Register, 82 ... Interface unit, 84 ... Event selector, 86 ... Peak bottom pulse Generator, 88 ... Selector, 90 ... Timing signal generation circuit, 92 ... Access control section, 94 ... Conversion data buffer, 96 ... Error detection section, 100 ... Edge selector, 102 ... Delay circuit, 104 ... Delay selector, 106 ... Asynchronous Processing circuit.

Claims (15)

モータの制御回路であって、
それぞれに前記モータの電気的状態を示す検出信号が入力可能な複数m個(mは2以上の整数)のアナログポートと、
前記m個のアナログポートそれぞれの検出信号を受けるマルチプレクサを有し、前記マルチプレクサが選択した検出信号をデジタルデータに変換するA/Dコンバータと、
前記デジタルデータにもとづいて前記モータの駆動指令を生成するプロセッサと、
前記プロセッサからの制御指令に応じて前記A/Dコンバータの動作を制御するとともに、前記デジタルデータを前記プロセッサに受け渡すインタフェース回路と、
を備え、
前記インタフェース回路による前記A/Dコンバータの1制御周期は、n(nは2以上の整数)を最大とするk回(1≦k≦n)のA/D変換を含み、
前記インタフェース回路は、
n個のデータレジスタと、
n個のポート選択レジスタであって、i番目(1≦i≦n)のポート選択レジスタは、i回目のA/D変換において、前記マルチプレクサが選択すべき前記アナログポートを示す値を格納する、n個のポート選択レジスタと、
バッファモードにおいて、i回目の前記デジタルデータDOUT i-1 を、i番目の前記データレジスタに格納するアクセス制御部と、
を含み、
前記アクセス制御部はさらに通常モードをサポートし、前記通常モードにおいて、前記アクセス制御部は、i回目の前記デジタルデータDOUTi-1を、前記n個のデータレジスタのうち対応するポート選択レジスタの値に応じたひとつに格納し、
前記インタフェース回路はさらに、
前記バッファモードと前記通常モードの一方を指示する値を格納するモードバッファレジスタを含むことを特徴とする制御回路。
A motor control circuit,
A plurality of m (m is an integer of 2 or more) analog ports to which a detection signal indicating the electric state of the motor can be input,
An A / D converter that has a multiplexer that receives a detection signal of each of the m analog ports, and that converts the detection signal selected by the multiplexer into digital data;
A processor that generates a drive command for the motor based on the digital data;
An interface circuit that controls the operation of the A / D converter in accordance with a control command from the processor and transfers the digital data to the processor;
Equipped with
One control cycle of the A / D converter by the interface circuit includes k times (1 ≦ k ≦ n) A / D conversion in which n (n is an integer of 2 or more) is maximum.
The interface circuit is
n data registers,
Of the n port selection registers, the i-th (1 ≦ i ≦ n) port selection register stores a value indicating the analog port to be selected by the multiplexer in the i-th A / D conversion. n port selection registers,
An access control unit for storing the i-th digital data DOUT i-1 in the i-th data register in the buffer mode ;
Including,
The access control unit further supports a normal mode, and in the normal mode, the access control unit sets the i-th digital data DOUTi-1 to a value of a corresponding port selection register among the n data registers. Store in one according to,
The interface circuit further comprises
Control circuit characterized the early days including the mode buffer register for storing a value indicating one of the buffer mode and the normal mode.
前記インタフェース回路はさらに、
前記1制御周期に含まれる変換の回数kを指定する値を格納するレジスタを含むことを特徴とする請求項に記載の制御回路。
The interface circuit further comprises
The control circuit according to claim 1 , further comprising a register that stores a value that specifies the number k of conversions included in one control cycle.
前記インタフェース回路はさらに、ランレジスタを含み、
前記アクセス制御部はソフトウェアモードにおいて、前記ランレジスタのアサートを、前記A/Dコンバータの動作スタートのトリガとすることを特徴とする請求項1または2に記載の制御回路。
The interface circuit further includes a run register,
3. The control circuit according to claim 1, wherein in the software mode, the access control unit uses the assertion of the run register as a trigger for starting the operation of the A / D converter.
モータの制御回路であって、  A motor control circuit,
それぞれに前記モータの電気的状態を示す検出信号が入力可能な複数m個(mは2以上の整数)のアナログポートと、  A plurality of m (m is an integer of 2 or more) analog ports to which a detection signal indicating the electric state of the motor can be input,
前記m個のアナログポートそれぞれの検出信号を受けるマルチプレクサを有し、前記マルチプレクサが選択した検出信号をデジタルデータに変換するA/Dコンバータと、  An A / D converter that has a multiplexer that receives a detection signal of each of the m analog ports, and that converts the detection signal selected by the multiplexer into digital data;
前記デジタルデータにもとづいて前記モータの駆動指令を生成するプロセッサと、  A processor that generates a drive command for the motor based on the digital data;
前記プロセッサからの制御指令に応じて前記A/Dコンバータの動作を制御するとともに、前記デジタルデータを前記プロセッサに受け渡すインタフェース回路と、  An interface circuit that controls the operation of the A / D converter in accordance with a control command from the processor and transfers the digital data to the processor;
を備え、  Equipped with
前記インタフェース回路による前記A/Dコンバータの1制御周期は、n(nは2以上の整数)を最大とするk回(1≦k≦n)のA/D変換を含み、  One control cycle of the A / D converter by the interface circuit includes k times (1 ≦ k ≦ n) A / D conversion in which n (n is an integer of 2 or more) is maximum.
前記インタフェース回路は、  The interface circuit is
n個のデータレジスタと、  n data registers,
n個のポート選択レジスタであって、i番目(1≦i≦n)のポート選択レジスタは、i回目のA/D変換において、前記マルチプレクサが選択すべき前記アナログポートを示す値を格納する、n個のポート選択レジスタと、  Of the n port selection registers, the i-th (1 ≦ i ≦ n) port selection register stores a value indicating the analog port to be selected by the multiplexer in the i-th A / D conversion. n port selection registers,
バッファモードにおいて、i回目の前記デジタルデータDOUT  In buffer mode, i-th digital data DOUT i-1i-1 を、i番目の前記データレジスタに格納するアクセス制御部と、An access control unit for storing i in the i-th data register;
ランレジスタと、  A run register,
を含み、  Including,
前記アクセス制御部はソフトウェアモードにおいて、前記ランレジスタのアサートを、前記A/Dコンバータの動作スタートのトリガとすることを特徴とする制御回路。  In the software mode, the access control unit uses the assertion of the run register as a trigger for starting the operation of the A / D converter.
前記インタフェース回路はさらに、
前記制御回路において生成される少なくともひとつの内部信号を受け、前記少なくともひとつの内部信号のひとつであるスタートイベント信号にもとづいてスタートタイミング信号を生成するタイミング信号生成回路を含み、
前記アクセス制御部はハードウェアモードにおいて、前記スタートタイミング信号のアサートを、前記A/Dコンバータの動作スタートのトリガとすることを特徴とする請求項1から3のいずれかに記載の制御回路。
The interface circuit further comprises
A timing signal generation circuit that receives at least one internal signal generated in the control circuit and generates a start timing signal based on a start event signal that is one of the at least one internal signal;
4. The control circuit according to claim 1, wherein the access control unit uses the assertion of the start timing signal as a trigger for starting the operation of the A / D converter in the hardware mode.
モータの制御回路であって、
それぞれに前記モータの電気的状態を示す検出信号が入力可能な複数m個(mは2以上の整数)のアナログポートと、
前記m個のアナログポートそれぞれの検出信号を受けるマルチプレクサを有し、前記マルチプレクサが選択した検出信号をデジタルデータに変換するA/Dコンバータと、
前記デジタルデータにもとづいて前記モータの駆動指令を生成するプロセッサと、
前記プロセッサからの制御指令に応じて前記A/Dコンバータの動作を制御するとともに、前記デジタルデータを前記プロセッサに受け渡すインタフェース回路と、
を備え、
前記インタフェース回路による前記A/Dコンバータの1制御周期は、n(nは2以上の整数)を最大とするk回(1≦k≦n)のA/D変換を含み、
前記インタフェース回路は、
n個のデータレジスタと、
n個のポート選択レジスタであって、i番目(1≦i≦n)のポート選択レジスタは、i回目のA/D変換において、前記マルチプレクサが選択すべき前記アナログポートを示す値を格納する、n個のポート選択レジスタと、
バッファモードにおいて、i回目の前記デジタルデータDOUT i-1 を、i番目の前記データレジスタに格納するアクセス制御部と、
ランレジスタと、
ソフトウェアモードとハードウェアモードの一方を指定する値を格納するモードスタートレジスタと、
前記制御回路において生成される少なくともひとつの内部信号を受け、前記少なくともひとつの内部信号のひとつにもとづいてスタートタイミング信号を生成するタイミング信号生成回路と、
を含み、
前記アクセス制御部は、(i)前記ソフトウェアモードにおいて、ランレジスタのアサートを前記A/Dコンバータの動作スタートのトリガとし、(ii)前記ハードウェアモードにおいて、前記スタートタイミング信号を前記A/Dコンバータの動作スタートのトリガとすることを特徴とする制御回路。
A motor control circuit,
A plurality of m (m is an integer of 2 or more) analog ports to which a detection signal indicating the electric state of the motor can be input,
An A / D converter that has a multiplexer that receives a detection signal of each of the m analog ports, and that converts the detection signal selected by the multiplexer into digital data;
A processor that generates a drive command for the motor based on the digital data;
An interface circuit that controls the operation of the A / D converter in accordance with a control command from the processor and transfers the digital data to the processor;
Equipped with
One control cycle of the A / D converter by the interface circuit includes k times (1 ≦ k ≦ n) A / D conversion in which n (n is an integer of 2 or more) is maximum.
The interface circuit is
n data registers,
Of the n port selection registers, the i-th (1 ≦ i ≦ n) port selection register stores a value indicating the analog port to be selected by the multiplexer in the i-th A / D conversion. n port selection registers,
An access control unit for storing the i-th digital data DOUT i-1 in the i-th data register in the buffer mode ;
A run register,
A mode start register that stores a value that specifies one of software mode and hardware mode,
A timing signal generation circuit that receives at least one internal signal generated in the control circuit and generates a start timing signal based on one of the at least one internal signal;
Including,
The access control section (i) uses the assertion of the run register as a trigger to start the operation of the A / D converter in the software mode, and (ii) uses the start timing signal of the A / D converter in the hardware mode. it characterized in that the trigger of the operation start control circuit.
前記インタフェース回路はさらに、
前記ハードウェアモードにおいて、前記少なくともひとつの内部信号のひとつであるスタートイベント信号のアサートから前記スタートタイミング信号のアサートまでの遅延時間の設定値を格納する遅延設定レジスタを含み、
前記タイミング信号生成回路は、
前記スタートイベント信号に前記遅延設定レジスタの設定値に応じた遅延を与えて、前記スタートタイミング信号を出力する遅延回路を含むことを特徴とする請求項5または6に記載の制御回路。
The interface circuit further comprises
In the hardware mode, including a delay setting register for storing a setting value of the delay time from the assertion of the start event signal, which is one of the at least one internal signal, to the assertion of the start timing signal,
The timing signal generation circuit,
7. The control circuit according to claim 5, further comprising a delay circuit that delays the start event signal according to the set value of the delay setting register and outputs the start timing signal.
前記インタフェース回路はさらに、
イベント選択レジスタと、
前記制御回路において生成される複数の内部信号を受け、前記イベント選択レジスタに格納される値に応じたひとつを選択し、前記スタートイベント信号を出力するイベントセレクタと、
を含み、
前記タイミング信号生成回路は、前記スタートイベント信号にもとづいて前記スタートタイミング信号を生成することを特徴とする請求項に記載の制御回路。
The interface circuit further comprises
An event selection register,
An event selector that receives a plurality of internal signals generated in the control circuit, selects one according to a value stored in the event selection register, and outputs the start event signal,
Including,
The control circuit according to claim 5 , wherein the timing signal generation circuit generates the start timing signal based on the start event signal.
モータの制御回路であって、
それぞれに前記モータの電気的状態を示す検出信号が入力可能な複数m個(mは2以上の整数)のアナログポートと、
前記m個のアナログポートそれぞれの検出信号を受けるマルチプレクサを有し、前記マルチプレクサが選択した検出信号をデジタルデータに変換するA/Dコンバータと、
前記デジタルデータにもとづいて前記モータの駆動指令を生成するプロセッサと、
前記プロセッサからの制御指令に応じて前記A/Dコンバータの動作を制御するとともに、前記デジタルデータを前記プロセッサに受け渡すインタフェース回路と、
を備え、
前記インタフェース回路による前記A/Dコンバータの1制御周期は、n(nは2以上の整数)を最大とするk回(1≦k≦n)のA/D変換を含み、
前記インタフェース回路は、
n個のデータレジスタと、
n個のポート選択レジスタであって、i番目(1≦i≦n)のポート選択レジスタは、i回目のA/D変換において、前記マルチプレクサが選択すべき前記アナログポートを示す値を格納する、n個のポート選択レジスタと、
バッファモードにおいて、i回目の前記デジタルデータDOUT i-1 を、i番目の前記データレジスタに格納するアクセス制御部と、
オートモードとシーケンシャルモードの一方を指定する値を格納するモードシーケンスレジスタと、
前記制御回路において生成される少なくともひとつの内部信号を受け、前記シーケンシャルモードにおいて、A/D変換ごとに、前記少なくともひとつの内部信号のひとつである変換イベント信号にもとづいて変換タイミング信号を生成するタイミング信号生成回路と、
を含み、
前記アクセス制御部は、(i)前記オートモードにおいて、k回のA/D変換を自動的に実行し、(ii)前記シーケンシャルモードにおいて、k回のA/D変換それぞれを、対応する変換タイミング信号をトリガとして実行することを特徴とする制御回路。
A motor control circuit,
A plurality of m (m is an integer of 2 or more) analog ports to which a detection signal indicating the electric state of the motor can be input,
An A / D converter that has a multiplexer that receives a detection signal of each of the m analog ports, and that converts the detection signal selected by the multiplexer into digital data;
A processor that generates a drive command for the motor based on the digital data;
An interface circuit that controls the operation of the A / D converter in accordance with a control command from the processor and transfers the digital data to the processor;
Equipped with
One control cycle of the A / D converter by the interface circuit includes k times (1 ≦ k ≦ n) A / D conversion in which n (n is an integer of 2 or more) is maximum.
The interface circuit is
n data registers,
Of the n port selection registers, the i-th (1 ≦ i ≦ n) port selection register stores a value indicating the analog port to be selected by the multiplexer in the i-th A / D conversion. n port selection registers,
An access control unit for storing the i-th digital data DOUT i-1 in the i-th data register in the buffer mode ;
A mode sequence register that stores a value that specifies one of auto mode and sequential mode ,
Timing of receiving at least one internal signal generated in the control circuit and generating a conversion timing signal based on a conversion event signal which is one of the at least one internal signal for each A / D conversion in the sequential mode. A signal generation circuit ,
Including,
The access control unit (i) automatically executes k times of A / D conversion in the auto mode, and (ii) converts k times of A / D conversion into corresponding conversion timings in the sequential mode. A control circuit, which is executed by using a signal as a trigger.
前記インタフェース回路はさらに、
最大n回のA/D変換それぞれについて、前記変換イベント信号のアサートから前記変換タイミング信号のアサートまでの遅延時間の設定値を格納する遅延設定レジスタを含み、
前記タイミング信号生成回路は、
A/D変換ごとに、対応する前記変換イベント信号に、対応する前記遅延設定レジスタの設定値に応じた遅延を与えて、前記変換タイミング信号を出力する遅延回路を含むことを特徴とする請求項9に記載の制御回路。
The interface circuit further comprises
A delay setting register that stores a set value of a delay time from the assertion of the conversion event signal to the assertion of the conversion timing signal for each of up to n A / D conversions;
The timing signal generation circuit,
A delay circuit for outputting the conversion timing signal by giving a delay according to a setting value of the corresponding delay setting register to the corresponding conversion event signal for each A / D conversion. 9. The control circuit according to item 9.
前記インタフェース回路はさらに、
最大n回のA/D変換それぞれについて、トリガとすべき内部信号を個別に指定する値を格納するn個の個別イベント選択レジスタと、
前記制御回路において生成される複数の内部信号を受け、A/D変換ごとに、前記複数の内部信号のうち、前記n個の個別イベント選択レジスタのうち対応するひとつに格納される値に応じたひとつを選択し、変換イベント信号を出力するイベントセレクタと、
を含み、
前記タイミング信号生成回路は、前記シーケンシャルモードにおいて、A/D変換ごとに前記変換イベント信号にもとづいて、前記変換タイミング信号を生成することを特徴とする請求項9または10に記載の制御回路。
The interface circuit further comprises
N individual event selection registers for storing a value for individually designating an internal signal to be a trigger for each of up to n A / D conversions,
A plurality of internal signals generated in the control circuit are received, and a value corresponding to a value stored in a corresponding one of the n individual event selection registers among the plurality of internal signals is received for each A / D conversion. An event selector that selects one and outputs a conversion event signal,
Including,
11. The control circuit according to claim 9, wherein the timing signal generation circuit generates the conversion timing signal based on the conversion event signal for each A / D conversion in the sequential mode.
前記インタフェース回路はさらに、
1回変換モードと連続変換モードの一方を指定する値を格納するモードバーストレジスタを含み、
前記アクセス制御部は、(i)前記1回変換モードにおいて、1制御周期の変換処理が終了すると、次の動作スタートを待機し、(ii)前記連続変換モードにおいて、1制御周期の変換処理が終了すると、次の動作スタートを待たずに、次の制御周期に移行することを特徴とする請求項1から11のいずれかに記載の制御回路。
The interface circuit further comprises
Includes a mode burst register that stores a value that specifies either one-time conversion mode or continuous conversion mode,
The access control unit (i) waits for the start of the next operation when the conversion processing of one control cycle is completed in the one-time conversion mode, and (ii) the conversion processing of one control cycle is executed in the continuous conversion mode. The control circuit according to any one of claims 1 to 11, wherein when the operation is completed, a next control cycle is started without waiting for the next operation start.
前記A/Dコンバータを、複数チャンネル備えることを特徴とする請求項1から12のいずれかに記載の制御回路。   The control circuit according to claim 1, wherein the A / D converter includes a plurality of channels. ひとつの半導体基板に一体集積化されることを特徴とする請求項1から13のいずれかに記載の制御回路。   14. The control circuit according to claim 1, wherein the control circuit is integrated on a single semiconductor substrate. ファンモータと、
前記ファンモータを駆動する請求項1から14のいずれかに記載の制御回路と、
を備えることを特徴とするファン。
A fan motor,
The control circuit according to claim 1, which drives the fan motor,
A fan characterized by comprising.
JP2016018957A 2016-02-03 2016-02-03 Motor control circuit, fan using it Active JP6695158B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016018957A JP6695158B2 (en) 2016-02-03 2016-02-03 Motor control circuit, fan using it

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016018957A JP6695158B2 (en) 2016-02-03 2016-02-03 Motor control circuit, fan using it

Publications (2)

Publication Number Publication Date
JP2017139884A JP2017139884A (en) 2017-08-10
JP6695158B2 true JP6695158B2 (en) 2020-05-20

Family

ID=59565226

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016018957A Active JP6695158B2 (en) 2016-02-03 2016-02-03 Motor control circuit, fan using it

Country Status (1)

Country Link
JP (1) JP6695158B2 (en)

Also Published As

Publication number Publication date
JP2017139884A (en) 2017-08-10

Similar Documents

Publication Publication Date Title
JP6687405B2 (en) Motor control circuit, fan using it
KR100325592B1 (en) Analog-to-digital converter
US5933344A (en) Microprocessor having timer circuit generating complementary non-overlapped PWM signals
JP2008193825A (en) Ad conversion control circuit and related technology thereof
KR20100110772A (en) Externally synchronizing multiphase pulse width modulation signals
JP2003164159A (en) Current detection device for three-phase inverter
JP2005192335A (en) Inverter and motor control method
JP2005117839A (en) Method and apparatus for generating pulse width modulated wave
US6937084B2 (en) Processor with dual-deadtime pulse width modulation generator
JP2004208428A (en) Device for generating three-phase pulse width modulation waveform
JP2000270591A (en) Chopping current application controller for electric motor
JP5930907B2 (en) Fan motor drive device, drive method, cooling device, electronic device
JP6695158B2 (en) Motor control circuit, fan using it
JP6687406B2 (en) Motor control circuit, fan using it
JPH0311992A (en) Motor, device and method of current control used for motor, etc., or arithmetic unit used therefor, or device equipped with them
US9893670B2 (en) Inverter control apparatus and air conditioner
US9136791B2 (en) Motor driving device, integrated circuit device, motor apparatus and motor driving system
JP5721360B2 (en) Motor driving device, cooling device using the same, and method for determining state of multiphase sensorless motor
JP2006197707A (en) Inverter
WO2021145050A1 (en) Motor driving control apparatus and motor driving control method
JPH1198883A (en) Method for controlling brushless motor
JPH10146090A (en) Inverter
JP3777242B2 (en) Motor control device
US9762174B2 (en) Increasing PWM resolution for digitally controlled motor control applications
JP2006166575A (en) Micro controller

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190122

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20191128

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200107

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200305

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20200407

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200421

R150 Certificate of patent or registration of utility model

Ref document number: 6695158

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250