background image

Application Example 4—Full-Speed FlexRay and CAN Networks

S12XF Starter Kit, Rev. 1

Freescale Semiconductor

7

SPI master operating at 2.5 MHz

SBC initialized in debug mode

CAN module configured for internal loopback transmission and reception at 500 Kbit/s 

FlexRay module configured for wake-up frames transmission

Periodic XGATE access to SBC through SPI channel, 75 ms period

Microcontroller successive tasks are separated by 225 ms intervals for a total period of 900 ms; the 
general-purpose LEDs are activated by columns to indicate the task executed in the following 
sequence:

— CAN internal loopback transmission/ reception, LED indicators D22, D27 and D29

— FlexRay wake-up frames transmission, LED indicators activated D23, D25 and D28

— D24 and D26 toggled 

— LED indicators off

IRQ detection when SW2 is pressed, interrupt service indicated by toggling D26 

Input capture IOC7 stimulated by SW3, interrupt serviced by the XGATE and indicated by 
toggling D24

9

Application Example 4—Full-Speed FlexRay and CAN 
Networks

For this example you need two EVBs, because each acts as a CAN and FlexRay node, exchanging frames 
in a simple network. One EVB must be programmed using the EVB9S12XF512E_Node1_FS.mcp project. 
The other must be programmed with the EVB9S12XF512E_Node2_FS.mcp code (these files are in the 
EVB9S12XF512E_Node1_FS.zip and EVB9S12XF512E_Node2_FS.zip files, respectively). The CAN 
and FlexRay channels must be properly connected between the EVBs.

The main functions performed in this example project are:

Real-time interrupt configured to 75 ms period and used as the base time for the task scheduler

SPI master operating at 2.5 MHz

SBC initialized in debug mode

CAN module configured for transmission and reception at 500 Kbit/s rate

FlexRay module fully configured for frames transmission and reception at 10 Mbit/s. In Node1 the 
FlexRay events are interrupt driven, whereas in Node2 there is a polling procedure for the frames 
handling

LED D22 toggled each time the RTI is serviced (75 ms period)

Periodic XGATE access to SBC through SPI channel (75 ms period)

CAN frames transmission every 150 ms; LED D27 activated

CAN reception is interrupt based; LED D29 is activated to indicate a CAN frame received

FlexRay activity is indicated by the fast toggling of LEDs D23, D25, and D28. To ease visual 
perception, these LEDs are turned on each time the RTI is serviced and turned off when a FlexRay 
function is performed. For Node1 the LED activation is:

Summary of Contents for EVB9S12XF512E

Page 1: ...you can establish a FlexRay network in approximately 1 hour depending on the speed of your PC and the installation time of the CodeWarrior Development Studio software 1 Introduction 1 2 Kit Contents 2...

Page 2: ...enter support sheet CodeWarrior Special Edition Tri pak including Development Studio for HCS12 x v 4 6 CD Development Studio for Microcontrollers v 6 0 CD and a service pack CD 3 Information CD The in...

Page 3: ...udio for HCS12 x v 4 6 software before you proceed This will download the required P E drivers to your computer for installation Connect the P E USB Multilink to one of the available USB ports on your...

Page 4: ...onnector on the EVB using connector polarization Align the red strip on the ribbon cable to the pin marked 1 on connector J2 This indicates correct polarization which does not damage the MCU 2 Verify...

Page 5: ...allow basic tests of the EVB hardware integrity as well as verifying the code downloading procedure The functions performed in this example project are Real time interrupt configured to 500 ms period...

Page 6: ...D22 D27 and d29 are sequentially turned on and activated FlexRay activity and frames interchange are indicated by the toggling of LEDs D23 D25 and D28 at 1 s intervals to ease visual perception the L...

Page 7: ...network One EVB must be programmed using the EVB9S12XF512E_Node1_FS mcp project The other must be programmed with the EVB9S12XF512E_Node2_FS mcp code these files are in the EVB9S12XF512E_Node1_FS zip...

Page 8: ...data sheets and or specifications can and do vary in different applications and actual performance may vary over time All operating parameters including Typicals must be validated for each customer a...

Page 9: ...Application Example 4 Full Speed FlexRay and CAN Networks S12XF Starter Kit Rev 1 Freescale Semiconductor 9...

Page 10: ...S12XF Starter Kit Rev 1 Application Example 4 Full Speed FlexRay and CAN Networks Freescale Semiconductor 10...

Page 11: ...S08 S12 category Click to view products by NXP manufacturer Other Similar products are found below S12ZVMC12EVBCAN DEMO9S08DZ60 DEVKIT S12G128 DEVKIT S12VR64 S12ZVMAEVB TWR S12G240 KIT VLG MC9S12ZVC...

Reviews: