1 - Fr Peer Review Checklists


Overview

Summary Sheet
Synergy Project
3rd Party Files


Sheet 1: Summary Sheet























Rev 1.019-Apr-17
Peer Review Summary Sheet


























Synergy Project Name:



Windows User: Intended Use: Identify which component is being reviewed. This should match the component short name and the middle part of the Synergy project name Fr
Revision / Baseline:


Windows User: Intended Use: Identify the implementation baseline name intended to be used for the changed component when changes are approved. Fr_Vector_Ar4.0.3_05.00.01_0


























Change Owner:



Windows User: Intended Use: Identify the developer who made the change(s) being reviewed Akilan
Work CR ID:


Windows User: Intended Use: Identify the Implementation Work CR whose work is being reviewed (may be more than one) EA4#20936


























3rd party delivery package identifier:







Intended Use: This is a reference to the identifier of the 3rd party delivery package(s) that the component was extracted/created from. Rationale: This will allow easier tracing back to 3rd party deliveries. Vector MICROSAR SIP CBD1700369 D04 Rh850


























Windows User: Identifiy which type of 3rd party component this is so as to provide appropriate review checklist sheets Component Type:





























































































































Windows User: General section for summarizing review comments or review notes. Review Checklist Summary:


















































Comments:
































































Sheet 2: Synergy Project

Peer Review Meeting Log (Component Synergy Project Review)





















































Quality Check Items:





































Rationale is required for all answers of No











New baseline version name from Summary Sheet follows








Yes
Comments:





naming convention for 3rd Party Software Components









































Project contains necessary subprojects








N/A
Comments:


















There are no subprojects




























Project contains the correct version of subprojects








N/A
Comments:


















There are no subprojects




























General Notes / Comments:

































































LN: Intended Use: Identify who were the reviewers and if the reviewed changes have been approved. Rationale: Since this Form will be attached to the Change Request it will confirm the approval and provides feedback in case of audits. KMC: Group Review Level removed in Rev 4.0 since the design review is not checked in until approved, so it would always be DR4. Review Board:



























Change Owner:

Akilan


Review Date :

02/27/18

































Lead Peer Reviewer:


Rijvi


Approved by Reviewer(s):



Yes
































Other Reviewer(s):












































































Sheet 3: 3rd Party Files

Peer Review Meeting Log (3rd Party File Review)





















































Quality Check Items:






































Rationale is required for all answers of No










(e.g. component_bswmd.arxml) Component "autosar" folder contains autosar module description file from 3rd party delivery packageYes
Comments:




































(e.g. component_preo.arxml) Component "autosar" folder contains any relevant preconfiguration files from 3rd party delivery package(s)Yes
Comments:




































If needed as in the case with Renesas MCAL (e.g. MCALcomponent_bswmd_rec.arxml taken from Vector delivery) Component "autosar" folder contains any needed supplemental autosar module description file(s)N/A
Comments:




































Component "doc" folder contains all documentation related to this component from 3rd party delivery packageYes
Comments:




































Modifications from delivery to be reviewed (e.g. path changes) Component "generate" folder contains all external generation files from 3rd party delivery packageN/A
Comments:




































Component "include" and "src" folder contains exact component files from 3rd party delivery packageYes
Comments:




































Component "make" folder contains any makefiles included from 3rd party delivery packageYes
Comments:




































1) All source and headers of component should be referenced in .gpj 2) Compiler settings may need to be tailored to source component (e.g. Renesas MCAL vs Vector BSWs) Component "tools" folder contains GHS project file with appropriate files referenced with appropriate compiler settingsYes
Comments:




































Should delete old existing files/directories from integration project and copy new ones into integration project May also contain logic for integrator user interaction if required. (e.g. selection of micro variant on MCAL) Component "tools" folder contains Integrate.bat with appropriate logic in it for integration into projectYes
Comments:




































For external generation and internal behavior definition for use with Vector Davinci tools. Typically only desired/needed for non-Vector developed components. This file should be copied as part of Integrate.bat. Components optionally contains settings xml file with appropriate contentsN/A
Comments:




































General Notes / Comments:





























































LN: Intended Use: Identify who were the reviewers and if the reviewed changes have been approved. Rationale: Since this Form will be attached to the Change Request it will confirm the approval and provides feedback in case of audits. KMC: Group Review Level removed in Rev 4.0 since the design review is not checked in until approved, so it would always be DR4. Review Board:



























Change Owner:

Akilan


Review Date :

02/27/18

































Lead Peer Reviewer:


Rijvi


Approved by Reviewer(s):



Yes
































Other Reviewer(s):











































































2 - TechnicalReference_Fr

MICROSAR FR

4 - TechnicalReference_Fr_V85x

MICROSAR Fr ERay

6 - TechnicalReference_Fr_V85xs


 
 
 
 
 
 
 
 
 
 
 
 
 
MICROSAR Fr ERay 
Technical Reference 
 
Communication Controller E-Ray V850 
Version 1.41 
 
 
 
 
 
 
 
 
 
 
 
Authors 
Juergen Schaeffer, Mario Kunz, Sebastian Gärtner, 
Sebastian Schmar, Oliver Reineke, Roland Hocke, 
Matthias Müller 
Status 
Released 
 
 
 
 
 
 


Technical Reference MICROSAR Fr ERay Communication Controller E-Ray 
 
1  Document Information 
1.1 
History 
Author 
Date 
Version 
Remarks 
Roland Hocke 
2013-05-14 
1.34 
Creation and content copy 
from MSR3 document 
 
2013-06-26 
1.35 
Remove obsolete MTS 
Roland Hocke 
2014-01-29 
1.37 
Buffer alignment hints 
 
Matthias Müller 
2015-02-20 
1.38 
Renaming of document name 
Matthias Müller 
2015-09-28 
1.39 
Description of Endinit and 
Protected Register Access 
Matthias Müller 
2015-11-27 
1.40 
ESCAN00080370 The usage 
of the Appl_TricoreAurixInit() 
function is not described in 
the TechRef 
SafeBSW limitations 
Matthias Müller 
2017-02-01 
1.41 
Added hint about the specifics 
of RH850 P1X 
Table 1-1  
History of the document 
1.2 
Reference Documents 
No. 
Title 
Version 
[1]   
AUTOSAR_SWS_DevelopmentErrorTracer.pdf 
3.2.0 
[2]   
AUTOSAR_SWS_DiagnosticEventManager.pdf 
4.2.0 
[3]   
TechnicalReference_Fr.pdf 
1.0 or later 
[4]   
E-Ray_Errata_Sheet_20100215.pdf and later 
REL20100215 and 
later 
[5]   
TechnicalReference_SchM.pdf 
2.5 or later 
Table 1-2  
Reference documents 
1.3 
Scope of the Document 
 
This technical reference describes the specific use of the FlexRay ERay driver software. It 
supplements the general FlexRay driver technical reference [3]. 
 
2017, Vector Informatik GmbH 
Version: 1.41 
2 / 24 
based on template version 3.1 



Technical Reference MICROSAR Fr ERay Communication Controller E-Ray 
 
Please note 
We have configured the programs in accordance with your specifications in the 
  questionnaire. Whereas the programs do support other configurations than the one 
specified in your questionnaire, Vector´s release of the programs delivered to your 
company is expressly restricted to the configuration you have specified in the 
questionnaire. 
2017, Vector Informatik GmbH 
Version: 1.41 
3 / 24 
based on template version 3.1 


Technical Reference MICROSAR Fr ERay Communication Controller E-Ray 
 
Contents 
1  Document Information ................................................................................................... 2 
1.1 
History ............................................................................................................. 2 
1.2 
Reference Documents ..................................................................................... 2 
1.3 
Scope of the Document ................................................................................... 2 
2  Hardware Overview ........................................................................................................ 7 
3  Component History ........................................................................................................ 8 
4  Introduction .................................................................................................................... 9 
5  Functional Description ................................................................................................ 10 
6  Integration .................................................................................................................... 11 
6.1 
Scope of Delivery .......................................................................................... 11 
6.1.1 
Static Files ..................................................................................................... 11 
6.1.2 
Dynamic Files................................................................................................ 11 
6.2 
Compiler Abstraction and Memory Mapping .................................................. 11 
6.3 
Critical Sections ............................................................................................ 12 
6.4 
General Integration notes .............................................................................. 14 
6.4.1 
Calculation of Timeout Loops ........................................................................ 14 
6.5 
Integration notes for NEC V850 ..................................................................... 14 
6.5.1 
ERay Base Address ...................................................................................... 14 
6.5.2 
FlexRay Memory buffer number .................................................................... 15 
6.5.3 
FlexRay Memory Buffer size ......................................................................... 15 
6.5.4 
Interrupt routines ........................................................................................... 15 
6.5.5 
Timer interrupt ............................................................................................... 16 
6.5.6 
Buffer alignment ............................................................................................ 16 
6.6 
Integration notes for RH850 .......................................................................... 16 
6.6.1 
Buffer alignment ............................................................................................ 16 
6.6.2 
Specifics of RH850 P1x ................................................................................. 16 
7  API Description ............................................................................................................ 18 
7.1 
Type Definitions ............................................................................................. 18 
7.2 
Interrupt Service Routines provided by Fr ERay ............................................ 18 
7.4 
Services provided by Fr ERay and differs from standard ............................... 20 
7.4.1 
Fr_EnableAbsoluteTimerIRQ......................................................................... 20 
7.4.2 
Fr_DisableAbsoluteTimerIRQ ........................................................................ 20 
2017, Vector Informatik GmbH 
Version: 1.41 
4 / 24 
based on template version 3.1 


Technical Reference MICROSAR Fr ERay Communication Controller E-Ray 
 
7.5 
Services used by Fr ERay ............................................................................. 20 
7.6 
Callback Functions ........................................................................................ 20 
7.7 
Configurable Interfaces ................................................................................. 20 
7.7.1 
Notifications .................................................................................................. 20 
7.7.2 
Callout Functions .......................................................................................... 20 
8  Configuration................................................................................................................ 21 
8.1 
Hardware Fifo................................................................................................ 21 
8.2 
Configuration with DaVinci Configurator 5 ..................................................... 21 
9  AUTOSAR Standard Compliance ................................................................................ 22 
9.1 
Deviations ..................................................................................................... 22 
9.1.1 
Fr_GetSyncFrameList ................................................................................... 22 
9.1.2 
Fr_GetPOCStatus ......................................................................................... 22 
9.2 
Additions/ Extensions .................................................................................... 22 
9.3 
Limitations ..................................................................................................... 22 
10  Glossary and Abbreviations ........................................................................................ 23 
10.1 
Glossary ........................................................................................................ 23 
10.2 
Abbreviations ................................................................................................ 23 
11  Contact .......................................................................................................................... 24 
 
2017, Vector Informatik GmbH 
Version: 1.41 
5 / 24 
based on template version 3.1 


Technical Reference MICROSAR Fr ERay Communication Controller E-Ray 
 
Illustrations 
Es konnten keine Einträge für ein Abbildungsverzeichnis gefunden werden. 
Tables 
Table 1-1  
History of the document .............................................................................. 2 
Table 1-2  
Reference documents ................................................................................. 2 
Table 2-1  
Supported Hardware Overview ................................................................... 7 
Table 2-2  
Supported Errata ........................................................................................ 7 
Table 3-1  
Component history...................................................................................... 8 
Table 6-1  
Static files ................................................................................................. 11 
Table 6-2  
Compiler abstraction and memory mapping .............................................. 12 
Table 6-3 
CC base address ...................................................................................... 14 
Table 6-4 
Message RAM .......................................................................................... 15 
Table 7-1  
Fr_IrqLine0/Fr_IrqLine1 ............................................................................ 18 
Table 7-2  
Fr_IrqTimer0 ............................................................................................. 19 
Table 7-3  
Configuration dependent services used by Fr ERay ................................. 20 
Table 10-1  
Glossary ................................................................................................... 23 
Table 10-2  
Abbreviations ............................................................................................ 23 
 
 
2017, Vector Informatik GmbH 
Version: 1.41 
6 / 24 
based on template version 3.1 


Technical Reference MICROSAR Fr ERay Communication Controller E-Ray 
 
2  Hardware Overview 
The following table gives you detailed information about the derivatives and compilers. As 
very  important  information  the  documentations  of  the  hardware  manufacturers  are  listed. 
The driver is based upon these documents in the given version.   
 
Derivative 
Compiler 
Hardware Manufacturer Document 
Version 
µPD70F3441 
Greenhills 
U17754EE6V0UM00.pdf 
April 2010 
 
5.1.6c 
µPD70F3461(A) 
Greenhills 
U18577EE1V3UM00.PDF 
December 
5.1.6c 
2008 
µPD70F3501 
Greenhills 
U19944EE0V3UM00.pdf 
July 16, 2010 
5.1.6c 
µPD70F4010 
Greenhills 
U19944EE0V3UM00.pdf 
July 16, 2010 
5.1.6c 
Table 2-1  
Supported Hardware Overview 
 
Derivative: 
This can be a single information or a list of derivatives, the Flexray Driver can be used on. 
Compiler: List of Compilers the Flexray Driver is working with. 
Hardware Manufacturer Document: List of hardware documentation the Flexray Driver is based on.  
Version: To be able to reference to this hardware documentation its version is very important. 
 
 
Derivative 
Errata Document 
Release Date 
µPD70F3441 
R01TU0011ED0100_V850E_PHO3.PDF 
Sep 14, 2010 
 
µPD70F3461(A) 
R01TU0010ED0105_V850E_DAN.PDF 
November 2010 
µPD70F3501 
Not available 
Not available 
µPD70F4010 
Not available 
Not available 
Table 2-2  
Supported Errata 
 
 
2017, Vector Informatik GmbH 
Version: 1.41 
7 / 24 
based on template version 3.1 


Technical Reference MICROSAR Fr ERay Communication Controller E-Ray 
 
3  Component History 
Component 
New Features 
Version 
3.0 
Initial version 
3.3 
ISR routines in separate file 
3.9 
Fifo added 
3.11 
Read and verification of the FlexRay configuration 
3.13 
Added Fr_GetChannelStatus,Fr_GetClockCorrection, Fr_GetSyncFrameList, 
Fr_DisableLPdu and Fr_ReconfigLPdu 
3.14 
Optimization 
Table 3-1  
Component history 
2017, Vector Informatik GmbH 
Version: 1.41 
8 / 24 
based on template version 3.1 


Technical Reference MICROSAR Fr ERay Communication Controller E-Ray 
 
4  Introduction 
This  document  describes  the  functionality, API  and  configuration  of  the AUTOSAR  BSW 
module Fr ERay that is specific for the communication controller E-Ray and the used micro 
controller.  The  basic  functionality  API  architecture  is  already  described  within  the 
document [3].  
2017, Vector Informatik GmbH 
Version: 1.41 
9 / 24 
based on template version 3.1 


Technical Reference MICROSAR Fr ERay Communication Controller E-Ray 
 
5  Functional Description 
Please refer to [3]. 
 
2017, Vector Informatik GmbH 
Version: 1.41 
10 / 24 
based on template version 3.1 


Technical Reference MICROSAR Fr ERay Communication Controller E-Ray 
 
6  Integration 
This  chapter  gives  necessary  information  for  the  integration  of  the  MICROSAR  Fr  ERay 
into an application environment of an ECU. It describes ERay specific issues in addition to 
[3]. 
6.1  Scope of Delivery 
The  delivery  of  the  Fr  ERay  contains  the  files  which  are  described  in  the  chapters  6.1.1 
and 6.1.2:
 
6.1.1 
Static Files 
File Name 
Description 
Fr_ERay.h 
This file replaces the file Fr_<CC>.h listed in the document [3]. 
 
 
Table 6-1  
Static files 
 
6.1.2 
Dynamic Files 
No additional dynamic files. Please refer to [3]. 
 
6.2 
Compiler Abstraction and Memory Mapping  
The  following  table  contains  the  memory  section  names  and  the  compiler  abstraction 
definitions defined for the Fr ERay and illustrates their assignment among each other. 
Compiler Abstraction 
 
T
S
Definitions 
 
A
e]
 
_F
 
 
E
 
am
 
D
R
 
INIT
INIT
M
 N
 
 
 
