MC9S08AC48_32
 
CPU Component MC9S08AC48_32
Freescale HCS08 family : MC9S08AC48 in 32 pin LQFP package
Component Level: High
Methods:
(Methods are user-callable functions/subroutines intended for the component functions control. Please see the Embedded Components page for more information.)
  • SetHighSpeed - Sets the high speed mode. The method is enabled only if Low speed mode or Slow speed mode are enabled in the component as well.

      ANSIC prototype: void SetHighSpeed(void)

  • SetLowSpeed - Sets the low speed mode. The method is enabled only if Low speed mode is enabled in the component.

      ANSIC prototype: void SetLowSpeed(void)

  • SetSlowSpeed - Sets the slow speed mode. The method is enabled only if Slow speed mode is enabled in the component.

      ANSIC prototype: void SetSlowSpeed(void)

  • GetSpeedMode - Gets current speed mode. The method is enabled only if more than one speed mode is enabled in the component.

      ANSIC prototype: byte GetSpeedMode(void)
    • Return value:byte - Speed mode (HIGH_SPEED, LOW_SPEED, SLOW_SPEED)

  • SetIntVect - Sets the interrupt vector service routine. This method can be generated and used only if the interrupt vector table is generated into RAM (see options).

      ANSIC prototype: byte SetIntVect(word VectNo, void* ProcAddr)
    • VectNo:word - The number of the interrupt vector.
    • ProcAddr:void* - Address of the new interrupt handler.
    • Return value:byte - Error code, possible codes:
      ERR_OK - OK
      ERR_RANGE - Vector number is out of range.

  • GetIntVect - Returns the address of the interrupt vector service routine. This method can be generated and used only if the interrupt vector table is generated into RAM (see options).

      ANSIC prototype: byte GetIntVect(word VectNo, void* *ProcAddr)
    • VectNo:word - The number of the interrupt vector.
    • ProcAddr: Pointer to void* - Address of the interrupt handler
    • Return value:byte - Error code, possible codes:
      ERR_OK - OK
      ERR_RANGE - Vector number is out of range.

  • EnableInt - Enables maskable interrupts

      ANSIC prototype: void EnableInt(void)

  • DisableInt - Disables maskable interrupts

      ANSIC prototype: void DisableInt(void)

  • GetResetSource - Gets the reset source of the last reset (value of SRS register).

      ANSIC prototype: byte GetResetSource(void)
    • Return value:byte - Reset source register.

  • SetWaitMode - Sets the low power mode - Wait mode.
    For more information about the wait mode, see the documentation of this CPU.
    Release from the Wait mode: Reset or interrupt

      ANSIC prototype: void SetWaitMode(void)

  • SetStopMode - Sets the low power mode - Stop mode. This method is available only if the STOP instruction is enabled (see STOP instruction enabled property).
    For more information about the stop mode, see the documentation of this CPU.

      ANSIC prototype: void SetStopMode(void)

  • GetLowVoltageWarningFlag - This method returns the Low Voltage Warning flag. The flag is set when the voltage subsides (see electric specification of the MCU). This method can be enabled only if LVD module is enabled (property LVD module is set to 'Enabled' value).

      ANSIC prototype: bool GetLowVoltageWarningFlag(void)
    • Return value:bool - This method returns a true when flag is set otherwise returns a false.

  • ClearLowVoltageWarningFlag - This method clears the low voltage warning flag. This method can be enabled only if LVD module is enabled (property LVD module is set to 'Enabled' value).

      ANSIC prototype: void ClearLowVoltageWarningFlag(void)

  • GetPartialPowerDownFlag - This method returns the Partial Power Down flag. The flag is set when the MCU exits the Partial Power Down mode.

      ANSIC prototype: bool GetPartialPowerDownFlag(void)
    • Return value:bool - This method returns a true when flag is set otherwise returns a false.

  • ClearPartialPowerDownFlag - This method clears the Partial Power Down flag.

      ANSIC prototype: void ClearPartialPowerDownFlag(void)

  • GetIdentification - This method returns the System identification register which contains identification number and revision of the chip.

      ANSIC prototype: word GetIdentification(void)
    • Return value:word - System identification register.

  • SetFilterValue - This method sets the Internal clock generator filter registers. The value of the filter registers can be changed in the self-clocked mode (if internal clock is used and FLL is not used).

      ANSIC prototype: byte SetFilterValue(word value)
    • value:word - A new value (0 - 4095) of the Internal clock generator filter registers. This value controls the output frequency of the Internal clock generator module.
    • Return value:byte - Error code
      ERR_OK - OK
      ERR_RANGE - value is out of range.

  • SetBackdoorKey - This method temporarily disengage the security of the MCU by backdoor key mechanism. This method can be used if the memory is secured and the Backdoor key mechanism is enabled (see the FLASH memory options). If the MCU incorporates dual flash controllers the Backdoor key mechanism must be enabled for each secured block.
    Version specific information for Freescale HCS08 derivatives
    This method requires at least 55 bytes of stack.

      ANSIC prototype: byte SetBackdoorKey(byte *key)
    • key: Pointer to byte - A pointer to an 8-bytes array that represents the backdoor key. If the MCU incorporates dual flash controllers this parameter is pointer to array storing backdoor key for each secured block.
      Version specific information for Freescale HCS08 derivatives
      The backdoor key must be stored in RAM because access to the FLASH is prohibited during unlock procedure.
    • Return value:byte - Error code
      ERR_OK - OK
      ERR_FAULT - the given backdoor key is not valid.

  • Delay100US - This method realizes software delay. The length of delay is at least 100 microsecond multiply input parameter us100. As the delay implementation is not based on real clock, the delay time may be increased by interrupt service routines processed during the delay. The method is independent on selected speed mode.

      ANSIC prototype: void Delay100US(word us100)
    • us100:word - Number of 100 us delay repetitions.


Note: Some methods can be implemented as macros.