Init_PWU
 
Component Init_PWU for HC08
Periodic wakeup module (PWU)
Device Initialization
(Description of the component parameters.)
  • Device - Selection of the PWU device module.
  • Compare device - Compare device of the PWU module.
  • Settings - Common PWU module settings.
    • Clock settings - Clock/timing settings of the module.
      • Clock source - Select the clock source for the prescaler.
        This item modifies the PWUCLKSEL bit in the PWUSC register.

        There are 2 options:
        • BUSCLK x 4: BUSCLK x 4 is selected as the clock source for the prescaler.
        • 32 kHz RC oscillator: The internal 32 kHz RC oscillator is selected as the clock source for the prescaler.

      • Prescaler - Select one of the sixteen prescaler outputs to be the input to the PWU counter.
        This item modifies the PS[3:0] bits in the PWUP register.
      • Preset value - Preset value represents the modulo value for the counter. This value and the selected prescaler determine the frequency of the periodic interrupt.
        This item modifies the PWUMOD register.
      • Interrupt frequency - Frequency of the periodic interrupt (for information only).
        Frequency is calculated using the formula:
        Frequency = (Clock source frequency / Prescaler) * Preset value
        This item is influenced by the following properties: Clock source, Prescaler, Preset value.
    • Enabled in Stop Mode - Select yes to allow the PWU module to continue running in stop mode.
      This item modifies the SMODE bit in the PWUSC register.
  • Interrupts - Interrupts settings of the module.
    • Periodic Wakeup - Periodic Wakeup interrupt settings.
      • Interrupt - Interrupt vector (for information only).
      • Periodic Wakeup - Enable/disable Periodic Wakeup interrupt.
        This item modifies the PWUIE bit in the PWUSC register.
      • 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.
  • Initialization - Initialization options of the module.
    • PWU module - Enable/disable the periodic wakeup module.
      This item modifies the PWUON bit in the PWUSC register.