T
CO
_IS
on
G
Memory Mapping 
ti
L_
DE
R_NO
R_NO
R_FR
NS
CF
P
DE
ac
A
A
A
B
P
Sections 
tr
bs
R_CO
R_V
R_V
R_V
R_CO
R_P
R_A
R_CO
[A
F
F
F
F
F
F
F
F
[Section Name] 
 
 
 
 
 
 
 
 
 
FR_START_SEC_CODE 
 
 
 
 
 
 
 
 
 
FR_STOP_SEC_CODE 
FR_START_SEC_VAR_NOINIT_UNSPECIFIED 
 
 
 
 
 
 
 
 
 
FR_STOP_SEC_VAR_NOINIT_UNSPECIFIED 
FR_START_SEC_VAR_FAST_NOINIT_UNSPECIFIED 
 
 
 
 
 
 
 
 
 
FR_STOP_SEC_VAR_FAST_NOINIT_UNSPECIFIED 
2017, Vector Informatik GmbH 
Version: 1.41 
11 / 24 
based on template version 3.1 



Technical Reference MICROSAR Fr ERay Communication Controller E-Ray 
 
FR_START_SEC_CONST_UNSPECIFIED 
 
 
 
 
 
 
 
 
 
FR_STOP_SEC_CONST_UNSPECIFIED 
FR_START_SEC_PBCFG_ROOT 
 
 
 
 
 
 
 
 
 
FR_ STOP _SEC_PBCFG_ROOT 
FR_START_SEC_PBCFG  
 
 
 
 
 
 
 
 
 
FR_STOP_SEC_PBCFG 
FR_START_SEC_CONST_32BIT 
 
 
 
 
 
 
 
 
 
FR_STOP_SEC_CONST_32BIT 
FR_START_SEC_CONST_16BIT 
 
 
 
 
 
 
 
 
 
FR_STOP_SEC_CONST_16BIT 
FR_START_SEC_CONST_8BIT 
 
 
 
 
 
 
 
 
 
FR_STOP_SEC_CONST_8BIT 
FR_APPL_START_SEC_CODE 
 
 
 
 
 
 
 
 
 
FR_APPL_STOP_SEC_CODE 
FR_START_SEC_CODE_ISR 
 
 
 
 
 
 
 
 
 
FR_STOP_SEC_CODE_ISR 
Table 6-2  
Compiler abstraction and memory mapping 
 
Caution 
Please ensure that the define FR_PBCFG get the same value as FR_ CONST in 
  configuration type “Pre-compile Configuration” or “Link-time Configuration” 
6.3  Critical Sections 
To  ensure  data  consistency  and  a  correct  function  of  the  Fr  ERay  the  exclusive  area 
FR_EXCLUSIVE_AREA_0 has to be provided during the integration. 
Considering the timing behavior of your system (e.g. depending on the CPU load of your 
system,  priorities  and  interruptibility  of  interrupts  and  OS  tasks  and  their  jitter  and  delay 
times)  the  integrator  has  to  choose  and  configure  a  critical  section  solution  in  such  way 
that it is ensured that the API functions do not  interrupt each other. You can find a set of 
rules below which describes whether an exclusive area is needed by the Fr ERay or not. 
The  FR_EXCLUSIVE_AREA_0  has  to  be  used  if  at  least  one  of  the  following  rules  hold 
true: 
  It  is  possible  that  the  function  Fr_TransmitTxLPdu  is  interrupted  by  the  function 
Fr_TransmitTxLPdu itself. E.g. at execution of method Fr_TransmitTxLPdu, that 
was  triggered  by  upper  layer  because  the  attribute  FrIfImmediate  is  set,  is 
interrupted  by  the  job  list  execution  of  FrIf  that  contains  a  call  of  the  method 
Fr_TransmitTxLPdu, or vice versa. 
  At  enabled  feature  “Reconfig  LPdu  Support”  it  is  possible  that  the  functions 
Fr_DisableLPdu  or  Fr_ReconfigLPdu  are  interrupted  by  the  function 
Fr_TransmitTxLPdu  and  vice  versa.  E.g.  at  execution  of  the  method 
Fr_DisableLPdu  or  Fr_ReconfigLPdu  is  interrupted  by  the  job  list  execution  of 
FrIf that contains a call of the method Fr_TransmitTxLPdu.  
2017, Vector Informatik GmbH 
Version: 1.41 
12 / 24 
based on template version 3.1 


Technical Reference MICROSAR Fr ERay Communication Controller E-Ray 
 
The recommended implementation for the FR_EXCLUSIVE_AREA_0 of the component Fr 
ERay depends on the integration context of the job list execution.   
The  FR_EXCLUSIVE_AREA_0  shall  disable/enable  the  FlexRay  timer  interrupt  or  call 
SuspendAllInterrupts()    and    ResumeAllInterrupts()  in  case  the  job  list 
execution is done at interrupt context to ensure data consistency. 
The 
FR_EXCLUSIVE_AREA_0 
shall 
call 
SuspendOSInterrupts() 
 
and  
ResumeOSInterrupts() in case the case the job list execution is done at task context 
to  ensure  data  consistency.   Alternative  the  undesired  task  activation  can  be  prevent  by 
implement OS resource lock at the involved tasks.  
The  Fr  ERay  supports  one  of  the  following  two  alternatives  as  implementation  for  these 
exclusive areas depending on your questionnaire: 
  The BSW Scheduler (refer to [5] for a detailed description) 
  the Vector Standard Library (VStdLib) 
The VStdLib offers the possibility of mapping the interrupt handling to OS services or to 
user defined functions. In the first case interrupt handling is done by the OS, in the second 
case the user has to take care by providing corresponding functions. 
2017, Vector Informatik GmbH 
Version: 1.41 
13 / 24 
based on template version 3.1 



Technical Reference MICROSAR Fr ERay Communication Controller E-Ray 
 
6.4  General Integration notes 
A workaround for errata #27 in [4] is implemented in module FrSm. If no FrSm is used, the 
application has to implement a workaround. 
 
6.4.1 
Calculation of Timeout Loops 
Please  refer  to  [3]  for  generically  description  of  this  feature. The  following  text  describes 
the worst case value for given platform. 
The  worst  case  time  value  depends  on  the  “BCLK“  speed.  The  time  value  can  be 
calculated as follow: 
Worst case time = 1/BCLK * 1329 
e.g. 
Worst case time = 1/64MHz * 1329 = 20,7 micro seconds 
The  worst  case  time  wait  is  reached  with  the  “Timeout  Duration  Factor”  that  can  be  set 
within configuration. The “Timeout Duration Factor” value for the given example worst case 
time of 20,7 micro seconds is 380 in case the internal system clock of the micro controller 
is set to 128MHz. 
 
Info 
The timeout expiration is controlled by simply while loop. You can adapt the “Timeout 
  Duration Factor” in case you use other BCLK or internal system clock values. The new 
value of the “Timeout Duration Factor” can be find out by measuring the execution time 
of the while loop. 
while (timeoutCounter < “Timeout Duration Factor”) 

  timeoutCounter++; 

 
6.5  Integration notes for NEC V850 
6.5.1 
ERay Base Address 
The base address for V85x CC depends on the device and can be found in Table 6-3. 
Device name 
CC base address 
µPD70F3441 
0x0F800000 
 
µPD70F3461(A) 
0x0F800000 
µPD70F3501 
0xFF580000 
µPD70F4010 
0xFF580000 
Table 6-3  CC base address 
2017, Vector Informatik GmbH 
Version: 1.41 
14 / 24 
based on template version 3.1 



Technical Reference MICROSAR Fr ERay Communication Controller E-Ray 
 
6.5.2 
FlexRay Memory buffer number 
The ERay CC at V85x can address a maximum number of 128 message buffers. 
6.5.3 
FlexRay Memory Buffer size 
The  available  FlexRay  Message  RAM  for  V85x  CC  depends  on  the  device  and  can  be 
found in Table 6-4. 
Device name 
Message RAM 
µPD70F3441 
6 kB 
 
µPD70F3461(A) 
8 kB 
µPD70F3501 
8 kB 
µPD70F4010 
8 kB 
Table 6-4  Message RAM 
6.5.4 
Interrupt routines 
The  Fr  ERay  module  configures  the  CC  with  its  interrupt  registers.  But  the  FlexRay 
interrupts are not enabled on V850 interrupt controller by Fr ERay.  
The application has to enable the FlexRay interrupts on the V850 interrupt controller. As an 
example a small function is given within the next lines: 
 
 
Example 
   void EnableInterrupts(void) 

  ECU_FRIC0 = ECU_FRIC0 & (~0x40); 
  ECU_FRIC1 = ECU_FRIC1 & (~0x40); 
  ECU_FRIC2 = ECU_FRIC2 & (~0x40); 
}  
 
The interrupt function can be called directly from OS or integration of V850. Therefore the 
interrupt routines 
>  Fr_IrqLine0 or Fr_IrqLine1 line selected at optional parameter “Line select for status 
interrupts”. By default Fr_IrqLine0 is used. This interrupt is only necessary if 
configuration attribute “Cycle Start Interrupt” or ECUC Parameter FrCycleStartInterrup is 
enabled. Otherwise this interrupt does need not be enabled. 
>  Fr_IrqTimer0 
are implemented in file Fr_Irq.c. They call the corresponding interrupt function out of which 
the application callout functions are called. To save resources, Fr_IrqTimer0 directly calls 
the application callout function or FrIf, according to configuration. 
2017, Vector Informatik GmbH 
Version: 1.41 
15 / 24 
based on template version 3.1 



Technical Reference MICROSAR Fr ERay Communication Controller E-Ray 
 
6.5.5 
Timer interrupt 
At  V850  with  ERay  it  is  not  possible  to  switch  off  FlexRay  timer  interrupts  on  ERay. The 
configuration of Eray allows disconnecting the timer interrupt from line 0 or line 1 interrupt. 
This  is  the  default  configuration  of  FR.  But  there  is  an  additional  interrupt  line  for  timer 
interrupt  which  is  not  configurable  by  Eray  registers.  This  additional  interrupt  line  is 
connected directly to V850 interrupt controller. 
So enabling or disabling the timer interrupt on V850 interrupt controller has to be done by 
the application by configuration of V850 interrupt controller. 
6.5.6 
Buffer alignment 
The  used  FlexRay  buffers  shall  be  aligned  to  16  bit  addresses.  This  is  important  for 
message  buffers  which  are  sent  with  FrIf  mode  immediately  or  no  FrIf  is  used.  If  FrIf  is 
used,  FrIf  automatically  aligns  the  buffers  to  32  bit.  The  used  FlexRay  buffers  shall  be 
aligned to 16 bit addresses. 
In  case  this  is  not  possible,  FlexRay  driver  can  align  unaligned  message  itself.  This 
functionality  needs  more  runtime  to  transmit  unaligned  messages  and  needs  to  check 
every message for its alignment. It can be activated with a define switch in userconfig-file. 
 
Example 
   #define FR_NONALIGNED_SRCMEMORY 
 
 
6.6 
Integration notes for RH850 
The  ERay  CC  at  RH850  can  address  a  maximum  number  of  128  message  buffers. The 
maximum amount  of usable  message buffers depends heavily on the size of the frames, 
and thus, on the specific configuration. 
6.6.1 
Buffer alignment 
The  used  FlexRay  buffers  shall  be  aligned  to  16  bit  addresses.  This  is  important  for 
message  buffers  which  are  sent  with  FrIf  mode  immediately  or  no  FrIf  is  used.  If  FrIf  is 
used,  FrIf  automatically  aligns  the  buffers  to  32  bit.  The  used  FlexRay  buffers  shall  be 
aligned to 16 bit addresses. 
6.6.2 
Specifics of RH850 P1x 
We  discovered  a  problem  with  RH850  derivatives  of  type  P1x.  With  these  chips  our 
FlexRay  might  not  work  as  expected.  We  observed  an  abortion  of  the  initialization 
sequence.  The  result  is  that  no  FlexRay  communication  can  be  established 
(ESCAN00093807). 
We observed this behavior on the following P1x: 
>  P1H-C 1331 
>  P1H-C 1372 
2017, Vector Informatik GmbH 
Version: 1.41 
16 / 24 
based on template version 3.1 


Technical Reference MICROSAR Fr ERay Communication Controller E-Ray 
 
>  P1M 1312 
There  is  a  workaround  that  can  be  controlled  by  defining  FR_WAIT_STATES  via  a  user 
config  file.  If  FR_WAIT_STATES  is  not  defined  its  default  value  will  be  5  which  means  5 
ms. A user config file can look like that: 
 
#define FR_WAIT_STATES 3 /* number means time in ms */ 
 
 
2017, Vector Informatik GmbH 
Version: 1.41 
17 / 24 
based on template version 3.1 


Technical Reference MICROSAR Fr ERay Communication Controller E-Ray 
 
7  API Description 
7.1 
Type Definitions 
The types defined by the Fr ERay are described in this chapter. 
The Fr ERay does not define specific type definitions.  
7.2  Interrupt Service Routines provided by Fr ERay  
For  general  description  please  refer  to  [3]  and  the  respective  chapters  under  “Functional 
Description”.
 
 
Prototype 
FUNC(void, FR_CODE) Fr_IrqLine0/Fr_IrqLine1 () 
Parameter 
--- 
 
Return code 
--- 
 
Functional Description 
Executes the status interrupts of ERay. By default cycle start interrupt are used by Fr ERay to synchronize 
Application with callback function ApplFr_ISR_CycleStart.  
 
Particularities and Limitations 
>  Particularities, limitations, post-conditions, pre-conditions 
>  An interrupt splitting is used. 
Fr ERay is initialized and interrupts are enabled. 
>  Configuration attribute “Cycle Start Interrupt” or ECUC Parameter FrCycleStartInterrupt is enabled.  
Table 7-1  
Fr_IrqLine0/Fr_IrqLine1 
 
Prototype 
FUNC(void, FR_CODE) Fr_IrqTimer0 () 
Parameter 
--- 
 
Return code 
--- 
 
2017, Vector Informatik GmbH 
Version: 1.41 
18 / 24 
based on template version 3.1 


Technical Reference MICROSAR Fr ERay Communication Controller E-Ray 
 
Functional Description 
Executes the Timer0 interrupt of ERay. By default this interrupt is used by Fr ERay. It also disables the 
interrupt. 
Particularities and Limitations 
>  Particularities, limitations, post-conditions, pre-conditions 
>  A separate interrupt for Timer0 is called by hardware and interrupt splitting is used. 
Fr ERay is initialized and interrupts are enabled. 
Table 7-2  
Fr_IrqTimer0 
2017, Vector Informatik GmbH 
Version: 1.41 
19 / 24 
based on template version 3.1 


Technical Reference MICROSAR Fr ERay Communication Controller E-Ray 
 
7.3 
  
7.4  Services provided by Fr ERay and differs from standard 
The  Fr  ERay  API  consists  of  services,  which  are  realized  by  function  calls.  General 
services are described in [3]. The following services differ from standard behavior. 
7.4.1 
Fr_EnableAbsoluteTimerIRQ 
Fr  ERay  module  does  not  enable  or  disable  ERay  timer  interrupts  or  assign  them  to  an 
ERay interrupt line. The application has to enable or disable the ERay timer interrupt at the 
controller specific interrupt controller.  
7.4.2 
Fr_DisableAbsoluteTimerIRQ 
Please refer to 7.4.1 
7.5  Services used by Fr ERay 
General services are described in [3]. 
Depending on configuration services used by  Fr ERay are listed in next table. For details 
about prototype and functionality refer to the documentation of the providing component. 
Configuration/Precondition 
Component 
API 
Application callback at timer 0 interrupt and  
FrIf 
FrIf_JobListExec_0 
BSM FrIf is used 
Table 7-3  
Configuration dependent services used by Fr ERay 
7.6 
Callback Functions 
There is no Fr ERay specific callback function available.  
7.7 
Configurable Interfaces 
7.7.1 
Notifications 
There is no Fr ERay specific notification function available.  
7.7.2 
Callout Functions 
There is no Fr ERay specific callout function available.  
2017, Vector Informatik GmbH 
Version: 1.41 
20 / 24 
based on template version 3.1 


Technical Reference MICROSAR Fr ERay Communication Controller E-Ray 
 
8  Configuration 
In the Fr ERay the attributes can be configured with the following methods: 
>  Configuration in DaVinci Configurator 5; for a detailed description see 8.2. 
8.1 
Hardware Fifo 
This platform does not support Hardware Fifo support. Therefore it cannot be configured. 
8.2  Configuration with DaVinci Configurator 5  
The  Fr  ERay  is  configured  with  the  help  of  the  configuration  tool  DaVinci  Configurator 5. 
For general configuration information please refer to [3]. 
2017, Vector Informatik GmbH 
Version: 1.41 
21 / 24 
based on template version 3.1 


Technical Reference MICROSAR Fr ERay Communication Controller E-Ray 
 
9  AUTOSAR Standard Compliance 
9.1  Deviations 
For general deviations please refer to [3] and [4]. 
9.1.1 
Fr_GetSyncFrameList 
Eray CC always receives a transmitted SYNC frame on both channels, even if a channel is 
not used. The transmission of a SYNC frame depends on configuration. 
9.1.2 
Fr_GetPOCStatus 
The value for Fr_POCStatusPtr->SlotMode is derived out of the Eray bit CCSV.SLT. 
At  Eray  versions  higher  than 1.0.1  the  Eray  Bit  CCSV.SLT  (single  slot  mode)  can not  be 
read in Poc states: “Config, Default Config, Halt” and always return 0. In all other POC states 
the Value is according configuration. For a detailed description please refer to [4]. 
9.2  Additions/ Extensions 
Please refer to [3]. 
9.3  Limitations 
Please refer to [3].  
 
 
For  the  hardware  limitations  described  in  [4],  workarounds  are  implemented  or  configuration 
warnings with suggestions for solutions are displayed at configuration time. 
2017, Vector Informatik GmbH 
Version: 1.41 
22 / 24 
based on template version 3.1 


Technical Reference MICROSAR Fr ERay Communication Controller E-Ray 
 
