Init_PWT
 
Component Init_PWT for HCS08
Pulse Width Timer (PWT)
Component Level: Peripheral Initialization
Properties:
(Properties are parameters of the component. Please see the Embedded Components page for more information.)
  • Component name - Name of the component.
  • Device - PWT Device module
  • Settings - Common PWT module settings
    • Clock settings - Clock/timing settings of the module
      • Clock source - Selects the input clock source for the PWT module.

        There are 2 options:
        • Bus clock: Bus clock
        • Alternative clock: Alternative clock

      • Prescaler - Select the prescaler.

        There are 8 options:
        • divide by 1: divide by 1
        • divide by 2: divide by 2
        • divide by 4: divide by 4
        • divide by 8: divide by 8
        • divide by 16: divide by 16
        • divide by 32: divide by 32
        • divide by 64: divide by 64
        • divide by 128: divide by 128

      • Counter frequency - Counter input frequency (for information only). This item is influenced by the following properties: Clock source, Prescaler, Bus clock from the CPU component.
    • Edge sensitivity - The property controls which edge triggers the pulse width measurement and which edges trigger the capture.

      There are 4 options:
      • falling/falling: The first falling edge starts the pulse width measurement, upon all the following falling edges, the pulse width is captured
      • rising/both: The first rising edge starts the pulse width measurement, upon all the following rising and falling edges, the pulse width is captured
      • falling/both: The first falling edge starts the pulse width measurement, upon all the following rising and falling edges, the pulse width is captured
      • rising/rising: The first rising edge starts the pulse width measurement, upon all the following rising edges, the pulse width is captured

  • Pins - Module pins settings.
    • Alternative clock pin - The property enables/disables allocation of the alternative clock pin.
      The following items are available only if the group is enabled (the value is "Enabled"):
      • Pin - Alternative clock pin of the PWT module
      • Pin signal - Signal name of Pin
    • Input Pin - Setting of the input pin.
  • Interrupts - Interrupts settings of the module
    • PWT module interrupt - This property enables the PWT module to generate an interrupt. It provides masking of the Data ready interrupt and the Overflow interrupt.
    • Data Ready - Data ready interrupt
      • Interrupt - Interrupt vector (for information only).
      • Only if priority supported
      • Data ready interrupt - When this property is enabled the data ready interrupt can be generated. The interrupt is generated only when both this property and PWT module interrupt are enabled.
      • ISR Name - Name of the interrupt service routine (ISR) invoked by this interrupt vector.
        The user code of the routine should handle all respective interrupt flags correctly. The routine must be implemented in the user code, it is not generated by Processor Expert. Find external prototypes of the ISRs in the component module header file.
    • Overflow - Overflow interrupt
      • Interrupt - Interrupt vector (for information only).
      • Only if priority supported
      • Overflow interrupt - When this property is enabled the overflow interrupt can be generated. The interrupt is generated only when both this property and PWT module interrupt are enabled.
      • ISR Name - Name of the interrupt service routine (ISR) invoked by this interrupt vector.
        The user code of the routine should handle all respective interrupt flags correctly. The routine must be implemented in the user code, it is not generated by Processor Expert. Find external prototypes of the ISRs in the component module header file.
  • Initialization - Initialization options of the module.
    • Enable PWT module - The property enables the entire PWT module.
    • Perform soft reset - The property allows to perform soft reset when PWT is initialized.
    • Call Init method - The Init method of the component may be called after a power-on or reset (in initialization code) by PE.
      yes - The Init method is called by PE.
      no - The Init method is not called by PE, it should be called in the user's code.