trademarks of freescale semiconductor, inc., reg. u.s. pat ... · this is done automatically by...
TRANSCRIPT
TM
Freescale, the Freescale logo and CodeWarrior are
trademarks of Freescale Semiconductor, Inc., Reg.
U.S. Pat. & Tm. Off. Xtrinsic is a trademark of
Freescale Semiconductor, Inc.
All other product or service names are the property
of their respective owners.
© 2013 Freescale Semiconductor, Inc.
TM
2
Objectives
In this module, there are three primary objectives.
• You will become familiar with the process of building your
own S19 binary for an ISF application.
• You will also gain a high-level understanding of the
contents of an ISF application by looking inside a sample
ISF application using CodeWarrior.
• You will reinforce your knowledge in three areas.
— Importing projects into the Intelligent Sensor Mailbox Tool
— Running a project
— Reading sensor data
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
3
Prerequisites
To complete this module, you will need a Xtrinsic ISF 1.1 Windows 7 development PC meeting
the following minimum hardware requirements:
• Pentium 4 or newer
• 4 GB of RAM
• 2 USB ports (1.0, 2.0, or 3.0)
The development PC must have an internet connection and have specific software installed.
1. CodeWarrior 10.5 or newer (with inherent ColdFire support)
2. FSL_MQX_3.7_FXLC95K
3. ISF 1.1 Core Library
This is done automatically by using the ISF1.1 installer from the FSL Xtrinsic ISF Overview
page.
For more information on these installations, refer to Module 1—Installing Necessary Software.
You will also need the following items:
• KITFXLC95000EVM, -MAG, or -10AXIS Application Board
• P&E USB Multilink
• USB cables (2)
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
4
Prerequisites
Prior to beginning, you should have completed Module 2—Installing an
ISF Binary.
The best way to locate the documentation is to go to the Microsoft Start
Icon and look for the shortcuts under
“All Programs\Freescale\Documentation”.
Alternatively, the related documentation can be found on the Xtrinsic ISF
Downloads webpage.
• API Reference Manual (ISF1P195K_API_REFERENCE_RM)
• Software Reference Manual (ISF1P195K_SW_REFERENCE_RM)
• Software Release Notes (ISF1P195K_CORE_LIB_RELEASE_RN)
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
5
Required Items
Prior to beginning, two files must be located in the ISF 1.1
installation.
1. Go to the Windows Start Icon, select “All Programs -> Freescale
-> Xtrinsic ISF v1.1 -> Example Applications Folder”. Locate the
GetAccelData directory.
2. Go to the Windows Start Icon, select “All Programs ->
FXLC95000 Mailbox Tool -> FXLC95000 Mailbox Tool .
Alternatively, if the ISF 1.1 installer has NOT been run, these items must be downloaded
from the Xtrinsic ISF Downloads webpage.
• Download the ISF1P195K GETACCELDATA S19 file from the
Run-time Software\Reference Applications area.
• Download the FXLC95000_ISF1P1_WIN_MAILBOX_TOOL_EXE executable file from
the Software Development Tools\Debuggers and Runtime Analysis area.
This is the Intelligent Sensor Mailbox Tool, used for transferring binaries to the
FXLC95000. (Note that it is also used for transferring commands and data between
the PC and FXLC95000.)
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
6
Overview
In module 2, you learned four (4, 6, 7, 8) of the eight steps involved in
ISF application development.
This module discusses steps 1, 3, and 5 used in Building an ISF
Application.
Building an ISF application is a two-step process.
1. Clean the project. This step removes all previous builds.
2. Build the project. This step compiles a new build, creating the S19
binary from the source files in the project.
NOTE: Before building an ISF application, you will be introduced to a few key
concepts and the theory of operation of a user application using code snippets.
You can view the complete source code in CodeWarrior after importing the project.
1. Import project
2. Modify application
3. Build application
4. Connect hardware
5. Configure connection
6. Establishcommunication
7. Run application
8. Test
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
7
What is ISF?
The Intelligent Sensing Framework (ISF)
• is a library of components based upon MQX
• causes the FXLC95000 to act as a sensor hub
• facilitates management of the sensor hub consisting of the onboard
accelerometer and any external sensors, supported by ISF sensor adapters
The user application is a user-defined application program built using the ISF
core library and functionality.
Sensor abstraction allows the user to define and set the sensor configuration
and get the sensor data without knowing how the sensors are physically
connected to the system.
The next part of the training module goes through a simple user application,
GetAccelData introduced in Module 2, to demonstrate the usage of the on-
board accelerometer.
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
8
Importing the Project into CodeWarrior
1. Open CodeWarrior 10.5 or newer.
2. Create a clean workspace.
In the Select a workspace window, click Browse, then, in a
convenient location, create a new folder named
workspace_module3, then select the folder, and then click OK.
This folder is referred to as the workspace folder.
1. Import project
2. Modify application
3. Build application
4. Connect hardware
5. Configure connection
6. Establishcommunication
7. Run application
8. Test
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
9
Importing the Project (continued)
3. We don’t want to use the version of GetAccelData that came in
the installation
(C: Program Files\Freescale\ISF_R1p1\Example Applications)
because we don’t want to overwrite it. For this reason, In
Windows Explorer, copy the GetAccelData directory into the
CodeWarrior workspace directory under
C:/Users/…./workspace_module3
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
10
Importing the Project (continued)
4. Navigate to the workspace folder, and then to the
GetAccelData\Build folder.
5. In CodeWarrior, go to the
CodeWarrior workbench.
Position Windows Explorer
and CodeWarrior so that
they are both visible.
6. Drag the .project file (not the .cproject file) from Windows
Explorer into the projects space of the CodeWarrior
workbench.
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
11
Importing the Project (continued)
Verify that the GetAccelData_Binary project is visible in the
CodeWarrior Projects workspace.
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
12
Importing the Project (continued)
It is recommended to verify that the ISF libraries are properly loaded.
1. In CodeWarrior, right click on the GetAccelData project, and then select
Properties.
2. In the Properties for GetAccelData window, expand Resource, and then select
Linked Resources.
3. On the Path Variables tab, verify that the variable named ISF_ROOT_DIR has a
value of C:\Progam Files\Freescale\ISF_R1p1\ISF.
4. Close the window by clicking OK.
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
13
Host
User AppCommands/
Data
External
Sensor
Internal
Sensor
Sensor
Manager
Sensor
Abstraction
ISF
Understanding the user applicationModule 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
14
Understanding the user application (continued)
1. Every application requires a main entry point. The GetAccelData
application has a GetAccelData_main.c file in the Source folder in the
project workspace.
These header files are part of the MQX installation.
These header files are included in the Include directory under ISF top directory.
This header file is for the on-board accelerometer.
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
15
Understanding the user application (continued)
GetAccelData_main.c has a global variables section. It is possible to add new
global variables here, if needed.
Users can add their own global variables in this area.
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
16
Understanding the user application (continued)
The user application is added as an MQX task in this area.
If needed, it is possible to add other tasks using this template structure.
This is where a user task is added to the MQX task list. MQX starts all the tasks in this list automatically.
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
17
Understanding the user application (continued)
The next step is to inform the system about the sensors and configure them.
In this example, the system is informed about the FXLC95000CL
accelerometer and its parameters such as resolution and range. For more
information on configuring the accelerometer, refer to the SM_SensorSetting_t
structure documentation in the ISF API Reference Manual.
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
Structure used to set up the on-board accelerometer.
TM
18
Understanding the user application (continued)
Now that the accelerometer setup is defined, the user application subscribes
to the Sensor Manager for the accelerometer data via the
isf_sm_subscribe_sensor_data function. For more information on this
function, refer to the ISF API Reference Manual.
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
19
Understanding the user application (continued)
The final step is to ask the Sensor Manager to begin sending accelerometer
data using the isf_sm_begin_sensor_data command. Essentially, this function
turns on the data from the accelerometer to the user application. For more
information on this command, refer to the ISF API Reference Manual.
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
20
Understanding the user application (continued)
Once the request for data is turned on, the user application enters a loop to
wait for the sensor data to arrive and then reads the data once it arrives.
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
Reading and processing the sensor data inside the FXLC95000.
Waiting for the Sensor Manager notificationthat data is available.
TM
21
Understanding the user application (continued)
The raw sensor data is put into the mailboxes on the FXLC95000. Users can
manipulate the data and implement their own algorithms in this area of the
code. In this particular case, the data is sent back to the host.
Sensor data can be
processed on the
FXLC95000 or on the
host processor.
Updating the sensor data in the mailboxes allows the data to be read by the host processor for additional processing.
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
22
Understanding the user application (continued)
The loop repeats until the user application decides to stop getting the sensor
data by issuing the isf_sm_end_sensor_data command.
The user has the option to start the data flow again in the future if desired.
However, if no additional data is required, it is a good idea to stop the
subscription.
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
23
Understanding the user application (continued)
The user stops the subscription to the sensor via the
isf_sm_unsubscribe_sensor_data command. For more information on this
command, refer to the ISF API Reference Manual.
Now that you have a basic understanding of the GetAccelData user
application, the next few slides show you how to compile and build this user
application to produce the previously loaded S19 binary.
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
24
Building the Image
The first step to building an image is
to make sure generated files from
the previous builds are removed.
1. In CodeWarrior, right-click on
the project directory, and then
select Clean Project.
When the clean-only build is
complete, the console displays a
build complete message.
1. Import project
2. Modify application
3. Build application
4. Connect hardware
5. Configure connection
6. Establishcommunication
7. Run application
8. Test
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
25
Now that the cleaning process removed generated files from the
previous builds, new files will be generated as part of the build
process.
2. Right-click on the project directory, and then select Build Project.
Building the Image (continued)
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
26
Building the Image (continued)
The console displays several stages of the build. When the build is
complete, the console displays a finished building target message.
NOTE:
The file generated in this build is GetAccelData.elf.S19 located in the Binary folder. Since
no source files were modified, it is identical to the S19 Binary used in Module 2 and
operates in the same manner.
First, the S19 binary will be loaded onto the evaluation board using
the Intelligent Sensor Mailbox tool as was done in Module 2.
Second, you’ll learn how to load the S19 file from within
CodeWarrior. This is important if you want to debug your code.
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
27
Establishing Communication
Now you can open the Intelligent Sensor Mailbox Tool and establish
communication.
1. Locate and open the previously identified Intelligent Sensor
Mailbox Tool (FXLC95000 MailboxTool.exe).
2. In the “ComPort” tab of the Intelligent Sensor Mailbox Tool,
click Open Comm.
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
28
Establishing Communication (continued)
If this window appears, try each of the steps below.
If this window does not appear, proceed to the next slide.
If you are using a
KITFXLC95000EVM board, you
probably have the old bridge
software. Please contact your FSL
representative to exchange your
boards for a KITFXLC95000MAG.
The alternate version of the mailbox
tool using the old bridge software,
works the same way as instructed.
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
29
Establishing Communication (continued)
Verify that communication is established.
• Running ROM code is displayed in the console
• Connected to Device is indicated in the status bar
Notice also that the Port Number, Bridge Version, and Device ID windows now have values.
Alternate values that will also work: Port Number: COM67, Bridge Version HW: 06 SW:20
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
30
Loading the S19 Binary
You are now ready to transfer the S19 Binary image to the FXLC95000CL device and run the
application.
Return to the mailbox tool and switch over to the “Flash Utility” tab .
In case there is another image already in flash, begin by pressing “Erase Flash”.
1. Import project
2. Modify application
3. Build application
4. Connect hardware
5. Configureconnection
6. Establishcommunication
7. Run application
8. Test
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
31
Loading the S19 Binary (continued)
Now select “Program Flash” and select the S19 file from the CodeWarrior workspace
C:\Users\...\workspace_module3\GetAccelData\Build\Binary\GetAccelData.elf.S19
1. Import project
2. Modify application
3. Build application
4. Connect hardware
5. Configureconnection
6. Establishcommunication
7. Run application
8. Test
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
32
Loading the S19 Binary (continued)
Wait while the S19 binary image is loaded onto the device.
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
33
Running the S19 Binary
When it has finished loading, the window in the mailbox tool looks like:
To get the image to execute on the device, select “Boot to Flash”
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
34
Running the S19 Binary (continued)
Verify the transfer process is complete.
• All notifications will disappear
The GetAccelData application is now running on the Application board.
Data and commands can be sent to the application board from the
Intelligent Sensor Mailbox Tool and data can be received from the
application.
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
35
Reading Sensor Data Using the
Intelligent Sensor Mailbox Tool
With communication established and the application running on the
Application Board, you can read sensor data using the Intelligent
Sensor Mailbox Tool.
In the Intelligent Sensor Mailbox Tool, click on the “Mail Box” tab.
Read the contents of the mailboxes by clicking MB Read.
1. Import project
2. Modify application
3. Build application
4. Connect hardware
5. Configure connection
6. Establishcommunication
7. Run application
8. Test
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
36
Reading Sensor Data (continued)
The sample user application provides the sample count and X, Y, Z
accelerometer data.
• MB4:7 contain the sample count
• MB12:17 contain the X, Y, Z accelerometer data
MB19MB12:17MB4:7MB0
Note: Do not expect the same values as shown. Just
see the values changing in these particular mailboxes.
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
37
Configuring the Connection using
CodeWarrior
Establishing Communication
Step 4 was completed in Module 2—Installing an ISF Binary.
For step 5, you can also use CodeWarrior to load the binary onto the device.
Throughout this training, the Intelligent Sensor Mailbox tool will be used but it
is important for you to know how to use the CodeWarrior mechanism,
especially when you debug your code.
When using CodeWarrior, the P&E USB Multilink must be used. This
changes the hardware configuration slightly from what was used in Module 2.
1. Import project
2. Modify application
3. Build application
4. Connect hardware
5. Configure connection
6. Establishcommunication
7. Run application
8. Test
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
38
Connecting the Hardware
Three pieces of hardware must be connected properly.
• Developer PC
• Application Board
• P&E USB Multilink
Connect the hardware using the following procedure.
1. Connect the Application Board
to the PC using one of the
provided USB cables.
NOTE:
The Application Board power
switch should be in the OFF position.
1. Import project
2. Modify application
3. Build application
4. Connect hardware
5. Configure connection
6. Establishcommunication
7. Run application
8. Test
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
39
Connecting the Hardware (continued)
2. Connect the P&E USB Multilink
to the PC using the remaining
USB cable.
NOTE:
If this is the first time the P&E
Multilink is connected to the
developer PC, device drivers
may install. Allow the driver
installations to complete,
indicating that the device is ready
to use.
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
40
Connecting the Hardware (continued)
3. Connect the P&E USB Multilink to the Application Board J14
junction using the JTAG interface on the P&E Multilink. Ensure
that the JTAG interface connects to all pins of J14 and pin1 is
aligned with the stripe.
4. Power on the Application Board by moving its power switch to
the ON position.
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
41
Connecting the Hardware (continued)
Verify that the hardware is connected properly.
• P&E Multilink blue LED and yellow LED are lit.
• Application Board green LED (D4) is lit.
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
42
1. Import project
2. Modify application
3. Build application
4. Connect hardware
5. Configure connection
6. Establishcommunication
7. Run application
8. Test
Configuring the CW Connection
Configuring the connection is a one-time
procedure.
1. In CodeWarrior, right-click the
GetAccelData project and select Run
As, and then select Run
Configurations.
2. Select CodeWarrior Download, and
click the New launch configuration
icon. This opens a GetAccelData
Binary tabbed window panel, which is
pre-populated with some CodeWarrior
project-related configuration
information.
3. Click New, located to the right of the
Connection field.
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
43
Configuring the CW Connection (continued)
4. In the Select Remote
System Type window,
expand CodeWarrior
Bareboard Debugging, then
select Hardware or
Simulator Connection, and
then click Next.
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
44
Configuring the CW Connection (continued)
5. In the Hardware or
Simulator Connection
window, enter
FXLC95000_multilink into
the Name field
6. Click New, located next to
the Target field.
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
45
Configuring the CW Connection (continued)
7. In the Hardware or Simulator
Target window, enter
FXLC95000 in the Name field.
8. In the Target type menu,
expand coldfire.FXLC95xxx,
then select FXLC95000, and
then click Finish.
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
46
9. In the Hardware or Simulator
Connection window, from the
choices available in the
Connection type menu, select
the P&E ColdFire multilink
(exact wording may be
different depending on the
multilink model), and then click
Finish.
Configuring the CW Connection (continued)
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
47
Configuring the CW Connection (continued)
10. In the Create, manage,
and run configurations
window, click Apply.
The connection type is now
configured and saved.
Keep this window open.
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
48
Establishing Communication
1. Locate and open the Intelligent Sensor Mailbox Tool
(ISF1P1WIN_MAILBOX_TOOL_EXE.exe)
2. Connect the hardware as described in Module 1.
3. Click Open Comm on the “Com Port” tab.
Verify that communication is established.
• Running ROM code is displayed in the console
• Connected to Device is indicated in the status bar
1. Import project
2. Modify application
3. Build application
4. Connect hardware
5. Configure connection
6. Establishcommunication
7. Run application
8. Test
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
49
Running the Binary
You are now ready to transfer the Binary image to the FXLC95000CL device and run the
application.
1. In the CodeWarrior Create,
manage, and run configurations
window, click Run.
In the lower right corner of CodeWarrior,
launching information appears indicating
that the binary is being transferred to the
device.
1. Import project
2. Modify application
3. Build application
4. Connect hardware
5. Configure connection
6. Establishcommunication
7. Run application
8. Test
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
50
Running the Binary (continued)
Verify the transfer process is complete.
• All notifications will disappear
The sample application is now running on the Application board. Data
and commands can be sent to the application board from the Intelligent
Sensor Mailbox Tool and data can be received from the application.
NOTE:
Each of the provided application files contains a readme file that
explains project-specific commands that may need to be written to the
sensor via the Intelligent Sensor Mailbox Tool.
The project used in this module does not require writing any of these
commands at this time.
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
51
Reading Sensor Data Using the
Intelligent Sensor Mailbox Tool
With communication established, the new build completed, and the
application running on the Application Board, you can read sensor
data using the Intelligent Sensor Mailbox Tool.
In the Intelligent Sensor Mailbox Tool, read the contents of the
mailboxes by clicking on the Mail Box tab and clicking MB Read.
1. Import project
2. Modify application
3. Build application
4. Connect hardware
5. Configure connection
6. Establishcommunication
7. Run application
8. Test
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
52
Reading Sensor Data (continued)
The sample user application provides the sample count and X, Y, Z
accelerometer data.
• MB4:7 contain the sample count
• MB12:17 contain the X, Y, Z accelerometer data
MB19MB12:17MB4:7MB0
Note: Do not expect the same values as shown. Just see
the values changing in these particular mailboxes.
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
53
Reading Sensor Data (continued)
Verify your data by reading the data multiple times.
While changing the orientation of the Application Board, click
MB Read several times. Each click displays a new set of data in the
console.
• MB4:7 contain the sample count.
This value increases with each click.
• MB12:17 contain the X, Y, Z accelerometer data.
The accelerometer data changes based on the orientation of the
Application Board.
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
54
Module Summary
This completes Module 3—Building an ISF application.
At this point, you know seven of the eight main steps to developing ISF
applications and running them on the KITFXLC95000EVM/MAG/10-AXIS
Application Board.
1. Importing the project into CodeWarrior
2. Modifying an ISF application
3. Building an ISF application
4. Connecting the Application Board
5. Configuring the connection between PC and the Application Board using
either CodeWarrior or the Mailbox tool
6. Establishing communication between the PC and Application Board using
the Mailbox tool
7. Transferring the image of the application to the Application Board and
running the application using either CodeWarrior or the Mailbox tool
8. Reading sensor data using the Mailbox Tool
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM
55
Next Steps
Now that you can import, build, and run existing ISF applications,
you are ready to begin learning how to modify applications.
In Module 4, you will start with a working application and then
modify it to implement your own application.
Please continue to Module 4—Modifying an ISF application.
Module 3
ObjectivesPrerequisitesRequired Items
OverviewWhat is ISF?Import projectUnderstanding the user
applicationBuilding the ImageEstablish CommunicationLoad the S19 BinaryRun the S19 BinaryRead Sensor DataConfiguring the CW
ConnectionCW - CommunicationCW - Run the binaryRead Sensor Data
Module SummaryNext Steps
TM