10  Glossary and Abbreviations 
10.1  Glossary 
Term 
Description 
EAD 
Embedded Architecture Designer; generation tool for MICROSAR 
components 
Cfg 5 
DaVinci Configurator 5. Configuration tool for Microsar 4 
Table 10-1   Glossary 
 
 
10.2  Abbreviations 
Abbreviation 
Description 
API 
Application Programming Interface   
AUTOSAR 
Automotive Open System Architecture 
BSW 
Basis Software 
CC 
FlexRay Communication Controller 
E-Ray 
Specific implementation of a FlexRay Communication Controller 
DBA 
Direct Buffer Access 
DEM 
Diagnostic Event Manager 
DET 
Development Error Tracer 
EAD 
Embedded Architecture Designer 
ECU 
Electronic Control Unit 
HIS 
Hersteller Initiative Software 
ISR 
Interrupt Service Routine 
MICROSAR 
Microcontroller Open System Architecture (the Vector AUTOSAR 
solution) 
PPort 
Provide Port 
RPort 
Require Port 
RTE 
Runtime Environment 
SRS 
Software Requirement Specification 
SWC 
Software Component 
SWS 
Software Specification 
Table 10-2   Abbreviations 
2017, Vector Informatik GmbH 
Version: 1.41 
23 / 24 
based on template version 3.1 


Technical Reference MICROSAR Fr ERay Communication Controller E-Ray 
 
11  Contact 
Visit our website for more information on 
 
>   News 
>   Products 
>   Demo software 
>   Support 
>   Training data 
>   Addresses 
 
www.vector-informatik.com 
 
 
 
 
2017, Vector Informatik GmbH 
Version: 1.41 
24 / 24 
based on template version 3.1 

Document Outline


7 - TechnicalReference_Frs


 
 
 
 
 
 
 
 
 
 
 
 
 
MICROSAR FR 
Technical Reference 
 
Base Content 
Version 1.04.00 
 
 
 
 
 
 
 
 
 
 
 
Authors 
Roland Hocke, Matthias Müller 
Status 
Released 
 
 
 
 
 
 


Technical Reference MICROSAR FR 
1  Document Information 
1.1 
History 
 
Author 
Date 
Version 
Remarks 
Matthias Müller 
2012-11-15 
1.0 
Initial Version of Autosar 4 
Matthias Müller 
2013-07-18 
1.0.1 
ESCAN00069139: 
Added new restriction to 
section 3.14 FIFO reception 
Matthias Müller 
2013-08-01 
1.1 
ESCAN00067407 
Remove obsolete MTS APIs 
Roland Hocke 
2013-10-24 
1.2 
Added Limitations and the 
description of 
StringentLength- and 
StringentCheck 

Matthias Müller 
2014-11-05 
1.3 
Added feature MICROSAR 
Identity Manager using Post-
Build Selectable 
Matthias Müller 
2017-07-05 
1.4 
Adapted Features and added 
description of 
ApplFr_ISR_Timer0_1 and 
ApplFr_ISR_CycleStart_1. 
 
Table 1-1   History of the document 
1.2 
Reference Documents 
No. 
Title 
Version 
[1]   AUTOSAR_SWS_FlexRayDriver.pdf 
4.3.0 
[2]   AUTOSAR_SWS_FlexRayDriver.pdf 
2.3.0 
[3]   AUTOSAR_SRS_FlexRay.pdf 
3.1.0 
[4]   AUTOSAR_SRS_FlexRay.pdf 
4.3.0 
[5]   AUTOSAR_SWS_DET.pdf 
2.2.0 
[6]   AUTOSAR_SWS_DEM.pdf 
2.2.1 
[7]   AUTOSAR_BasicSoftwareModules.pdf 
1.2.0 
[8]   TechnicalReference_ASR_Fr_<CCName>_<platform>.pdf 
1.10 or 
later 
[9]   FlexRay Communications System Protocol Specification 
2.1A 
[10]  TechnicalReference_ASR_FrIf.pdf 
3.0.7 or 
later 
[11]  TechnicalReference_Asr_EcuM.pdf 
2.1.0 or 
later 
© 2017 Vector Informatik GmbH 
Version 1.04.00 

based on template version 6.0.1 



Technical Reference MICROSAR FR 
[12]  TechnicalReference_Asr_FrTp.pdf 
1.14.0 or 
later 
[13]  TechnicalReference_Asr_AMDRunTimeMeasurement.pdf 
V1.0 or  
later 
[14]  AN-ISC-8-1118 MICROSAR BSW Compatibility Check 
1.0 
[15]  AUTOSAR_InterruptHandling_Explanation.pdf 
1.0.0 or 
later 
[16]  http://www.autosar.org/bugzilla/ 
n/a 
Table 1-2   Reference documents 
 
1.3 
Scope of the Document  
This technical reference describes the general use of the FlexRay driver basis software. All 
aspects  which  are  Communication  controller  specific  are  described  in  a  separate 
document [8], which is also part of the delivery. 
 
Please note 
We have configured the programs in accordance with your specifications in the 
  questionnaire. Whereas the programs do support other configurations than the one 
specified in your questionnaire, Vector´s release of the programs delivered to your 
company is expressly restricted to the configuration you have specified in the 
questionnaire. 
© 2017 Vector Informatik GmbH 
Version 1.04.00 

based on template version 6.0.1 


Technical Reference MICROSAR FR 
Contents 
1 
Document Information ................................................................................................. 2 
1.1 

History ............................................................................................................... 2 
1.2 
Reference Documents ....................................................................................... 2 
1.3 
Scope of the Document...................................................................................... 3 
2 
Introduction................................................................................................................... 9 
2.1 

Architecture Overview ........................................................................................ 9 
3 
Functional Description ............................................................................................... 12 
3.1 

Features .......................................................................................................... 12 
3.2 
Initialization ...................................................................................................... 13 
3.3 
Configuration Variants ...................................................................................... 14 
3.4 
States .............................................................................................................. 14 
3.5 
Dual bus network usage................................................................................... 14 
3.6 
Main Functions ................................................................................................ 16 
3.7 
Error Handling .................................................................................................. 16 
3.7.1 

Development Error Reporting ........................................................... 16 
3.7.1.1 
Parameter Checking ...................................................... 18 
3.7.2 
Production Code Error Reporting ..................................................... 21 
3.8 
Buffer Reconfiguration ..................................................................................... 21 
3.9 
Reconfig LPdu Support .................................................................................... 21 
3.10 
Dynamic Payload ............................................................................................. 22 
3.11 
Single Channel API .......................................................................................... 22 
3.12 
Direct Buffer Access ......................................................................................... 23 
3.13 
Hardware Loop with Cancellation ..................................................................... 23 
3.14 
FIFO reception ................................................................................................. 23 
3.15 
Reading out the Flexray parameters (Read CC Parameters) ........................... 24 
4 
Integration ................................................................................................................... 25 
4.1 

Scope of Delivery ............................................................................................. 25 
4.1.1 

Static Files ....................................................................................... 25 
4.1.2 
Dynamic Files .................................................................................. 25 
4.2 
Include Structure .............................................................................................. 26 
4.3 
Compiler Abstraction and Memory Mapping ..................................................... 26 
4.4 
Interrupt Handling ............................................................................................ 26 
4.5 
Critical Sections ............................................................................................... 27 
5 
API Description ........................................................................................................... 28 
5.1 

Type Definitions ............................................................................................... 28 
© 2017 Vector Informatik GmbH 
Version 1.04.00 

based on template version 6.0.1 


Technical Reference MICROSAR FR 
5.2 
Interrupt Service Routines provided by FR ....................................................... 28 
5.3 
Services provided by FR .................................................................................. 29 
5.3.1 

Fr_InitMemory .................................................................................. 29 
5.3.2 
Fr_Init .............................................................................................. 29 
5.3.3 
Fr_ControllerInit ............................................................................... 30 
5.3.4 
Fr_AllSlots ....................................................................................... 30 
5.3.5 
Fr_StartCommunication ................................................................... 31 
5.3.6 
Fr_HaltCommunication .................................................................... 31 
5.3.7 
Fr_AbortCommunication .................................................................. 32 
5.3.8 
Fr_AllowColdstart ............................................................................. 32 
5.3.9 
Fr_SendWUP ................................................................................... 33 
5.3.10 
Fr_SetWakeupChannel .................................................................... 33 
5.3.11 
Fr_GetPOCStatus ............................................................................ 34 
5.3.12 
Fr_TransmitTxLPdu ......................................................................... 35 
5.3.13 
Fr_ReceiveRxLPdu .......................................................................... 36 
5.3.14 
Fr_CancelTxLPdu ............................................................................ 36 
5.3.15 
Fr_CheckTxLPduStatus ................................................................... 37 
5.3.16 
Fr_GetGlobalTime ............................................................................ 38 
5.3.17 
Fr_GetNmVector .............................................................................. 38 
5.3.18 
Fr_GetVersionInfo ............................................................................ 39 
5.3.19 
Fr_GetSyncFrameList ...................................................................... 39 
5.3.20 
Fr_DisableLPdu (optional)................................................................ 40 
5.3.21 
Fr_ReconfigLPdu (optional) ............................................................. 41 
5.3.22 
Fr_SetAbsoluteTimer ....................................................................... 42 
5.3.23 
Fr_CancelAbsoluteTimer .................................................................. 42 
5.3.24 
Fr_EnableAbsoluteTimerIRQ ........................................................... 43 
5.3.25 
Fr_AckAbsoluteTimerIRQ ................................................................ 43 
5.3.26 
Fr_DisableAbsoluteTimerIRQ ........................................................... 44 
5.3.27 
Fr_GetAbsoluteTimerIRQStatus ....................................................... 45 
5.3.28 
Fr_GetChannelStatus ...................................................................... 45 
5.3.29 
Fr_GetClockCorrection .................................................................... 46 
5.3.30 
Fr_GetWakeupRxStatus .................................................................. 47 
5.3.31 
Fr_GetNumOfStartupFrames ........................................................... 47 
5.3.32 
Fr_TransmitTxLPdu_DBA (optional) ................................................. 48 
5.3.33 
Fr_TransmitTxLPdu_ImmediateDBA (optional) ................................ 49 
5.3.34 
Fr_RequestBuffer_DBA (optional) .................................................... 50 
5.3.35 
Fr_ReceiveRxLPdu_DBA (optional) ................................................. 50 
5.3.36 
Fr_UnlockRxLPdu_DBA (optional) ................................................... 51 
5.3.37 
Fr_ReadCCConfig (optional) ............................................................ 52 
5.4 
Services used by FR ........................................................................................ 52 
5.5 
Callback Functions ........................................................................................... 53 
© 2017 Vector Informatik GmbH 
Version 1.04.00 

based on template version 6.0.1 


Technical Reference MICROSAR FR 
5.6 
Configurable Interfaces .................................................................................... 53 
5.6.1 

Notifications ..................................................................................... 53 
5.6.2 
Callout Functions ............................................................................. 53 
5.6.2.1 

ApplFr_ISR_Timer0 ....................................................... 53 
5.6.2.2 
ApplFr_ISR_Timer0_1 ................................................... 54 
5.6.2.3 
ApplFr_ISR_CycleStart .................................................. 54 
5.6.2.4 
ApplFr_ISR_CycleStart_1 .............................................. 55 
6 
Glossary and Abbreviations ...................................................................................... 56 
6.1 

Glossary .......................................................................................................... 56 
6.2 
Abbreviations ................................................................................................... 56 
7 
Contact ........................................................................................................................ 57 
 
© 2017 Vector Informatik GmbH 
Version 1.04.00 

based on template version 6.0.1 


Technical Reference MICROSAR FR 
Illustrations 
Figure 2-1 
AUTOSAR architecture ............................................................................. 10 
Figure 2-2 
Interfaces to adjacent modules of the Fr ................................................... 11 
Figure 3-1 
FlexRay Driver Sequence Diagram ........................................................... 15 
Figure 4-1 
Include structure ....................................................................................... 26 
Tables 
Table 1-1  
History of the document .............................................................................. 2 
Table 1-2  
Reference documents ................................................................................. 3 
Table 3-1  
Supported AUTOSAR standard conform features ..................................... 13 
Table 3-2  
Not supported AUTOSAR standard conform features ............................... 13 
Table 3-3  
Features provided beyond the AUTOSAR standard .................................. 13 
Table 3-4  
Mapping of service IDs to services ........................................................... 17 
Table 3-5  
Errors reported to DET ............................................................................. 18 
Table 3-6  
Errors reported to DEM ............................................................................. 21 
Table 4-1  
Static files ................................................................................................. 25 
Table 4-2  
Generated files ......................................................................................... 25 
Table 5-1  
Fr_InitMemory .......................................................................................... 29 
Table 5-2  
Fr_Init ....................................................................................................... 29 
Table 5-3  
Fr_ControllerInit ........................................................................................ 30 
Table 5-4  
Fr_AllSlots ................................................................................................ 31 
Table 5-5  
Fr_StartCommunication ............................................................................ 31 
Table 5-6  
Fr_HaltCommunication ............................................................................. 32 
Table 5-7  
Fr_AbortCommunication ........................................................................... 32 
Table 5-8 
Fr_AllowColdstart ..................................................................................... 33 
Table 5-9  
Fr_SendWUP ........................................................................................... 33 
Table 5-10  
Fr_SetWakeupChannel ............................................................................. 34 
Table 5-11  
Fr_GetPOCStatus .................................................................................... 34 
Table 5-12  
Fr_TransmitTxLPdu .................................................................................. 35 
Table 5-13  
Fr_ReceiveRxLPdu................................................................................... 36 
Table 5-14  
Fr_CancelTxLPdu ..................................................................................... 37 
Table 5-15  
Fr_CheckTxLPduStatus ............................................................................ 38 
Table 5-16  
Fr_GetGlobalTime .................................................................................... 38 
Table 5-17  
Fr_GetNmVector ....................................................................................... 39 
Table 5-18  
Fr_GetVersionInfo .................................................................................... 39 
Table 5-19  
Fr_GetSyncFrameList ............................................................................... 40 
Table 5-20  
Fr_DisableLPdu ........................................................................................ 41 
Table 5-21  
Fr_ReconfigLPdu ...................................................................................... 42 
Table 5-22  
Fr_SetAbsoluteTimer ................................................................................ 42 
Table 5-23  
Fr_CancelAbsoluteTimer .......................................................................... 43 
Table 5-24  
Fr_EnableAbsoluteTimerIRQ .................................................................... 43 
Table 5-25  
Fr_AckAbsoluteTimerIRQ ......................................................................... 44 
Table 5-26  
Fr_DisableAbsoluteTimerIRQ ................................................................... 44 
Table 5-27  
Fr_GetAbsoluteTimerIRQStatus ............................................................... 45 
Table 5-28  
Fr_GetChannelStatus ............................................................................... 46 
Table 5-29 
Fr_GetClockCorrection ............................................................................. 47 
Table 5-30  
Fr_GetWakeupRxStatus ........................................................................... 47 
Table 5-31  
Fr_GetNumOfStartupFrames .................................................................... 48 
Table 5-32 
Fr_TransmitTxLPdu_DBA ......................................................................... 49 
Table 5-33 
Fr_TransmitTxLPdu_ImmediateDBA ........................................................ 49 
Table 5-34 
Fr_RequestBuffer_DBA ............................................................................ 50 
Table 5-35 
Fr_ReceiveRxLPdu_DBA ......................................................................... 51 
© 2017 Vector Informatik GmbH 
Version 1.04.00 

based on template version 6.0.1 


Technical Reference MICROSAR FR 
Table 5-36 
Fr_UnlockRxLPdu_DBA ........................................................................... 52 
Table 5-37 
Fr_ReadCCConfig .................................................................................... 52 
Table 5-38  
Services used by the FR ........................................................................... 53 
Table 5-39  
ApplFr_ISR_Timer0 .................................................................................. 54 
Table 5-40  
ApplFr_ISR_Timer0 .................................................................................. 54 
Table 5-41  
ApplFr_ISR_CycleStart ............................................................................. 55 
Table 5-42  
ApplFr_ISR_CycleStart ............................................................................. 55 
Table 6-1  
Glossary ................................................................................................... 56 
Table 6-2  
Abbreviations ............................................................................................ 56 
 
 
© 2017 Vector Informatik GmbH 
Version 1.04.00 

based on template version 6.0.1 



Technical Reference MICROSAR FR 
2  Introduction 
This  document  describes  the  functionality, API  and  configuration  of  the AUTOSAR  BSW 
module FR as specified in [8].  
 
Supported AUTOSAR Release*: 

Supported Configuration Variants: 
pre-compile, post-build 
 
 
Vendor ID: 
FR_VENDOR_ID 
30 decimal 
(= Vector-Informatik, 
according to HIS) 
Module ID: 
FR_MODULE_ID   
81 decimal 
(according to ref. [7]) 
* For the precise AUTOSAR Release 4.x please see the release specific documentation.  
 
 
Caution 
Deviations can be described in [8].  
 
 
 
2.1 
Architecture Overview 
The following figure shows where the FR is located in the AUTOSAR architecture. 
 
© 2017 Vector Informatik GmbH 
Version 1.04.00 

based on template version 6.0.1 



Technical Reference MICROSAR FR 
 
Figure 2-1  AUTOSAR architecture 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
10 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
The next figure shows the interfaces to adjacent modules of the Fr. These interfaces are 
described in chapter “API Description”.  
 class Module Structure
