Freescale Semiconductor Inc.
    Regional Technical Application Center

 

Main Page | Directories | File List | File Members

FlexRay_handler.c File Reference

Copyright (c) 2007 Freescale Semiconductor Freescale Confidential Proprietary

FlexRay module handling routines. More...

#include "M9S12XF512.h"
#include "GPIO_macros.h"
#include "Fr_UNIFIED_types.h"
#include "Fr_UNIFIED.h"
#include "Fr_UNIFIED_cfg.h"

Defines

#define TX_SLOT_4   1
 Transmit MB 1, slot 4.
#define RX_SLOT_1   2
 Receive MB 2, slot 1.
#define TX_SLOT_5   4
 Transmit MB 4, slot 5.
#define TX_SLOT_5_TRANSMIT_SIDE   5
 Double Transmit Buffer - transmit sideMB 5, slot 5.
#define TX_SLOT_62   11
 Transmit MB 11, slot 62.
#define TX_SLOT_63   12
 Transmit MB 12, slot 63.

Functions

void Failed (uint8 u8number)
 Error function for debugging.
void vfnFlexRay_Init (void)
 FlexRay module configuration.
void vfnFlexRay_Handler (void)
 FlexRay module handling routines.

Variables

Fr_return_type return_value
 Return values.
Fr_POC_state_type protocol_state
 Current protocol state.
Fr_wakeup_state_type wakeup_status
 Current wakeup status.
uint8 current_cycle
 Current cycle value.
uint16 tx_data_4 [16] = {0}
 Data array - static segment, slot 4.
uint16 tx_data_5 [16] = {0}
 Data array - static segment, slot 5.
uint16 tx_data_62 [8] = {0}
 Data array - dynamic segment, slot 62.
uint16 tx_data_63 [8] = {0}
 Data array - dynamic segment, slot 63.
Fr_tx_MB_status_type tx_return_value
 Variable used for storing of the return values.
Fr_tx_status_type tx_status
 Variable to determine if data has been tranmsitted.
uint16 rx_data_1 [16] = {0}
 Data array - static segment, slot 1.
uint8 rx_data_length = 0
 Received data length.
uint16 rx_status_slot = 0
 Received frame status.
Fr_rx_MB_status_type rx_return_value
 Variable used for storing of the return values.
Fr_rx_status_type rx_status
 Variable to determine if a frame has been received.
uint16 mb_access_error = 0
 The number of the message buffer access errors.
uint16 chi_error = 0
 The number of the CHI related errors.
uint16 transmission_across_boundary = 0
 The number of the transmission across boundary errors.
uint16 violation = 0
 The number of boundary violation errors.
boolean protocol_error = FALSE
 Internal protocol error detected.
boolean cycle_starts = FALSE
 Communication cycle.


Detailed Description

Copyright (c) 2007 Freescale Semiconductor Freescale Confidential Proprietary

FlexRay module handling routines.

Code based on the Transmit/Receive application example for the FlexRay UNIFIED driver in polling mode (transmit_receive_node2.c) made by R62779.

Author:
Freescale Semiconductor

Guadalajara Applications Laboratory RTAC Americas

Jaime Orozco

Version:
1.2
Date:
March/12/2007

Function Documentation

void Failed uint8  u8number  ) 
 

Error function for debugging.

Author:
R62779
Parameters:
u8number,: error code
Returns:
void

void vfnFlexRay_Handler void   ) 
 

FlexRay module handling routines.

Author:
Jaime Orozco
Parameters:
void 
Returns:
void

void vfnFlexRay_Init void   ) 
 

FlexRay module configuration.

Author:
Jaime Orozco
Parameters:
void 
Returns:
void