User Tools

Site Tools

prog:mcp560x:ctu:index

Cross Triggering Unit (CTU)

25.1 Introduction

  • In PWM driven systems it is important to schedule the acquisition of the state variables with respect to PWM cycle. State variables are obtained through the following peripherals: ADC, position counter (for example, quadrature decoder, resolver and sine-cos sensor) and PWM duty cycle decoder.
  • The cross triggering unit (CTU) is intended to completely avoid CPU involvement in the time acquisitions of state variables during the control cycle that can be the PWM cycle, the half PWM cycle or a number of PWM cycles. In such cases the pre-setting of the acquisition times needs to be completed during the previous control cycle, where the actual acquisitions are to be made, and a double-buffered structure for the CTU registers is used, in order to activate the new settings at the beginning of the next control cycle.
  • Additionally, four FIFOs inside the CTU are available to store the ADC results.

25.2 CTU overview

  • The CTU receives various incoming signals from different sources (PWM, timers, position decoder and/or external pins). These signals are then processed to generate as many as eight trigger events. An input can be a rising edge, a falling edge or both, edges of each incoming signal. The output can be a pulse or a command (or a stream of consecutive commands for over-sampling support) or both, to one or more peripherals (for example, ADC or timers).
  • The CTU interfaces to the following peripherals:
    • PWM—13 inputs
    • Timers—2 inputs
    • GPIO—1 external input signal
  • The 16 input signals are digital signals and the CTU must be able to detect a rising and/or a falling edge for each of them.
  • The CTU comprises the following:
    • Input signals interface
    • User interface (such as configuration registers)
    • ADC interface
    • Timers interface
  • The block diagram of the CTU is shown in Figure 25-1.

  • Figure 25-1. Cross triggering unit diagram
  • The CTU consists of two subunits:
    • Trigger generator
    • Scheduler
  • The trigger generator subunit handles incoming signals, selecting for each signal, the active edges to generate the Master Reload signal, and generates as many as eight trigger events (signals). The scheduler subunit generates the trigger event output according to the occurred trigger event (signal).

25.3 Functional description

  • The following describes the functionality of the CTU.

25.3.1 Trigger events features

  • The TGS is capable of generating as many as eight trigger events. Each trigger event has the following characteristics:
    • generation of the trigger event is sequential in time
    • the triggers list uses eight 16-bit double-buffered registers
    • the new triggers list is loaded on each Master Reload Signal (MRS)
  • NOTE
    • The triggers list is only reloaded on an MRS occurrence if the reload enable bit is set.

25.3.2 Trigger generator subunit (TGS)

Permalink prog/mcp560x/ctu/index.txt · Last modified: 2023/11/09 17:45 by jethro

oeffentlich