Module
Module
Module
Application
FrIf
CDD
«use»
«use»
«use»
Module
Module
Module
Module
Module
Service User
EcuM
DEM
Det
SchM
«use»
«use»
«use»
«use»
«use»
«use»
«use»
FR
«use»
«EmbeddedInterface»
«EmbeddedInterface»
«EmbeddedInterface»
Status
Communication
«EmbeddedInterface»
Timer
«EmbeddedInterface»
«EmbeddedInterface»
Fr_General
«ServiceFunction»
«ServiceFunction»
Startup
«ServiceFunction»
Shutdow n
+  Fr_GetChannelStatus()
+  Fr_AllSlots()
+  _Fr_TemplateFunction()  :void
+  Fr_AckAbsoluteTimerIRQ()
+  Fr_GetClockCorrection()
«ServiceFunction»
+  Fr_CancelTxLPdu()
«ServiceFunction»
«ServiceFunction»
+  Fr_CancelAbsoluteTimer()
+  Fr_GetGlobalTime()
+  Fr_AllowColdstart()
+  Fr_CheckTxLPduStatus()
+  Fr_AbortCommunication()
+  Fr_GetVersionInfo()
+  Fr_DisableAbsoluteTimerIRQ()
+  Fr_GetNmVector()
+  Fr_ControllerInit()
+  Fr_DisableLPdu()
+  Fr_HaltCommunication()
+  Fr_Init()
+  Fr_EnableAbsoluteTimerIRQ()
+  Fr_GetNumOfStartupFrames()
+  Fr_SendWUP()
+  Fr_IrqLine0()
+  Fr_InitMemory()
+  Fr_GetAbsoluteTimerIRQStatus()
+  Fr_GetPOCStatus()
+  Fr_SetWakeupChannel()
+  Fr_IrqLine0_1()
+  Fr_SetAbsoluteTimer()
+  Fr_GetSyncFrameList()
+  Fr_StartCommunication()
+  Fr_IrqLine1()
+  Fr_GetWakeupRxStatus()
+  Fr_IrqLine1_1()
+  Fr_ReadCCConfig()
+  Fr_IrqTimer0()
+  Fr_IrqTimer0_1()
+  Fr_ISR_Status()
+  Fr_ReceiveRxLPdu()
+  Fr_ReconfigLPdu()
+  Fr_TransmitTxLPdu()
«use»
«use»
«use»
«use»
«use»
«use»
«use»
opt DBA
«EmbeddedInterface»
LocalHardw areAbstractionLayer
[DBA services are only available on MFR-based and CANoeEmu platforms]
«LocalFunction»
+  Fr_VCalHeaderCRC()  :uint16
«EmbeddedInterface»
+  Fr_VEnterConfigMode()  :Std_ReturnType
Direct Buffer Access
On CANoeEmu platform the external Fr APIs 
+  Fr_VExecutePOCCommand()  :Std_ReturnType
«ServiceFunction»
directly access the CANoeAPI_* services (on 
+  Fr_VIsMsgId()  :boolean
VTT platform these services are indirectly 
+  Fr_ReceiveRxLPdu_DBA()  :void
+  Fr_VLeaveConfigMode()  :Std_ReturnType
called via VttCntrl). 
+  Fr_RequestBuffer_DBA()  :void
«use»
+  Fr_VReadBackSupport()  :Std_ReturnType
+  Fr_TransmitTxLPdu_DBA()  :void
+  Fr_VReadDataFromCC()  :void
Hence the LocalHardwareAbstractionLayer is 
+  Fr_TransmitTxLPdu_ImmediateDBA()  :void
+  Fr_VReadValue()
not used in this case.
+  Fr_UnlockRxLPdu_DBA()  :void
+  Fr_VResetBits()
+  Fr_VSetBits()
+  Fr_VSetReg()  :Std_ReturnType
+  Fr_VWriteDataToCC()  :void
+  Fr_VWriteValue()
«access»
Hardware
Module
Module
FlexRay CC
VttCntrl
CANoeAPI
 
Figure 2-2  Interfaces to adjacent modules of the Fr 
 
 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
11 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
3  Functional Description 
3.1 
Features 
he features listed in the following tables cover the complete functionality specified for the 
FR. 
The AUTOSAR  standard  functionality  is  specified  in  [1],  the  corresponding  features  are 
listed in the tables 
>  Table 3-1   Supported AUTOSAR standard conform features 
>  Table 3-2   Not supported AUTOSAR standard conform features 
Vector  Informatik  provides  further  FR  functionality  beyond  the AUTOSAR  standard.  The 
corresponding features are listed in the table 
>  Table 3-3   Features provided beyond the AUTOSAR standard 
The following features specified in [1] are supported: 
Supported AUTOSAR Standard Conform Features 
Initialization: 
  FlexRay Communication Controller initialization 
  FlexRay Communication handling with startup, halt or abort communication 
LPdu transmission: 
  Transmission 
  Dynamic payload handling 
  Transparent hardware buffer reconfiguration 
   
LPdu reception: 
  Reception 
  FIFO support 
Status information: 
  Synchronization information 
  FlexRay time 
  Sync frame list 
  NM vector 
  Version info 
Hardware Abstraction: 
  Handle two FlexRay CCs (E-Ray) 
  Disable LPdu 
  Reconfigure LPdu 
Configuration variants: 
  Precompile 
  Linktime 
  Post-build Selectable 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
12 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
Supported AUTOSAR Standard Conform Features 
  Post-build Loadable 
Error detection and handling: 
  Dev error reporting 
  FlexRay controller hardware error with DEM reporting 
Table 3-1   Supported AUTOSAR standard conform features 
3.1.1 
Deviations 
The following features specified in [1] are not or only partly supported: 
Category 
Description 
Version 
Functional  Implementation Requirements: Module vendor identification. 
3.0.0 
Functional  Extended Production Errors: The FlexRay protocol 
3.2.0 
communication error which indicates errors on the network for a 
particular LPdu is not supported. (FrIfDemFTSlotStatusRef)  
Functional  Indexing Scheme: Handling of two FlexRay CCs is only supported by  1.0.0 
E-Ray based platforms. Mfr based platforms can still only handle one 
FlexRay CC. 
Table 3-2   Not supported AUTOSAR standard conform features 
3.1.2 
Additions/Extensions 
The following features are provided beyond the AUTOSAR standard: 
Features provided beyond the AUTOSAR standard 
BSW debug parameters 
Message ID filtering 
Direct buffer access 
AMD runtime measurement 
Table 3-3   Features provided beyond the AUTOSAR standard 
 
3.2 
Initialization 
Before the Fr can be used it has to be initialized by Fr_InitMemory() which initialize local 
variables  and  Fr_Init(&Fr_Config)  which  performs  the  basic  initialization  but  does  not 
enable the FlexRay communication.  
All  other API  calls  that  are  required  for  proper  FlexRay  communication  are  done  by  FrIf 
layer. 
 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
13 
based on template version 6.0.1 



Technical Reference MICROSAR FR 
3.3 
Configuration Variants 
Fr  supports  the  precompile  time  configuration  variant,  linktime  configuration  variant  and 
postbuild  configuration  variant.  Precompile  is  faster  due  to  a  direct  data  access.  At 
postbuild variant the configuration data section can be (over-)flashed without compiling the 
application. Respectively the configuration data is then only accessible by pointer.  
3.4 
States 
The  FlexRay  driver  life  cycle  comprises  three  states:  configuration,  communication  and 
end. Figure 3-1 shows the entire life cycle except interrupt and timer handling. Interrupts 
are handled during communication. The following interrupts are concerned: 
  Absolute Timer Interrupt (depending on configuration) 
  Cycle Start Interrupt (depending on configuration) 
  Receive Interrupt (depending on configuration) 
  Transmit Interrupt (depending on configuration) 
 
3.5 
Dual bus network usage 
Fr supports two physical layer channels identified as channel A and channel B. When 
using the dual bus redundancy mode remember that the chronological first valid frame that 
reaches the CC on channel A or B is copied into the message buffer. 
 
 
Caution 
Please keep in mind that a Null Frame is also a valid frame regarding to [9]. 
 
 
 
 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
14 
based on template version 6.0.1 
























Technical Reference MICROSAR FR 
FlexRay 
Driver 
Controller 
Interface 
 
 
 
Driver Initialization 
Config 
 
 
Controller Initialization 
 
Config Mode 
 
Initialization 
Register + Buffer Configuration 
 
 
Ready Mode 
Start 
 
Communication 
Normal Mode 
 
Send Frames 
 
Write Buffer 
 
Read Buffer 
Communication 
Receive Frames 
 
 
 
Read Status 
Get Status 
 
 
Halt / Stop 
Communication 
 
End 
Halt Mode 
 
 
 
Figure 3-1  FlexRay Driver Sequence Diagram 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
15 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
3.6 
Main Functions 
After  configuration  the  communication  can  be  started  and  in  case  of  success  FlexRay 
frames  can  be  sent  and  received  using  driver  interfaces.  The  driver  itself  has  no  main 
function that needs to be called cyclically. 
During  bus  operation  the  driver  handles  cycle  start,  timer  and  optional  send  /  receives 
interrupts by clearing the interrupt flags and calling the interrupt specific handler routines. 
In addition the driver offers interfaces to obtain the synchronization status of the FlexRay 
bus and the POC status. 
The driver offers interfaces to handle the Absolute Timer. 
3.7 
Error Handling 
3.7.1 
Development Error Reporting 
By  default,  development  errors  are  reported  to  the  DET  using  the  service 
Det_ReportError()as  specified  in  [3],  if  development  error  reporting  is  enabled  (i.e. 
GenTool switch ‘Dev Error Detect’ is set). 
If  another  module  is  used  for  development  error  reporting,  the  function  prototype  for 
reporting the error can be configured by the integrator, but must have the same signature 
as the service Det_ReportError(). 
The reported FR ID is 81u. 
The  reported  service  IDs  identify  the  services  which  are  described  in  5.3.  The  following 
table presents the service IDs and the related services: 
 
Service ID 
Service 
0x00 
FR_API_ID_CONTROLLER_INIT 
0x03 
FR_API_ID_START_COMMUNICATION 
0x04 
FR_API_ID_HALT_COMMUNICATION 
0x05 
FR_API_ID_ABORT_COMMUNICATION 
0x06 
FR_API_ID_SEND_WUP 
0x07 
FR_API_ID_SET_WAKEUP_CHANNEL 
0x0A 
FR_API_ID_GET_POC_STATUS 
0x0B 
FR_API_ID_TRANSMIT_TX_LPDU 
0x0C 
FR_API_ID_RECEIVE_RX_LPDU 
0x0D 
FR_API_ID_CHECK_TX_LPDU_STATUS 
0x10 
FR_API_ID_GET_GLOBAL_TIME 
0x11 
FR_API_ID_SET_ABSOLUTE_TIMER 
0x13 
FR_API_ID_CANCEL_ABSOLUTE_TIMER 
0x15 
FR_API_ID_ENABLE_ABSOLUTE_TIMER_IRQ 
0x17 
FR_API_ID_ACK_ABSOLUTE_TIMER_IRQ 
0x19 
FR_API_ID_DISABLE_ABSOLUTE_TIMER_IRQ 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
16 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
Service ID 
Service 
0x1B 
FR_API_ID_GET_VERSION_INFO 
0x1C 
FR_API_ID_INIT 
0x1F 
FR_API_ID_PREPARE_LPDU 
0x20 
FR_API_ID_GET_ABSOLUTE_TIMER_IRQ_STATUS 
0x22 
FR_API_ID_GET_NM_VECTOR 
0x23 
FR_API_ID_ALLOW_COLDSTART 
0x24 
FR_API_ID_ALLSLOTS (optional) 
0x25 
FR_API_ID_RECONFIG_LPDU 
0x26 
FR_API_ID_DISABLE_LPDU 
0x27 
FR_API_ID_GETNUMOFSTARTUPFRAMES (optional) 
0x28 
FR_API_ID_GET_CHANNEL_STATUS 
0x29 
FR_API_ID_GET_CLOCK_CORRECTION 
0x2A 
FR_API_ID_GET_SYNC_FRAME_LIST(optional) 
0x2B 
FR_API_ID_GETWAKEUPRXSTATUS (optional) 
0x2D 
FR_API_ID_CANCELTXLPDU (optional) 
0x2E 
FR_API_ID_READCCCONFIG 
0x30 
FR_API_ID_REQUEST_BUFFER_DBA (optional) 
0x31 
FR_API_ID_TRANSMIT_TX_LPDU_DBA (optional) 
0x32 
FR_API_ID_RECEIVE_RX_LPDU_DBA (optional) 
0x33 
FR_API_ID_UNLOCK_RX_LPDU_DBA (optional) 
0x34 
FR_API_ID_LOCK_FTU (optional) 
0x35 
FR_API_ID_UNLOCK_FTU (optional) 
0x36 
FR_API_ID_TRANSMIT_TX_LPDU_IMMEDIATE_DBA (optional) 
Table 3-4   Mapping of service IDs to services 
The errors reported to DET are described in the following table: 
Error Code 
Description 
0x01 
FR_E_INV_TIMER_IDX 
parameter timer index exceeds number of available 
timers 
0x02 
FR_E_INV_POINTER 
invalid pointer in parameter list 
0x03 
FR_E_INV_OFFSET 
parameter offset exceeds bounds 
0x04 
FR_E_INV_CTRL_IDX 
invalid controller index 
0x05 
FR_E_INV_CHNL_IDX 
invalid channel index 
0x06 
FR_E_INV_CYCLE 
parameter cycle exceeds 63 
0x08 
FR_E_NOT_INITIALIZED 
Fr module was not initialized 
0x09 
FR_E_INV_POCSTATE 
Fr CC is not in the expected POC state. 
0x0A 
FR_E_INV_LENGTH 
Payload length parameter has an invalid value. 
0x0B 
FR_E_INV_LPDU_IDX 
invalid LPdu index 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
17 
based on template version 6.0.1 



Technical Reference MICROSAR FR 
Error Code 
Description 
0x0C 
FR_E_INV_HEADERCRC 
Invalid header CRC 
0x0D 
FR_E_INV_CONFIG_IDX 
Invalid value passed as parameter Fr_ConfigParamIdx. 
0x40 
FR_E_INV_LISTSIZE 
Invalid Listsize in function Fr_GetSyncFrameList 
Table 3-5   Errors reported to DET 
3.7.1.1 
Parameter Checking 
The following table shows which parameter checks are performed on which services: 
 
Info 
Note that the FR_E_INV_CTRL_IDX error is only reported to DET by the FlexRay 
  driver if the “Single Channel API” feature is disabled. Refer to section 3.11 how to 
disable the “Single Channel API” feature. 
 
 
Check 
 
 
 
 
 
  
C
D
 
 
 
R
 
 
 
 
X
X
C
 
TE
 
 
R
_IDX

ZE
DI
DI
 
R
LIZE
A
TE
E
I
E
A
T
TH
_IDX
 
R
I
E
N
L_
L_
LE
D
FIG
S
I
TS
N
C
A
N
TI
C
G
U
N
D
 
MI
O
SI
TR
H
Y
E
O
NI
O
E
P
Service 
_T
_P
_OFFS
_L
_C
_C
_C
_H
_C
T_
_P
_L
_L
O
_INV
_INV
_INV
_INV
_INV
_INV
_INV
_INV
_INV
_N
_INV
_INV
_INV
_E
_E
_E
_E
_E
_E
_E
_E
_E
_E
_E
_E
_E
FR
FR
FR
FR
FR
FR
FR
FR
FR
FR
FR
FR
FR
Fr_InitMemory 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fr_Init 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fr_ControllerInit 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fr_AllSlots 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fr_StartCommunication 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fr_AllowColdstart 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fr_HaltCommunication 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fr_AbortCommunication 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fr_SendWUP 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fr_SetWakeupChannel 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fr_GetPOCStatus 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fr_GetNumOfStartupFrames 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fr_GetWakeupRxStatus 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fr_RequestBuffer_DBA 
 
 
 
 
 
 
 
 
 
 
 
 
 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
18 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
Check 
 
 
 
 
 
  
C
D
 
 
 
R
 
 
 
 
X
X
C
 
TE
 
 
R
_IDX

ZE
DI
DI
 
R
LIZE
A
TE
E
I
E
A
T
TH
_IDX
 
R
I
E
N
L_
L_
LE
D
FIG
S
I
TS
N
C
A
N
TI
C
G
U
N
D
 
MI
O
SI
TR
H
Y
E
O
NI
O
E
P
Service 
_T
_P
_OFFS
_L
_C
_C
_C
_H
_C
T_
_P
_L
_L
O
_INV
_INV
_INV
_INV
_INV
_INV
_INV
_INV
_INV
_N
_INV
_INV
_INV
_E
_E
_E
_E
_E
_E
_E
_E
_E
_E
_E
_E
_E
FR
FR
FR
FR
FR
FR
FR
FR
FR
FR
FR
FR
FR
Fr_TransmitTxLPdu_DBA 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fr_ReceiveRxLPdu 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fr_ReceiveRxLPdu_DBA 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fr_TransmitTxLPdu_ImmediateDBA 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fr_TransmitTxLPdu 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fr_UnlockRxLPdu_DBA 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fr_CheckTxLPduStatus 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fr_GetSyncFrameList 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fr_DisableLPdu 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fr_ReconfigLPdu 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fr_PrepareLPdu 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fr_GetGlobalTime 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fr_NmVectorPtr 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fr_GetVersionInfo 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fr_GetClockCorrection 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fr_GetChannelStatus 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fr_ReadCCConfig 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fr_SetAbsoluteTimer 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fr_CancelAbsoluteTimer 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fr_EnableAbsoluteTimerIRQ 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fr_AckAbsoluteTimerIRQ 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fr_DisableAbsoluteTimerIRQ 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fr_GetAbsoluteTimerIRQStatus 
 
 
 
 
 
 
 
 
 
 
 
 
 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
19 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
 
 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
20 
based on template version 6.0.1 




Technical Reference MICROSAR FR 
 
3.7.2 
Production Code Error Reporting 
By  default,  production  code  related  errors  are  reported  to  the  DEM  using  the  service 
Dem_ReportErrorStatus() as specified in [6], if production error reporting is enabled 
(i.e. GenTool switch ‘Prod Error Detect’ is set). 
If  another  module  is  used  for  production  code  error  reporting,  the  function  prototype  for 
reporting the error can be configured by the integrator, but must have the same signature 
as the service Dem_ReportErrorStatus(). 
The errors reported to DEM are described in the following table: 
Error Code 
Description 
FrDemCtrlTestResultRef 
Access to FlexRay CC event ID 
Table 3-6   Errors reported to DEM 
3.8 
Buffer Reconfiguration  
The  FlexRay  Communication  Controllers  (CC)  that  are  currently  available,  only  offer  a 
limited  amount  of  message  buffers. A  FlexRay  Schedule  with  a  large  number  of  frames 
might exceed the number of available message buffers. 
The buffer reconfiguration feature reduces the amount of hardware message buffers that 
are  used  by  the  FR.  This  is  done  by  changing  the  message  buffer  configuration  during 
runtime.  
The  buffer  reconfiguration  can  be  enabled  with  the  GenTool  option  “Enable  Buffer 
Reconfiguration” (MICROSAR PARAMETER DEFINITION: 'FrEnableBufferReconfig'). 
 
Caution 
When a frame f1 cannot be transmitted because it has been preempted by other 
  frames (i.e. latestTx has been exceeded) and another frame f2 shall be transmitted in 
the next cycle using the same message buffer, the message buffer will be reconfigured. 
Hence f1 will not be transmitted. 
 
 
Info 
The reconfiguration of the message buffer is done at the runtime. Note that this feature 
  uses more processor resources.  
 
3.9 
Reconfig LPdu Support 
The  Autosar  4.0  feature  “Reconfig  LPdu  Support”  (MICROSAR  PARAMETER 
DEFINITION: 'FrReconfigLPduSupport') allows to reconfigure LPDUs at runtime. However, 
there can be some restrictions based on hardware properties.  
1)  It is not allowed to reconfigure a buffer with larger payload as it was configured at 
startup of ECU.  
© 2017 Vector Informatik GmbH 
Version 1.04.00 
21 
based on template version 6.0.1 




Technical Reference MICROSAR FR 
2)  It  is  not  allowed  to  reconfigure  FIFO  buffers  or  to  configure  a  buffer  into  a  FIFO 
range. 
3)  Depending on hardware and cluster It is not allowed to configure the sync frame 
 
The reconfigurable LPDUs are disabled by default in Fr_ControllerInit. Disable means that 
LPDUs  were  not  transmitted  nor  received. This  is  done  to  avoid  collisions  as  more  than 
one ECU can use the same LPDU for transmission.  To avoid reception of LPDUs without 
explicit knowledge of the transmitter, receive LPDu are also disabled at initialization of CC. 
The LPDUs have to be manually enabled by API “Fr_ReconfigLPdu” (see 5.3.21) 
3.10  Dynamic Payload 
The  payload  of  frames  that  was  selected  as  “dynamic  payload”  within  FrIf  module  is 
change by the FR at the runtime (refer to [10] for how to set “dynamic payload”). The FR 
updates the buffer configuration with the new payload and new calculated header CRC at 
runtime.  
 
Caution 
The values of the new payload shall be smaller or equal as the payload value that was 
  define within FIBEX or EcuC.  
 
 
Info 
The calculation of the header CRC is done at the runtime. Note that this feature uses 
  more processor resources 
 
3.11  Single Channel API 
According to the FlexRay controller driver software specification every FlexRay controller 
driver service contains a controller or timer handle. 
If only one FlexRay controller driver instance is used this handle is not necessary, except 
for development error detection. Therefore, if only one FlexRay controller driver instance is 
used, the handle can be removed by a macro. These macros still expect channel handles, 
which remain unused. 
The  described  prototypes  in  chapter  5  are  written  similar  to  the  functions  in  the 
corresponding C file. In the C-File the macro FR_VCTRL_SYSTEMTYPE_ONLY is used for 
the single channel API feature. In the H- file the same function has the prototype with the 
macro FR_VCTRL_SYSTEMTYPE_FIRST.  
If the feature ‘Single Channel API’ is not used, the macros are replaced with the Autosar 
prototype ‘uint8 Fr_CtrlIdx’. 
If the feature ‘Single Channel API’ is used, the two macros are left empty and the code is 
smaller and faster in this module and also in the modules uses the Fr. 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
22 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
3.12  Direct Buffer Access 
Without  direct  buffer  access,  received  and  transmitted  FlexRay  data  are  copied  from  Fr 
driver into RAM where CC reads data from or writes data to. 
Some  CC  provides  the  possibility  that  FlexRay  data  is  located  in  host  RAM  and  can  be 
accessed directly from application. To save execution time, the goal of direct buffer access 
is to save the copy of  Fr-data from RAM to RAM in  Fr driver and provide the possibility, 
that upper layers copy their data directly to RAM where CC reads/writes from. 
Depending on CC, access to the RAM and additional necessary functionality (like locking 
of RAM) are described in [8]. 
 
3.13  Hardware Loop with Cancellation 
The  FlexRay  driver  sends  commands  which  sometimes  require  confirmation  to  go  on.  It 
will enter a waiting loop (i.e. hardware loop). To avoid an infinite waiting time (e.g. caused 
by hardware defects), only a limited amount of loops will be performed. That means that 
after  expiration  of  a  configurable  time  the  loop  will  be  breaked.  The  actual  executed 
function then exits with a DEM notification. 
For the determination of an adequate timeout value refer to [8]. 
3.14  FIFO reception 
FIFO is used to define Slot ID ranges for receive frames. All Slot ID within the Slot ID 
range are received from driver. That can be used to received frames with the same use-
case e.g. network management frames. The driver supports more than one FIFO 
configuration set. 
  
 
Please ensure that your configuration meets the following requirements: 
 
  the FIFO needs at least one Rx frame triggering within the range 
  one FIFO range supports either channel A or channel B. It is not possible to configure 
a FIFO range for both channels 
  All frames within a FIFO range must have the same frame type (i.e. only NM frames or 
only TP frames) 
  the FIFO ranges that are defined for one channel must not overlap 
  payload length of the frames that are received by FIFO must be identical 
  FIFO depth must not be greater than 255, i.e. RangeMax - RangeMin must not be 
greater than 254 
 
 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
23 
based on template version 6.0.1 



Technical Reference MICROSAR FR 
3.15  Reading out the Flexray parameters (Read CC Parameters) 
With activation of this feature the FlexRay low level parameters (see [2] for coverage) can 
be read and verified at runtime. The FlexRay driver offers an API Fr_ReadCCConfig() to 
read the FlexRay low level parameters. Refer to [2] for detail description.    
 
The following parameters are intended to be used in FlexRay Protocol 3.0 and will return 0 
for FlexRay Protocol 2.1 Rev A compliance: 
  PSecondKeySlotId 
  GCycleCountMax 
  GdSymbolWindowActionPointOffset 
  GdIgnoreAfterTx 
  PExternalSync 
  PFallBackInternal 
  PKeySlotOnlyEnabled 
  PNmVectorEarlyUpdate 
  PTwoKeySlotMode 
 
 
 
Caution 
The value of parameter GdBit is returned as an enumeration value instead numerical 
  value as defined in [2]. The reason for this behaviour is the still open Issue 49741 at 
please refer to [16]. The enumeration values correlation: 0T100NS; 1T200NS; 
2T400NS. 
 
 
 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
24 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
4  Integration 
This chapter gives necessary information for the integration of the MICROSAR FR into an 
application environment of an ECU. 
4.1 
Scope of Delivery 
The  delivery  of  the  FR  contains  the  files  which  are  described  in  the  chapters  4.1.1  and 
4.1.2: 
4.1.1 
Static Files 
File Name 
Description 
Fr.c 
Main Module contains the main driver functionality 
Fr.h 
AUTOSAR driver API 
Fr_Timer.c 
Timer handling contains timer related functionality 
Fr_Irq.c 
References of the Interrupt service routínes 
Fr_Ext.h 
Driver callback functions, additional function driver API 
Fr_Priv.h 
Macros  
Fr_<CC>.h 
Macros and Defines for CC 
Fr_GeneralTypes.h  Datatype definitions according to AUTOSAR 
Table 4-1   Static files 
 
4.1.2 
Dynamic Files 
The dynamic files are generated by the GenTool Cfg5 
File Name 
Description 
Fr_Cfg.h 
General configuration data 
Fr_Lcfg.c 
Linker configuration data 
Fr_PBcfg.c 
Postbuild configuration data 
Table 4-2   Generated files 
 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
25 
based on template version 6.0.1 



Technical Reference MICROSAR FR 
4.2 
Include Structure 
 
obj ect Header File Structure
Fr.c
MemMap.h
Fr_ext.h
Std_Types.h
Fr_GeneralTypes.h
SchM_Fr.h
Fr_priv .h
Fr.h
«include»
Platform_Types.h
Fr_<CC>.h
Fr_cfg.h
dem.h
Det.h
 
Figure 4-1  Include structure 
4.3 
Compiler Abstraction and Memory Mapping  
The  objects  (e.g.  variables,  functions,  constants)  are  declared  by  compiler  independent 
definitions  –  the  compiler  abstraction  definitions.  Each  compiler  abstraction  definition  is 
assigned to a memory section. 
For a detailed table please refer to [8]. 
4.4 
Interrupt Handling 
The  interrupts  are  to  be  enabled  by  OS  or  the  application.  The  following  interrupts  are 
supported by Fr: 
  Timer0 (Absolute-Timer) Interrupt (must be enabled if FrIf is used), 
  Cyclestart Interrupt (depending on configuration). 
 
Caution 
The Timer0 (Absolute-Timer) Interrupt is mandatory for the FlexRay functionality if FrIf 
  is used.  
 
Depending  on  the  used  CC  module  the  interrupt  service  routines  have  specific  names. 
Their implementation is provided by Fr_Irq.c. 
The Fr provides optional callout functions triggered by Timer1- resp. Cyclestart Interrupt. At 
usage  they  may  be  implemented  by  the  application.  Prototypes  of  these  functions  are 
defined in Fr_Ext.h. Please refer to chapter “API Description” for more details. 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
26 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
4.5 
Critical Sections  
Special attention is given to critical code sections, that must not be interrupted. For details 
see [8]. 
 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
27 
based on template version 6.0.1 




Technical Reference MICROSAR FR 
5  API Description 
5.1 
Type Definitions 
The  software  module  FlexRay  Driver  uses  the  standard  AUTOSAR  data  types  that  are 
defined  within  Std_Types.h  and  the  platform  specific  data  types  that  are  defined  within 
Platform_Types.h. 
If  the  FlexRay  Driver  Interface  is  used  the  Communication  Stack  Types  defined  within 
ComStack_Types.h are used too. 
For specific type definitions please refer to [8]. 
5.2 
Interrupt Service Routines provided by FR  
The GenTool option “Type of interrupt function” has to be adapted accordingly to the usage 
of the FlexRay driver interrupt services. If OS is used, the interrupts are of type “Category 
2”. CC specific interrupt routine names have to be entered in OS configurator.  
Otherwise on usage of “void func(void)” the addresses of the interrupt routines have to be 
entered in interrupt table or interrupt dispatcher. For details please refer to [8]. 
Category 1 interrupts are not allowed.  
For a detailed description of Interrupt types please refer to see [15]. 
 
Caution 
If “void func(void)” is used, secure that the interrupt function is not executed within a 
  category 1 interrupt. Further it is possible to call a “void func(void)” within a user task 
(not recommended) or an interrupt of type category 2. 
 
Caution 
The implementation is hardware specific. For details please refer to [8]. 
 
 
 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
28 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
5.3 
Services provided by FR 
The FR API consists of services, which are realized by function calls. 
5.3.1 
Fr_InitMemory 
Prototype 
FUNC(void, FR_CODE) Fr_InitMemory (void); 
Parameter 


Return code 


Functional Description 
This method initializes the global variables of the module. It shall be called first of all services. 
Particularities and Limitations 
 Particularities, limitations, post-conditions, pre-conditions 
Expected Caller Context 
 Asynchronous 
Table 5-1   Fr_InitMemory 
5.3.2 
Fr_Init 
Prototype 
FUNC( void, FR_CODE) Fr_Init
  P2CONST(Fr_ConfigType, AUTOMATIC, FR_PBCFG) Fr_ConfigPtr); 
Parameter 
Fr_ConfigPtr 
Pointer to post-build configuration. If Variant 1 (Pre-compile Configuration) is 
used, the parameter is ignored and a Null pointer can be passed. 
Return code 

 
Functional Description 
This method initializes the access to the Post Build Configuration. A pointer to the configuration gets 
passed in and is stored. This API must be called when the FlexRay Stack gets started or if a new 
configuration gets flashed 
Particularities and Limitations 
 Particularities, limitations, post-conditions, pre-conditions  
Fr_InitMemory is already executed.  
Expected Caller Context 
 Asynchronous 
Table 5-2   Fr_Init 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
29 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
5.3.3 
Fr_ControllerInit 
Prototype 
FUNC(Std_ReturnType, FR_CODE) Fr_ControllerInit ( 
  FR_VCTRL_SYSTEMTYPE_ONLY); 
Parameter 
FR_VCTRL_SYSTEMTYP Depending on preconfiguration parameter ‘DrvFrBaseApiOptimization’ this 
E_ONLY 
macro is either empty or contains the value for uint8 Fr_CtrlIdx. Fr_CtrlIdx is a 
zero based index identifies the CC controller for which the API call has to be 
applied. 
Return code 
Std_ReturnType 
E_OK: API call finished successfully.  
E_NOT_OK: API call aborted due to errors. 
Functional Description 
This method configures the Communication Controller (CC). Initially, the CC will be set into Config State. 
The internal RAM gets cleared and configured with the content of the Post Build Configuration into the CC 
register and the frame buffers. Finally the CC is put into Cold Start State preparing the start of FlexRay 
communication. 
 
Particularities and Limitations 
 Particularities, limitations, post-conditions, pre-conditions  
It is required that a valid configuration is set using function ‘Fr_Init’. 
Expected Caller Context 
 Asynchronous 
Table 5-3   Fr_ControllerInit 
5.3.4 
Fr_AllSlots 
Prototype 
FUNC(Std_ReturnType, FR_CODE) Fr_AllSlots ( 
  FR_VCTRL_SYSTEMTYPE_ONLY) 
Parameter 
FR_VCTRL_SYSTEMTYP Depending on preconfiguration parameter ‘DrvFrBaseApiOptimization’ this 
E_ONLY 
macro is either empty or contains the value for uint8 Fr_CtrlIdx. Fr_CtrlIdx is a 
zero based index identifies the CC controller for which the API call has to be 
applied. 
Return code 
Std_ReturnType 
E_OK: API call finished successfully.  
E_NOT_OK: API call aborted due to errors. 
Functional Description 
Invokes the CC CHI command 'ALL_SLOTS'. 
Particularities and Limitations 
 Particularities, limitations, post-conditions, pre-conditions 
The method is only available with enabled GenTool FrIf option “All Slots Support”. It is required 
that Fr_Init() is called before. 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
30 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
Expected Caller Context 
 Asynchronous 
Table 5-4   Fr_AllSlots 
5.3.5 
Fr_StartCommunication 
Prototype 
FUNC(Std_ReturnType, FR_CODE) Fr_StartCommunication ( 
  FR_VCTRL_SYSTEMTYPE_ONLY) 
Parameter 
FR_VCTRL_SYSTEMTYP Depending on preconfiguration parameter ‘DrvFrBaseApiOptimization’ this 
E_ONLY 
macro is either empty or contains the value for uint8 Fr_CtrlIdx. Fr_CtrlIdx is a 
zero based index identifies the CC controller for which the API call has to be 
applied. 
Return code 
Std_ReturnType 
E_OK: API call finished successfully.  
E_NOT_OK: API call aborted due to errors. 
Functional Description 
This method starts the FlexRay communication. The POC state changes from FR_POCSTATE_READY 
state into FR_POCSTATE_STARTUP state 
Particularities and Limitations 
 Particularities, limitations, post-conditions, pre-conditions 
It is required that the Controller is in Ready state by previous call of Fr_ControllerInit. 
Expected Caller Context 
 Asynchronous 
Table 5-5   Fr_StartCommunication 
5.3.6 
Fr_HaltCommunication 
Prototype 
FUNC(Std_ReturnType, FR_CODE) Fr_HaltCommunication ( 
  FR_VCTRL_SYSTEMTYPE_ONLY) 
