FreescaleCAN
 
 
 Bean FreescaleCAN
 
CAN communication for Freescale implementation

Events are functions called when some important event occurred and its processing starts.

Events:

  • EventModule - Name of the user module (without extension), where the events from this bean are placed.
  • AfterNewSpeed - This event is called when the CPU speed mode is being changed (using CPU methods) - after the change. The event is enabled only if speed modes are supported in the target CPU bean (more than one speed mode).

      ANSIC prototype: void AfterNewSpeed(void)

  • BeforeNewSpeed - This event is called when the CPU speed mode is being changed (using CPU methods) - before the change. The event is enabled only if speed modes are supported in the target CPU bean (more than one speed mode).

      ANSIC prototype: void BeforeNewSpeed(void)

  • OnFreeTxBuffer - This event is called after a successful transmission of a message.

      ANSIC prototype: void OnFreeTxBuffer(word BufferMask)
    • BufferMask:word - Transmit buffer mask. The mask can be used to check what message buffer caused the transmit interrupt.
    • Priority - OnFreeTxBuffer priority Default value is based on the interrupt priority defined in property Interrupt TxD priority. For details see description below of the page.

  • OnFullRxBuffer - This event is called when the receive buffer is full after a successful reception of a message.

      ANSIC prototype: void OnFullRxBuffer(void)
    • Priority - OnFullRxBuffer priority Default value is based on the interrupt priority defined in property Interrupt RxD priority. For details see description below of the page.

  • OnBusOff - This event is called when the node status becomes bus-off

      ANSIC prototype: void OnBusOff(void)
    • Priority - OnBusOff priority Default value is based on the interrupt priority defined in property Interrupt Error priority. For details see description below of the page.

  • Events for Freescale HC08, HCS08, HCS12 and DSP80x derivatives.
    • OnTransmitterErrorPassive - This event is called when the CAN controller goes into error passive status due to the transmit error counter exceeding 127 and the BusOff status is not present

        ANSIC prototype: void OnTransmitterErrorPassive(void)
      • Priority - OnTransmitterErrorPassive priority Default value is based on the interrupt priority defined in property Interrupt Error priority. For details see description below of the page.

    • OnReceiverErrorPassive - This event is called when the CAN controller goes into error passive status due to the receive error counter exceeding 127 and the BusOff status is not present

        ANSIC prototype: void OnReceiverErrorPassive(void)
      • Priority - OnReceiverErrorPassive priority Default value is based on the interrupt priority defined in property Interrupt Error priority. For details see description below of the page.

    • OnOverrun - This event is called when receive buffer has overrun.

        ANSIC prototype: void OnOverrun(void)
      • Priority - OnOverrun priority Default value is based on the interrupt priority defined in property Interrupt Error priority. For details see description below of the page.

  • OnTransmitterWarning - This event is called when the CAN controller goes into warning status due to the transmit error counter exceeding 96 and neither an error status nor a BusOff status are present

      ANSIC prototype: void OnTransmitterWarning(void)
    • Priority - OnTransmitterWarning priority Default value is based on the interrupt priority defined in property Interrupt Error priority. For details see description below of the page.

  • OnReceiverWarning - This event is called when the CAN controller goes into a warning status due to the receive error counter exceeding 96 and neither an error status nor a BusOff status are present

      ANSIC prototype: void OnReceiverWarning(void)
    • Priority - OnReceiverWarning priority Default value is based on the interrupt priority defined in property Interrupt Error priority. For details see description below of the page.

  • OnWakeup - This event is called when a wakeup is detected. To enable this event, property Wakeup has to be enabled first.

      ANSIC prototype: void OnWakeup(void)
    • Priority - OnOverrun priority Default value is based on the interrupt priority defined in property Interrupt Wakeup priority. For details see description below of the page.

  • OnError - This event is called when a channel error (not the error returned by a given method) occurs. These errors can be read using GetError method.

      ANSIC prototype: void OnError(void)
    • Priority - OnError priority Default value is based on the interrupt priority defined in property Interrupt Error priority. For details see description below of the page.


For each generated event it is possible to set:



Processor ExpertTM and Embedded BeansTM are registered trademarks of UNIS, Ltd.
©1997-2005, UNIS, Ltd.