Parameter 
FR_VCTRL_SYSTEMTYP Depending on preconfiguration parameter ‘DrvFrBaseApiOptimization’ this 
E_ONLY 
macro is either empty or contains the value for uint8 Fr_CtrlIdx. Fr_CtrlIdx is a 
zero based index identifies the CC controller for which the API call has to be 
applied. 
Return code 
Std_ReturnType 
E_OK: API call finished successfully.  
E_NOT_OK: API call aborted due to errors. 
Functional Description 
This method halts the specified Communication Controller at the end of the current communication cycle. 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
31 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
Particularities and Limitations 
 Particularities, limitations, post-conditions, pre-conditions  
The physical layer is in sync with the network. 
Expected Caller Context 
 Asynchronous 
Table 5-6   Fr_HaltCommunication 
5.3.7 
Fr_AbortCommunication 
Prototype 
FUNC(Std_ReturnType, FR_CODE) Fr_AbortCommunication ( 
  FR_VCTRL_SYSTEMTYPE_ONLY) 
Parameter 
FR_VCTRL_SYSTEMTYP Depending on preconfiguration parameter ‘DrvFrBaseApiOptimization’ this 
E_ONLY 
macro is either empty or contains the value for uint8 Fr_CtrlIdx. Fr_CtrlIdx is a 
zero based index identifies the CC controller for which the API call has to be 
applied. 
Return code 
Std_ReturnType 
E_OK: API call finished successfully.  
E_NOT_OK: API call aborted due to errors. 
Functional Description 
This method halts the specified Communication Controller independent of its current state 
Particularities and Limitations 
 Particularities, limitations, post-conditions, pre-conditions 
This API can be removed from code depending on the GenTool configuration. 
Expected Caller Context 
 Asynchronous 
Table 5-7   Fr_AbortCommunication 
5.3.8 
Fr_AllowColdstart 
Prototype 
FUNC(Std_ReturnType, FR_CODE) Fr_AllowColdstart ( 
  FR_VCTRL_SYSTEMTYPE_ONLY) 
Parameter 
FR_VCTRL_SYSTEMTYP Depending on preconfiguration parameter ‘DrvFrBaseApiOptimization’ this 
E_ONLY 
macro is either empty or contains the value for uint8 Fr_CtrlIdx. Fr_CtrlIdx is a 
zero based index identifies the CC controller for which the API call has to be 
applied. 
Return code 
Std_ReturnType 
E_OK: API call finished successfully.  
E_NOT_OK: API call aborted due to errors. 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
32 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
Functional Description 
This method invokes the CC CHI command ‘ALLOW_COLDSTART’ 
Particularities and Limitations 
 Particularities, limitations, post-conditions, pre-conditions  
The CC is in any POCState except POC:default config, POC:config or POC:halt. 
Expected Caller Context 
 Asynchronous 
Table 5-8 
Fr_AllowColdstart 
5.3.9 
Fr_SendWUP 
Prototype 
FUNC(Std_ReturnType, FR_CODE) Fr_SendWUP ( 
  FR_VCTRL_SYSTEMTYPE_ONLY) 
Parameter 
FR_VCTRL_SYSTEMTYP Depending on preconfiguration parameter ‘DrvFrBaseApiOptimization’ this 
E_ONLY 
macro is either empty or contains the value for uint8 Fr_CtrlIdx. Fr_CtrlIdx is a 
zero based index identifies the CC controller for which the API call has to be 
applied. 
Return code 
Std_ReturnType 
E_OK: API call finished successfully.  
E_NOT_OK: API call aborted due to errors. 
Functional Description 
This method sends the Wakeup pattern. 
Particularities and Limitations 
 Particularities, limitations, post-conditions, pre-conditions  
It is required that the Controller is in Ready state by previous call of Fr_ControllerInit. 
Expected Caller Context 
 Asynchronous 
Table 5-9   Fr_SendWUP 
5.3.10  Fr_SetWakeupChannel 
Prototype 
FUNC(Std_ReturnType, FR_CODE) Fr_SetWakeupChannel ( 
  FR_VCTRL_SYSTEMTYPE_ONLY,  
  Fr_ChannelType Fr_ChnlIdx) 
Parameter 
FR_VCTRL_SYSTEMTYP Depending on preconfiguration parameter ‘DrvFrBaseApiOptimization’ this 
E_ONLY 
macro is either empty or contains the value for uint8 Fr_CtrlIdx. Fr_CtrlIdx is a 
zero based index identifies the CC controller for which the API call has to be 
applied. 
Fr_ChnlIdx 
Index of the FlexRay channel 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
33 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
Return code 
Std_ReturnType 
E_OK: API call finished successfully.  
E_NOT_OK: API call aborted due to errors. 
Functional Description 
This method activates the given channel for sending the Wakeup pattern. The Wakeup pattern can not be 
sent on both Channels simultaneous. Trying issues a DET error. 
Particularities and Limitations 
 Particularities, limitations, post-conditions, pre-conditions  
It is required that the Controller is in Ready state. 
This API can be removed from code depending on the GenTool configuration. 
Expected Caller Context 
 Asynchronous 
Table 5-10   Fr_SetWakeupChannel 
5.3.11  Fr_GetPOCStatus 
Prototype 
FUNC(Std_ReturnType, FR_CODE) Fr_GetPOCStatus
  FR_VCTRL_SYSTEMTYPE_ONLY, 
  P2VAR(Fr_POCStatusType, AUTOMATIC, FR_APPL_DATA) Fr_POCStatusPtr) 
Parameter 
FR_VCTRL_SYSTEMTYP Depending on preconfiguration parameter ‘DrvFrBaseApiOptimization’ this 
E_ONLY 
macro is either empty or contains the value for uint8 Fr_CtrlIdx. Fr_CtrlIdx is a 
zero based index identifies the CC controller for which the API call has to be 
applied. 
Fr_POCStatusPtr 
Current POC status information 
Return code 
Std_ReturnType 
E_OK: API call finished successfully.  
E_NOT_OK: API call aborted due to errors. 
Functional Description 
This method gives back the POC status 
Particularities and Limitations 
 Particularities, limitations, post-conditions, pre-conditions 
Expected Caller Context 
 Synchronous 
Table 5-11   Fr_GetPOCStatus 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
34 
based on template version 6.0.1 



Technical Reference MICROSAR FR 
5.3.12  Fr_TransmitTxLPdu 
Prototype 
FUNC(Std_ReturnType, FR_CODE) Fr_TransmitTxLPdu
  FR_VCTRL_SYSTEMTYPE_ONLY, 
  uint16 Fr_LPduIdx, 
  P2CONST(uint8, AUTOMATIC, FR_APPL_DATA) Fr_LPduPtr, 
  uint8 Fr_LPduLength) 
Parameter 
FR_VCTRL_SYSTEMTYP Depending on preconfiguration parameter ‘DrvFrBaseApiOptimization’ this 
E_ONLY 
macro is either empty or contains the value for uint8 Fr_CtrlIdx. Fr_CtrlIdx is a 
zero based index identifies the CC controller for which the API call has to be 
applied. 
Fr_LPduIdx 
This index is used to uniquely identify a FlexRay frame 
Fr_LPduPtr 
This reference points to a buffer where the assembled LSdu to be transmitted 
within this LPdu is stored at. 
Fr_LPduLength 
Determines the length of the data (in Bytes) to be transmitted. The value is not 
modified by this method 
Return code 
Std_ReturnType 
E_OK: API call finished successfully.  
E_NOT_OK: API call aborted due to errors. 
Functional Description 
This method sends a frame on the bus thus the bus must be initialized. The method figures out the physical 
buffer where the LPdu should be copied to. The method copies the data to that physical buffer and 
activates it for transmission. 
This method reconfigures the message buffer in case dynamic payload or buffer reconfigure is enabled.  
Particularities and Limitations 
 Particularities, limitations, post-conditions, pre-conditions  
It is required that the physical layer is in sync with the network. 
Expected Caller Context 
 Synchronous 
Table 5-12   Fr_TransmitTxLPdu 
 
Caution 
The method does not check whether the “old” data is successfully send in the last 
  configured frame. The message buffer is always overwrite with the new requested data 
rather frame in case enabled buffer reconfigure. 
 
 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
35 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
5.3.13  Fr_ReceiveRxLPdu 
Prototype 
FUNC(Std_ReturnType, FR_CODE) Fr_ReceiveRxLPdu
  FR_VCTRL_SYSTEMTYPE_ONLY,  
  uint16 Fr_LPduIdx,   
  P2VAR(uint8, AUTOMATIC, FR_APPL_DATA) Fr_LPduPtr, 
  P2VAR(Fr_RxLPduStatusType, AUTOMATIC, FR_APPL_DATA) Fr_LPduStatusPtr, 
  P2VAR(uint8, AUTOMATIC, FR_APPL_DATA) Fr_LPduLengthPtr) 
Parameter 
FR_VCTRL_SYSTEMTYP Depending on preconfiguration parameter ‘DrvFrBaseApiOptimization’ this 
E_ONLY 
macro is either empty or contains the value for uint8 Fr_CtrlIdx. Fr_CtrlIdx is a 
zero based index identifies the CC controller for which the API call has to be 
applied. 
Fr_LPduIdx 
This index is used to uniquely identify a FlexRay frame. 
Fr_LPduPtr 
This reference points to the buffer where the LPdu to be received shall be 
stored. 
Fr_LPduStatusPtr 
This reference points to the memory location where the status of the LPdu 
shall be stored. 
Fr_LPduLengthPtr 
This reference points to the memory location where the length of the LPdu (in 
bytes) shall be stored. 
Return code 
Std_ReturnType 
E_OK: API call finished successfully.  
 
E_NOT_OK: API call aborted due to errors. 
Functional Description 
This method figures out if a new FlexRay frame identified by Fr_LPduIdx was received. It copies the 
payload to data of Fr_LPduPtr. The length parameter specifies the length in bytes whereas FlexRay is 
using 2-byte lengths. 
The method returns “FR_RECEIVED_MORE_DATA_AVAILABLE” at the “Fr_LPduStatusPtr”  in case the 
requested frame is placed within a FIFO range and the FIFO is not empty. 
 
Particularities and Limitations 
 Particularities, limitations, post-conditions, pre-conditions 
Expected Caller Context 
 Synchronous 
Table 5-13   Fr_ReceiveRxLPdu 
5.3.14  Fr_CancelTxLPdu 
Prototype 
FUNC(Std_ReturnType, FR_CODE) Fr_CancelTxLPdu
  FR_VCTRL_SYSTEMTYPE_ONLY, 
  uint16 Fr_LPduIdx) 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
36 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
Parameter 
FR_VCTRL_SYSTEMTYP Depending on preconfiguration parameter ‘Single Channel API’ this macro is 
E_ONLY 
either empty or contains the value for uint8 Fr_CtrlIdx. Fr_CtrlIdx is a zero 
based index identifies the CC controller for which the API call has to be 
applied. 
Fr_LPduIdx 
This index is used to uniquely identify a FlexRay frame 
Return code 
Std_ReturnType 
E_OK: API call finished successfully.  
 
E_NOT_OK: API call aborted due to errors. 
Functional Description 
Cancels the already pending transmission of a LPdu contained in a controllers physical transmit resource 
(e.g. message buffer). 
Particularities and Limitations 
>  Particularities, limitations, post-conditions, pre-conditions 
The method is only available with enabled GenTool FrIf option “Cancel Transmit Support”. It 
is required that Fr_Init() is called before. 
Expected Caller Context 
 Synchronous 
Table 5-14   Fr_CancelTxLPdu 
5.3.15  Fr_CheckTxLPduStatus 
Prototype 
FUNC(Std_ReturnType, FR_CODE) Fr_CheckTxLPduStatus
  FR_VCTRL_SYSTEMTYPE_ONLY, 
  uint16 Fr_LPduIdx, 
  P2VAR(Fr_TxLPduStatusType, AUTOMATIC, FR_APPL_DATA) Fr_LPduStatusPtr) 
Parameter 
FR_VCTRL_SYSTEMTYP Depending on preconfiguration parameter ‘Single Channel API’ this macro is 
E_ONLY 
either empty or contains the value for uint8 Fr_CtrlIdx. Fr_CtrlIdx is a zero 
based index identifies the CC controller for which the API call has to be 
applied. 
Fr_LPduIdx 
This index is used to uniquely identify a FlexRay frame 
Fr_LPduStatusPtr 
This reference is used to store the transmit status of the LSdu 
Return code 
Std_ReturnType 
E_OK: API call finished successfully.  
 
E_NOT_OK: API call aborted due to errors. 
Functional Description 
This method checks if previous send request succeeded.  
In addition this method checks the configuration of the message buffer in case buffer reconfiguration is 
enabled. The method returns E_NOT_OK and FR_NOT_TRANSMITTED in case the message buffer is 
already used for other frame.  
Particularities and Limitations 
 - 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
37 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
Expected Caller Context 
 Synchronous 
Table 5-15   Fr_CheckTxLPduStatus 
5.3.16  Fr_GetGlobalTime 
Prototype 
FUNC(Std_ReturnType, FR_CODE) Fr_GetGlobalTime
  FR_VCTRL_SYSTEMTYPE_ONLY, 
  P2VAR(uint8,  AUTOMATIC, FR_APPL_DATA) Fr_CyclePtr, 
  P2VAR(uint16, AUTOMATIC, FR_APPL_DATA) Fr_MacroTickPtr) 
Parameter 
FR_VCTRL_SYSTEMTYP Depending on preconfiguration parameter ‘DrvFrBaseApiOptimization’ this 
E_ONLY 
macro is either empty or contains the value for uint8 Fr_CtrlIdx. Fr_CtrlIdx is a 
zero based index identifies the CC controller for which the API call has to be 
applied. 
Fr_CyclePtr 
Buffer for current Cycle Counter 
Fr_MacroTickPtr 
Buffer for current Macrotick Counter 
Return code 
Std_ReturnType 
E_OK: API call finished successfully.  
 
E_NOT_OK: API call aborted due to errors. 
Functional Description 
This method returns the current time specified in Cycle Counts and Macroticks if the bus is running (SYNC) 
i.e. Normal Active. 
Particularities and Limitations 
 Particularities, limitations, post-conditions, pre-conditions  
It is required that the physical layer is in sync with the network. 
Expected Caller Context 
 Synchronous 
Table 5-16   Fr_GetGlobalTime 
5.3.17  Fr_GetNmVector 
Prototype 
FUNC(Std_ReturnType, FR_CODE) Fr_GetNmVector
  FR_VCTRL_SYSTEMTYPE_ONLY, 
  P2VAR(uint8, AUTOMATIC, FR_APPL_DATA) Fr_NmVectorPtr) 
Parameter 
FR_VCTRL_SYSTEMTYP Depending on preconfiguration parameter ‘DrvFrBaseApiOptimization’ this 
E_ONLY 
macro is either empty or contains the value for uint8 Fr_CtrlIdx. Fr_CtrlIdx is a 
zero based index identifies the CC controller for which the API call has to be 
applied. 
Fr_NmVectorPtr 
Address where the NmVector of the last communication cycle shall be stored. 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
38 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
Return code 
Std_ReturnType 
E_OK: API call finished successfully.  
 
E_NOT_OK: API call aborted due to errors. 
Functional Description 
Gets the network management vector of the last communication cycle 
Particularities and Limitations 
 Particularities, limitations, post-conditions, pre-conditions 
GenTool option ‘NM Vector Support’ is enabled. It is required that the physical layer is in sync 
with the network. 
Expected Caller Context 
 Synchronous 
Table 5-17   Fr_GetNmVector 
5.3.18  Fr_GetVersionInfo 
Prototype 
FUNC(void, FR_CODE) Fr_GetVersionInfo ( 
  P2VAR(Std_VersionInfoType, AUTOMATIC, FR_APPL_DATA) VersionInfo ) 
Parameter 
VersionInfo 
Pointer to where to store the version information of this module. 
Return code 

 
Functional Description 
This method returns the version info. 
Particularities and Limitations 
 Particularities, limitations, post-conditions, pre-conditions 
GenTool option ‘Version Info Api’ is switched on and ‘Version Info Api As Macro’ is switched off 
Expected Caller Context 
 Synchronous 
Table 5-18   Fr_GetVersionInfo 
5.3.19  Fr_GetSyncFrameList 
Prototype 
FUNC(Std_ReturnType, FR_CODE) Fr_GetSyncFrameList
  FR_VCTRL_SYSTEMTYPE_ONLY, 
  uint8 Fr_ListSize,  
  (uint16, AUTOMATIC, FR_APPL_DATA) Fr_ChannelAEvenListPtr, 
  (uint16, AUTOMATIC, FR_APPL_DATA) Fr_ChannelBEvenListPtr, 
  (uint16, AUTOMATIC, FR_APPL_DATA) Fr_ChannelAOddListPtr,  
  (uint16, AUTOMATIC, FR_APPL_DATA) Fr_ChannelBOddListPtr ) 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
39 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
Parameter 
FR_VCTRL_SYSTEMTYP Depending on preconfiguration parameter ‘DrvFrBaseApiOptimization’ this 
E_ONLY 
macro is either empty or contains the value for uint8 Fr_CtrlIdx. Fr_CtrlIdx is a 
zero based index identifies the CC controller for which the API call has to be 
applied. 
Fr_ListSize 
Size of the parameter arrays 
Fr_ChannelAEvenListPtr 
the list of sync frames on channel A within the even communication cycle 
Fr_ChannelBEvenListPtr 
the list of sync frames on channel B within the even communication cycle 
Fr_ChannelAOddListPtr 
the list of sync frames on channel A within the odd communication cycle 
Fr_ChannelBOddListPtr 
the list of sync frames on channel B within the odd communication cycle 
Return code 
Std_ReturnType 
E_OK: API call finished successfully.  
 
E_NOT_OK: API call aborted due to errors. 
Functional Description 
This method reads the list of sync frames received in the last communication cycle and write it as array to 
the appropriate array. A maximum of 15 for parameter Fr_ListSize is used if Fr_ListSize is greater than 15. 
In this case additionally a DET error (FR_E_INV_LISTSIZE ) is thrown if DET is enabled. 
Particularities and Limitations 
 Particularities, limitations, post-conditions, pre-conditions 
It is required that the physical layer is in sync with the network. 
Expected Caller Context 
 Synchronous 
Table 5-19   Fr_GetSyncFrameList 
5.3.20  Fr_DisableLPdu (optional) 
Prototype 
FUNC(Std_ReturnType, FR_CODE) Fr_DisableLPdu 
  FR_VCTRL_SYSTEMTYPE_ONLY,  
  uint16 Fr_LPduIdx) 
Parameter 
FR_VCTRL_SYSTEMTYP Depending on preconfiguration parameter ‘DrvFrBaseApiOptimization’ this 
E_ONLY 
macro is either empty or contains the value for uint8 Fr_CtrlIdx. Fr_CtrlIdx is a 
zero based index identifies the CC controller for which the API call has to be 
applied. 
Fr_LPduIdx 
This index is used to uniquely identify a FlexRay frame. 
Return code 
Std_ReturnType 
E_OK: API call finished successfully.  
 
E_NOT_OK: API call aborted due to errors. 
Functional Description 
This method configures the corresponding HW-buffer in a way that it does not take part in the FlexRay 
communication. 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
40 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
Particularities and Limitations 
 Particularities, limitations, post-conditions, pre-conditions 
It is required that the physical layer is in sync with the network. 
Expected Caller Context 
 Synchronous 
Table 5-20   Fr_DisableLPdu 
5.3.21  Fr_ReconfigLPdu (optional) 
Prototype 
FUNC(Std_ReturnType, FR_CODE) Fr_ReconfigLPdu 
  FR_VCTRL_SYSTEMTYPE_ONLY,  
  uint16 Fr_LPduIdx,  
  uint16 Fr_FrameId,  
  Fr_ChannelType Fr_ChnlIdx,  
  uint8 Fr_CycleRepetition,  
  uint8 Fr_CycleOffset,  
  uint8 Fr_PayloadLength,  
  uint16 Fr_HeaderCRC ) 
Parameter 
FR_VCTRL_SYSTEMTYP Depending on preconfiguration parameter ‘DrvFrBaseApiOptimization’ this 
E_ONLY 
macro is either empty or contains the value for uint8 Fr_CtrlIdx. Fr_CtrlIdx is a 
zero based index identifies the CC controller for which the API call has to be 
applied. 
Fr_LPduIdx 
This index is used to uniquely identify a FlexRay frame 
Fr_FrameId 
FlexRay Frame ID the FrIf_LPdu shall be configured to 
Fr_ChnlIdx 
FlexRay Channel the FrIf_LPdu shall be configured to. 
Fr_CycleRepetition 
Cycle Repetition part of the cycle filter mechanism FrIf_LPdu shall be 
configured to. 
Fr_CycleOffset 
Cycle Offset part of the cycle filter mechanism FrIf_LPdu shall be configured 
to. 
Fr_PayloadLength 
Payloadlength in units of bytes the FrIf_LPduIdx shall be configured to. 
Fr_HeaderCRC 
Header CRC the FrIf_LPdu shall be configured to. 
Return code 
Std_ReturnType 
E_OK: API call finished successfully.  
 
E_NOT_OK: API call aborted due to errors. 
Functional Description 
This method reconfigures during runtime the corresponding HW buffer according the given parameters. 
If LPDU reconfiguration is enabled for a specific LPDU, this LPDU is not sent after initialization of Fr but 
has to be enabled with this method. 
Particularities and Limitations 
 Particularities, limitations, post-conditions, pre-conditions 
It is required that the physical layer is in sync with the network. 
Expected Caller Context 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
41 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
 Synchronous 
Table 5-21   Fr_ReconfigLPdu 
 
5.3.22  Fr_SetAbsoluteTimer 
Prototype 
FUNC(Std_ReturnType, FR_CODE) Fr_SetAbsoluteTimer ( 
  FR_VCTRL_SYSTEMTYPE_ONLY, 
  uint8 Fr_AbsTimerIdx, 
  uint8 Cycle, uint16 MacrotickOffset) 
Parameter 
FR_VCTRL_SYSTEMTYP Depending on preconfiguration parameter ‘DrvFrBaseApiOptimization’ this 
E_ONLY 
macro is either empty or contains the value for uint8 Fr_CtrlIdx. Fr_CtrlIdx is a 
zero based index identifies the CC controller for which the API call has to be 
applied. 
Fr_AbsTimerIdx 
Index of the Timer 
Cycle 
Cycle in which the timer will fire 
MacrotickOffset 
MacrotickOffset 
Return code 
Std_ReturnType 
E_OK: API call finished successfully.  
 
E_NOT_OK: API call aborted due to errors. 
Functional Description 
This method sets the absolute timer. The time is specified in FlexRay terms i.e. Cycle Counts and 
Macroticks. The timer fires an interrupt after n Macroticks in given Cycle. Hence the maximum duration is 
limited to one complete communication cycle (i.e. 64 Cycles). 
Particularities and Limitations 
 Particularities, limitations, post-conditions, pre-conditions 
It is required that the physical layer is in sync with the network. 
Expected Caller Context 
 Synchronous 
Table 5-22   Fr_SetAbsoluteTimer 
5.3.23  Fr_CancelAbsoluteTimer 
Prototype 
FUNC(Std_ReturnType, FR_CODE) Fr_CancelAbsoluteTimer
  FR_VCTRL_SYSTEMTYPE_ONLY, 
  uint8 Fr_AbsTimerIdx) 
Parameter 
FR_VCTRL_SYSTEMTYP Depending on preconfiguration parameter ‘DrvFrBaseApiOptimization’ this 
E_ONLY 
macro is either empty or contains the value for uint8 Fr_CtrlIdx. Fr_CtrlIdx is a 
zero based index identifies the CC controller for which the API call has to be 
applied. 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
42 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
Fr_AbsTimerIdx 
Index of the Timer 
Return code 
Std_ReturnType 
E_OK: API call finished successfully.  
 
E_NOT_OK: API call aborted due to errors. 
Functional Description 
This method cancels the absolute timer 
Particularities and Limitations 
 Particularities, limitations, post-conditions, pre-conditions 
Expected Caller Context 
 Synchronous 
Table 5-23   Fr_CancelAbsoluteTimer 
5.3.24  Fr_EnableAbsoluteTimerIRQ 
Prototype 
FUNC(Std_ReturnType, FR_CODE) Fr_EnableAbsoluteTimerIRQ
  FR_VCTRL_SYSTEMTYPE_ONLY, 
  uint8 Fr_AbsTimerIdx) 
Parameter 
FR_VCTRL_SYSTEMTYP Depending on preconfiguration parameter ‘DrvFrBaseApiOptimization’ this 
E_ONLY 
macro is either empty or contains the value for uint8 Fr_CtrlIdx. Fr_CtrlIdx is a 
zero based index identifies the CC controller for which the API call has to be 
applied. 
Fr_AbsTimerIdx 
Index of the Timer 
Return code 
Std_ReturnType 
E_OK: API call finished successfully.  
 
E_NOT_OK: API call aborted due to errors. 
Functional Description 
This method enables the absolute timer. 
Particularities and Limitations 
 Particularities, limitations, post-conditions, pre-conditions 
Expected Caller Context 
 Synchronous 
Table 5-24   Fr_EnableAbsoluteTimerIRQ 
5.3.25  Fr_AckAbsoluteTimerIRQ 
Prototype 
FUNC(Std_ReturnType, FR_CODE) Fr_AckAbsoluteTimerIRQ
  FR_VCTRL_SYSTEMTYPE_ONLY, 
  uint8 Fr_AbsTimerIdx) 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
43 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
Parameter 
FR_VCTRL_SYSTEMTYP Depending on preconfiguration parameter ‘DrvFrBaseApiOptimization’ this 
E_ONLY 
macro is either empty or contains the value for uint8 Fr_CtrlIdx. Fr_CtrlIdx is a 
zero based index identifies the CC controller for which the API call has to be 
applied. 
Fr_AbsTimerIdx 
Index of the Timer 
Return code 
Std_ReturnType 
E_OK: API call finished successfully.  
 
E_NOT_OK: API call aborted due to errors. 
Functional Description 
This method acknowledges the absolute timer. 
Particularities and Limitations 
 Particularities, limitations, post-conditions, pre-conditions 
This API can be removed from code depending on the GenTool configuration. 
Expected Caller Context 
 Synchronous 
Table 5-25   Fr_AckAbsoluteTimerIRQ 
5.3.26  Fr_DisableAbsoluteTimerIRQ 
Prototype 
FUNC(Std_ReturnType, FR_CODE) Fr_DisableAbsoluteTimerIRQ
  FR_VCTRL_SYSTEMTYPE_ONLY, 
  uint8 Fr_AbsTimerIdx) 
Parameter 
FR_VCTRL_SYSTEMTYP Depending on preconfiguration parameter ‘DrvFrBaseApiOptimization’ this 
E_ONLY 
macro is either empty or contains the value for uint8 Fr_CtrlIdx. Fr_CtrlIdx is a 
zero based index identifies the CC controller for which the API call has to be 
applied. 
Fr_AbsTimerIdx 
Index of the Timer 
Return code 
Std_ReturnType 
E_OK: API call finished successfully.  
 
E_NOT_OK: API call aborted due to errors. 
Functional Description 
This method disables the absolute timer. 
Particularities and Limitations 
 Particularities, limitations, post-conditions, pre-conditions 
This API can be removed from code depending on the GenTool configuration. 
Expected Caller Context 
 Synchronous 
Table 5-26   Fr_DisableAbsoluteTimerIRQ 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
44 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
5.3.27  Fr_GetAbsoluteTimerIRQStatus 
Prototype 
FUNC(Std_ReturnType, FR_CODE) Fr_GetAbsoluteTimerIRQStatus
  FR_VCTRL_SYSTEMTYPE_ONLY, 
  uint8 Fr_AbsTimerIdx,  
  P2VAR(boolean, AUTOMATIC, FR_APPL_DATA) Fr_IRQStatusPtr) 
Parameter 
FR_VCTRL_SYSTEMTYP Depending on preconfiguration parameter ‘DrvFrBaseApiOptimization’ this 
E_ONLY 
macro is either empty or contains the value for uint8 Fr_CtrlIdx. Fr_CtrlIdx is a 
zero based index identifies the CC controller for which the API call has to be 
applied. 
Fr_AbsTimerIdx 
Index of the Timer 
Fr_IRQStatusPtr 
Result value of the Timer IRQ Status 
Return code 
Std_ReturnType 
E_OK: API call finished successfully.  
 
E_NOT_OK: API call aborted due to errors. 
Functional Description 
Gets IRQ status of the absolute timer 
Particularities and Limitations 
 Particularities, limitations, post-conditions, pre-conditions 
This API can be removed from code depending on the GenTool configuration. 
Expected Caller Context 
 Synchronous 
Table 5-27   Fr_GetAbsoluteTimerIRQStatus 
 
5.3.28  Fr_GetChannelStatus 
Prototype 
FUNC(Std_ReturnType, FR_CODE) Fr_GetChannelStatus ( 
  FR_VCTRL_SYSTEMTYPE_ONLY,  
  P2VAR(uint16, AUTOMATIC, FR_APPL_DATA) Fr_ChannelAStatusPtr, 
  P2VAR(uint16, AUTOMATIC, FR_APPL_DATA) Fr_ChannelBStatusPtr) 
Parameter 
FR_VCTRL_SYSTEMTYP Depending on preconfiguration parameter ‘DrvFrBaseApiOptimization’ this 
E_ONLY 
macro is either empty or contains the value for uint8 Fr_CtrlIdx. Fr_CtrlIdx is a 
zero based index identifies the CC controller for which the API call has to be 
applied. 
Fr_ChannelAStatusPtr 
Address where the bitcoded channel A status information shall be stored. 
Fr_ChannelBStatusPtr 
Address where the bitcoded channel B status information shall be stored. 
Return code 
Std_ReturnType 
E_OK: API call finished successfully.  
 
E_NOT_OK: API call aborted due to errors. 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
45 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
Functional Description 
Returns the current aggregated channel status information. The information is bitcoded as follow: 
Bit 0: Channel A/B aggregated channel status vSS!ValidFrame 
Bit 1: Channel A/B aggregated channel status vSS!SyntaxError 
Bit 2: Channel A/B aggregated channel status vSS!ContentError 
Bit 3: Channel A/B aggregated channel status additional communication 
Bit 4: Channel A/B aggregated channel status vSS!Bviolation 
Bit 5: Channel A/B aggregated channel status vSS!TxConflict (This bit is not supportet at FlexRay 2.1 
hardware) 
Bit 6: Not used (0) 
Bit 7: Not used (0) 
Bit 8: Channel A/B symbol window status data vSS!ValidMTS 
Bit 9: Channel A/B symbol window status data vSS!SyntaxError 
Bit 10: Channel A/B symbol window status data vSS!Bviolation 
Bit 11: Channel A/B symbol window status data vSS!TxConflict 
Bit 12: Channel A/B NIT status data vSS!SyntaxError 
Bit 13: Channel A/B NIT status data vSS!Bviolation 
Bit 14: Not used (0) 
Bit 15: Not used (0) 
The aggregated channel status information is cleared after the read operation.   
Particularities and Limitations 
 Particularities, limitations, post-conditions, pre-conditions 
The method is only available with enabled GenTool option “Get Channel Status Support”. It is 
required that the physical layer is in sync with the network. 
Expected Caller Context 
 Asynchronous 
Table 5-28   Fr_GetChannelStatus 
5.3.29  Fr_GetClockCorrection 
Prototype 
FUNC(Std_ReturnType, FR_CODE) Fr_GetClockCorrection
  FR_VCTRL_SYSTEMTYPE_ONLY,  
  P2VAR(sint16, AUTOMATIC, FR_APPL_DATA) Fr_RateCorrectionPtr,  
  P2VAR(sint32, AUTOMATIC, FR_APPL_DATA) Fr_OffsetCorrectionPtr ) 
Parameter 
FR_VCTRL_SYSTEMTYP Depending on preconfiguration parameter ‘DrvFrBaseApiOptimization’ this 
E_ONLY 
macro is either empty or contains the value for uint8 Fr_CtrlIdx. Fr_CtrlIdx is a 
zero based index identifies the CC controller for which the API call has to be 
applied. 
Fr_RateCorrectionPtr 
Address where the rate correction value shall be stored.  
Fr_OffsetCorrectionPtr 
Address where the offset correction value shall be stored.  
Return code 
Std_ReturnType 
E_OK: API call finished successfully.  
 
E_NOT_OK: API call aborted due to errors. 
Functional Description 
Returns the values of the rate and offset correction. 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
46 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
Particularities and Limitations 
 Particularities, limitations, post-conditions, pre-conditions 
The method is only available in a delivery with extended channel status and enabled GenTool 
option “Get Clock Correction Support”. It is required that the physical layer is in sync with the 
network. 
Expected Caller Context 
 Asynchronous 
Table 5-29  Fr_GetClockCorrection 
5.3.30  Fr_GetWakeupRxStatus 
Prototype 
Std_ReturnType Fr_GetWakeupRxStatus(FR_VCTRL_SYSTEMTYPE_ONLY, uint8* 
Fr_WakeupRxStatusPtr) 
Parameter 
FR_VCTRL_SYSTEMTYPE_ONLY Depending on preconfiguration parameter ‘DrvFrBaseApiOptimization’ 
this macro is either empty or contains the value for uint8 Fr_CtrlIdx. 
Fr_CtrlIdx is a zero based index identifies the CC controller for which 
the API call has to be applied. 
Fr_WakeupRxStatusPtr 
Address where bitcoded wakeup reception status shall be  
stored.  
Bit 0: Wakeup received on channel A indicator  
Bit 1: Wakeup received on channel B indicator  
Bit 2-7: Unused 
Return code 
E_OK 
API call finished successfully. 
E_NOT_OK 
API call aborted due to errors. 
Functional Description 
Gets the wakeup received information from the FlexRay controller. 
Particularities and Limitations 
 Particularities, limitations, post-conditions, pre-conditions 
The method is only available with enabled GenTool FrIf option “Get Wakeup Rx Status 
Support”. It is required that Fr_Init() is called before. 
Expected Caller Context 
 This function can be called in any context. 
Table 5-30   Fr_GetWakeupRxStatus 
 
5.3.31  Fr_GetNumOfStartupFrames 
Prototype 
Std_ReturnType Fr_GetNumOfStartupFrames(FR_VCTRL_SYSTEMTYPE_ONLY, uint8* 
Fr_NumOfStartupFramesPtr) 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
47 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
Parameter 
FR_VCTRL_SYSTEMTYPE_ONLY Depending on preconfiguration parameter ‘DrvFrBaseApiOptimization’ 
this macro is either empty or contains the value for uint8 Fr_CtrlIdx. 
Fr_CtrlIdx is a zero based index identifies the CC controller for which 
the API call has to be applied. 
Fr_NumOfStartupFramesPtr 
Address where the number of startup frames seen within the last 
even/odd cycle pair shall be stored. 
Return code 
E_OK 
API call finished successfully. 
E_NOT_OK 
API call aborted due to errors. 
Functional Description 
Gets the current number of startup frames seen on the cluster. 
Particularities and Limitations 
 Particularities, limitations, post-conditions, pre-conditions 
The method is only available with enabled GenTool FrIf option “Get Num Of Startup Frames 
Support”. It is required that Fr_Init() is called before. 
Expected Caller Context 
 This function can be called in any context. 
Table 5-31   Fr_GetNumOfStartupFrames 
5.3.32  Fr_TransmitTxLPdu_DBA (optional) 
Prototype 
FUNC(Std_ReturnType, FR_CODE) Fr_TransmitTxLPdu_DBA( 
  FR_VCTRL_SYSTEMTYPE_ONLY,  
  uint16 Fr_LPduIdx, 
  uint8 Fr_LPduLength) 
Parameter 
FR_VCTRL_SYSTEMTYP Depending on preconfiguration parameter ‘DrvFrBaseApiOptimization’ this 
E_ONLY 
macro is either empty or contains the value for uint8 Fr_CtrlIdx. Fr_CtrlIdx is a 
zero based index identifies the CC controller for which the API call has to be 
applied. 
Fr_LPduIdx 
This index is used to uniquely identify a FlexRay frame 
Fr_LPduLength 
Determines the length of the data (in Bytes) to be transmitted. The value is not 
modified by this method 
Return code 
Std_ReturnType 
E_OK: API call finished successfully.  
E_NOT_OK: API call aborted due to errors. 
Functional Description 
This method sends a frame on the bus thus the bus must be initialized. The method figures out the physical 
buffer where the LPdu should be copied to. The method does not copy the data to that physical buffer. This 
must be done by other modules. The method activates the prepared buffer for transmission. 
This method reconfigures the message buffer in case dynamic payload or buffer reconfigure is enabled.  
© 2017 Vector Informatik GmbH 
Version 1.04.00 
48 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
Prototype 
Particularities and Limitations 
 It is required that the physical layer is in sync with the network. 
The location of the buffer can be get from method “Fr_RequestBuffer_DBA” 
 The API availability depends on the platform please refer to [8]. 
Expected Caller Context 
 Synchronous 
Table 5-32  Fr_TransmitTxLPdu_DBA 
5.3.33  Fr_TransmitTxLPdu_ImmediateDBA (optional) 
Prototype 
FUNC(Std_ReturnType, FR_CODE) Fr_TransmitTxLPdu_ImmediateDBA ( 
FR_VCTRL_SYSTEMTYPE_ONLY, uint16 Fr_LPduIdx, P2CONST(uint8, AUTOMATIC, 
FR_APPL_DATA) Fr_LPduPtr, uint8 Fr_LPduLength) 
Parameter 
Fr_CtrlIdx 
This zero based index identifies the driver within the context of the Fr to which 
the API call has to be applied. 
Fr_LPduIdx 
This index is used to uniquely identify a FlexRay frame. 
*Fr_LPduPtr 
This reference points to the buffer where the LPdu to be received shall be 
stored. 
Fr_LPduLengthPtr 
This reference points to the memory location where the length of the LPdu (in 
bytes) shall be stored. 
Return code 
Std_ReturnType 
E_OK: API call finished successfully.  
E_NOT_OK: API call aborted due to errors. 
Functional Description 
This method requests a buffer, copies the payload and prepares and configures a buffer to be sent on 
FlexRay bus. 
The function brings FTU in halt mode and disables the interrupts. Afterwards it copies the payload, 
transmits the buffer and set the FTU in normal mode again and enables the interrupts. 
Particularities and Limitations 
 It is required that the physical layer is in sync with the network. 
 The API availability depends on the platform please refer to [8]. 
Expected Caller Context 
 Synchronous 
Table 5-33  Fr_TransmitTxLPdu_ImmediateDBA 
 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
49 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
5.3.34  Fr_RequestBuffer_DBA (optional) 
Prototype 
FUNC(Std_ReturnType, FR_CODE) Fr_RequestBuffer_DBA ( 
  FR_VCTRL_SYSTEMTYPE_ONLY,  
  uint16 Fr_LPduIdx,  
  P2VAR(Fr_LPduPtrType, AUTOMATIC, FR_APPL_DATA) Fr_LPduPtr, 
  uint8 Fr_LPduLength) 
Parameter 
FR_VCTRL_SYSTEMTYP Depending on preconfiguration parameter ‘DrvFrBaseApiOptimization’ this 
E_ONLY 
macro is either empty or contains the value for uint8 Fr_CtrlIdx. Fr_CtrlIdx is a 
zero based index identifies the CC controller for which the API call has to be 
applied. 
Fr_LPduIdx 
This index is used to uniquely identify a FlexRay frame 
Fr_LPduPtr 
This pointer to a reference gives back the pointer of the buffer where the 
assembled LSdu to be transmitted within this LPdu is stored at 
Fr_LPduLength 
Determines the length of the data (in Bytes) to be transmitted. The value is not 
modified by this method 
Return code 
Std_ReturnType 
E_OK: API call finished successfully.  
E_NOT_OK: API call aborted due to errors. 
Functional Description 
This method gives back the pointer to the buffer of the corresponding LPDU The method figures out the 
physical buffer where the LPdu should be copied to. This method should be called before 
Fr_TransmitTxLPdu_DBA to get the message buffer where the data should be written to. 
Particularities and Limitations 
 It is required that the physical layer is in sync with the network.  
 The API availability depends on the platform please refer to [8]. 
Expected Caller Context 
 Synchronous 
Table 5-34  Fr_RequestBuffer_DBA 
5.3.35  Fr_ReceiveRxLPdu_DBA (optional) 
Prototype 
FUNC(Std_ReturnType, FR_CODE) Fr_ReceiveRxLPdu_DBA(  
  FR_VCTRL_SYSTEMTYPE_ONLY, 
  uint16 Fr_LPduIdx, P2VAR(Fr_LPduPtrType, AUTOMATIC, FR_APPL_DATA) 
  Fr_LPduPtr, 
  P2VAR(Fr_RxLPduStatusType, AUTOMATIC, FR_APPL_DATA) Fr_LPduStatusPtr, 
  P2VAR(uint8, AUTOMATIC, FR_APPL_DATA) Fr_LPduLengthPtr) 
Parameter 
FR_VCTRL_SYSTEMTYP Depending on preconfiguration parameter ‘DrvFrBaseApiOptimization’ this 
E_ONLY 
macro is either empty or contains the value for uint8 Fr_CtrlIdx. Fr_CtrlIdx is a 
zero based index identifies the CC controller for which the API call has to be 
applied. 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
50 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
Prototype 
Fr_LPduIdx 
This index is used to uniquely identify a FlexRay frame. 
Fr_LPduPtr 
This pointer to a reference gives back the pointer to the buffer where the LPdu 
to be received is stored. 
Fr_LPduStatusPtr 
This reference points to the memory location where the status of the LPdu 
shall be stored. 
Fr_LPduLengthPtr 
This reference points to the memory location where the length of the LPdu (in 
bytes) shall be stored. 
Return code 
Std_ReturnType 
E_OK: API call finished successfully.  
 
E_NOT_OK: API call aborted due to errors. 
Functional Description 
This method figures out if a new FlexRay frame identified by Fr_LPduIdx was received. It gives back the 
pointer to the data of Fr_LPduPtr. The length parameter specifies the length in bytes whereas FlexRay is 
using 2-byte lengths. The method locks the buffer from unsynchronized access of the CC.  
The method returns “FR_RECEIVED_MORE_DATA_AVAILABLE” at the “Fr_LPduStatusPtr” in case the 
requested frame is placed within a FIFO range and the FIFO is not empty. 
 
Particularities and Limitations 
 It is required that the physical layer is in sync with the network.  
 The method Fr_UnlockRxLPdu_DBA should be called after the data of Fr_LPduIdx was 
processed.  
 The API availability depends on the platform please refer to [8]. 
Expected Caller Context 
 Synchronous 
Table 5-35  Fr_ReceiveRxLPdu_DBA 
5.3.36  Fr_UnlockRxLPdu_DBA (optional) 
Prototype 
FUNC(Std_ReturnType, FR_CODE) Fr_UnlockRxLPdu_DBA(  
  FR_VCTRL_SYSTEMTYPE_ONLY,  uint16 Fr_LPduIdx) 
Parameter 
FR_VCTRL_SYSTEMTYP Depending on preconfiguration parameter ‘DrvFrBaseApiOptimization’ this 
E_ONLY 
macro is either empty or contains the value for uint8 Fr_CtrlIdx. Fr_CtrlIdx is a 
zero based index identifies the CC controller for which the API call has to be 
applied. 
Fr_LPduIdx 
This index is used to uniquely identify a FlexRay frame. 
Return code 
Std_ReturnType 
E_OK: API call finished successfully.  
 
E_NOT_OK: API call aborted due to errors. 
Functional Description 
This method unlocks the message buffer identified by Fr_LPduIdx. The method should be called after the 
data, received by method Fr_ReceiveRxLPdu_DBA, was processed. 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
51 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
Prototype 
Particularities and Limitations 
 It is required that the physical layer is in sync with the network.  
 The method Fr_UnlockRxLPdu_DBA should be called after the data of Fr_LPduIdx was 
processed.  
 The API availability depends on the platform please refer to [8].  
Expected Caller Context 
 Synchronous 
Table 5-36  Fr_UnlockRxLPdu_DBA 
5.3.37  Fr_ReadCCConfig (optional) 
Prototype 
FUNC(Std_ReturnType, FR_CODE) Fr_ReadCCConfig( 
  FR_VCTRL_SYSTEMTYPE_ONLY, 
  uint8 Fr_CCLLParamIndex, 
  P2VAR(uint32, AUTOMATIC, FR_APPL_DATA) Fr_CCLLParamValue) 
Parameter 
FR_VCTRL_SYSTEMTYP Depending on preconfiguration parameter ‘DrvFrBaseApiOptimization’ this 
E_ONLY 
macro is either empty or contains the value for uint8 Fr_CtrlIdx. Fr_CtrlIdx is a 
zero based index identifies the CC controller for which the API call has to be 
applied. 
Fr_CCLLParamIndex 
Parameter index. 
Fr_CCLLParamValue 
Value of index. 
Return code 
Std_ReturnType 
E_OK: API call finished successfully.  
 
E_NOT_OK: API call aborted due to errors. 
Functional Description 
This method returns the requested ECUC parameter. Please refer to [2] to find out the index of 
corresponding low level parameter. 
Particularities and Limitations 
 Particularities, limitations, post-conditions, pre-conditions 
The API is only available if GenTool option “Read CC Parameters” is set.  
Expected Caller Context 
 Synchronous 
Table 5-37  Fr_ReadCCConfig 
5.4 
Services used by FR 
In Table 5-38 services provided by other components, which are used by the FR are listed. 
For  details  about  prototype  and  functionality  refer  to  the  documentation  of  the  providing 
component. 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
52 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
Component 
API 
DET 
Det_ReportError  
DEM 
Dem_ReportErrorStatus  
Vstdlib.c 
Usage of this API is CC specfic please refer to 
[8] 
SchM 
SchM_Enter_Fr 
SchM_Exit_Fr 
EcuM 
EcuM_GeneratorCompatibilityError 
Table 5-38   Services used by the FR 
5.5 
Callback Functions 
The MICROSAR Fr does not use any callback functions. 
 
5.6 
Configurable Interfaces 
5.6.1 
Notifications 
The MICROSAR Fr does not use any notifications. 
 
5.6.2 
Callout Functions 
At  its  configurable  interfaces  the  Fr  defines  callout  functions.  The  declarations  of  the 
callout functions are provided by the BSW module, i.e. the Fr. It is the integrator's task to 
provide  the  corresponding  function  definitions.  The  definitions  of  the  callouts  can  be 
adjusted to the system's needs. The callout functions are optional and can be invoked by 
other modules. They are described in the following tables: 
 
5.6.2.1 
ApplFr_ISR_Timer0 
Prototype 
FUNC(void, FR_APPL_CODE) ApplFr_ISR_Timer0 (void); 
Parameter 

 
Return code 

 
Functional Description 
The method is called when the absolute timer fires. The Interrupt is cleared within the handler. The method 
is only used with enabled compiler switch ‘FR_CFG_APPL_CALLBACK_TIMER0’ 
Particularities and Limitations 
 Particularities, limitations, post-conditions, pre-conditions 
Called within the interrupt handler. It is required that the physical layer is in sync with the 
network. 
Depending on  
© 2017 Vector Informatik GmbH 
Version 1.04.00 
53 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
Expected Caller Context 
 Interrupt context 
Table 5-39   ApplFr_ISR_Timer0 
5.6.2.2 
ApplFr_ISR_Timer0_1 
Prototype 
FUNC(void, FR_APPL_CODE) ApplFr_ISR_Timer0_1 (void); 
Parameter 

 
Return code 

 
Functional Description 
The method is called when the absolute timer fires. The Interrupt is cleared within the handler. The method 
is only used with enabled compiler switch ‘FR_CFG_APPL_CALLBACK_TIMER0’ and 
‘FR_NUM_CTRL_USED > 1’ 
Particularities and Limitations 
 Particularities, limitations, post-conditions, pre-conditions 
Called within the interrupt handler. It is required that the physical layer is in sync with the 
network. 
Depending on  
Expected Caller Context 
 Interrupt context 
Table 5-40   ApplFr_ISR_Timer0 
 
 
 
5.6.2.3 
ApplFr_ISR_CycleStart 
Prototype 
FUNC(void, FR_APPL_CODE) ApplFr_ISR_CycleStart (void) 
Parameter 

None 
Return code 

None 
Functional Description 
The method is called when a new communication cycle starts. The Interrupt is cleared within the handler. 
The method is only used with enabled compiler switch ‘FR_CFG_APPL_CALLBACK_CYCLE_START’ 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
54 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
Particularities and Limitations 
 Particularities, limitations, post-conditions, pre-conditions 
Called within the interrupt handler. It is required that the physical layer is in sync with the 
network.  
Expected Caller Context 
 Interrupt context 
Table 5-41   ApplFr_ISR_CycleStart 
5.6.2.4 
ApplFr_ISR_CycleStart_1 
Prototype 
FUNC(void, FR_APPL_CODE) ApplFr_ISR_CycleStart_1 (void) 
Parameter 

None 
Return code 

None 
Functional Description 
The method is called when a new communication cycle starts. The Interrupt is cleared within the handler. 
The method is only used with enabled compiler switch ‘FR_CFG_APPL_CALLBACK_CYCLE_START’ and 
‘FR_NUM_CTRL_USED > 1’ 
Particularities and Limitations 
 Particularities, limitations, post-conditions, pre-conditions 
Called within the interrupt handler. It is required that the physical layer is in sync with the 
network.  
Expected Caller Context 
 Interrupt context 
Table 5-42   ApplFr_ISR_CycleStart 
 
 
 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
55 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
6  Glossary and Abbreviations 
6.1 
Glossary 
Term 
Description 
EAD 
Embedded Architecture Designer; generation tool for MICROSAR 
components 
Cfg5 
Generation tool for AUTOSAR4 MICROSAR components 
Table 6-1   Glossary 
6.2 
Abbreviations 
Abbreviation 
Description 
API 
Application Programming Interface   
AUTOSAR 
Automotive Open System Architecture 
BSW 
Basis Software 
CC 
FlexRay Communication Controller 
DEM 
Diagnostic Event Manager 
DET 
Development Error Tracer 
EAD 
Embedded Architecture Designer 
ECU 
Electronic Control Unit 
HIS 
Hersteller Initiative Software 
Host 
Specific microcontroller where Fr CC is implemented and on which the Fr 
software is executed. 
ISR 
Interrupt Service Routine 
JLE 
Job List Execution (see [10]) 
MICROSAR 
Microcontroller Open System Architecture (the Vector AUTOSAR 
solution) 
MTS 
Media Test Symbol 
PPort 
Provide Port 
RPort 
Require Port 
RTE 
Runtime Environment 
SRS 
Software Requirement Specification 
SWC 
Software Component 
SWS 
Software Specification 
EcuC 
ECU Configuration file 
Table 6-2   Abbreviations 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
56 
based on template version 6.0.1 


Technical Reference MICROSAR FR 
7  Contact 
Visit our website for more information on 
 
>   News 
>   Products 
>   Demo software 
>   Support 
>   Training data 
>   Addresses 
 
www.vector-informatik.com 
 
 
© 2017 Vector Informatik GmbH 
Version 1.04.00 
57 
based on template version 6.0.1 

Document Outline