MPC555 Execution Profiling via CAN A - Provide CAN interface to execution profiling engine via CAN channel A

Library

Target Support Package FM5/ MPC555 Driver Library/ Execution Profiling

Description

Provides a CAN interface to the execution profiling engine. On receipt of a start command message, logging of execution profile data is commenced. On completion of a logging run, the recorded data is automatically returned via CAN. You must specify the message identifiers for the start command and the returned data. These identifiers must be compatible with the values used by the host-side part of the execution profiling utility. See also MATLAB command profile_mpc555.

profile_mpc555(connection) collects and displays execution profiling data from an MPC555 target microcontroller that is running a suitably configured application generated by the Target Support Package FM5 product. Set connection to 'CAN' in order to collect data via a CAN connection between the target and the host computer. To use the CAN connection, you must have suitable CAN hardware installed on the host computer. This function will test for availability of CanCardX 1 or CanAc2Pci1 and defaults to a bit rate of 500k bits per second. If you need to use a different configuration, you should make a copy of this file (with a different name) and change the configuration data as required. The data collected is unpacked then displayed in a summary HTML report and as MATLAB graphic.

profdata = profile_mpc555(connection)

returns the execution profiling data in the format documented by exprofile_unpack.

See The Profiling Command for instructions for setting the bit rate automatically or manually.

To configure a model for use with execution profiling, you must perform the following steps:

  1. Make sure the model includes an MPC555 Execution Profiling block that provides an interface between the target-side profiling engine, and the host-side computer from which this command is run.

  2. Make sure the execution profiling option is selected in the MPC5xx Options pane of the Configuration Parameters dialog box.

For more information see Execution Profiling which includes links to instructions for the example demo mpc555rt_multitasking.mdl.

Dialog Box

Start command CAN message identifier

Set the identifier of the message to start logging execution profiling data. You should use the default unless you have modified profile_mpc555. This identifier must be compatible with the values used by the host-side part of the execution profiling utility (profile_mpc555).

The utility profile_mpc555 provides a mechanism for initiating an execution profiling run and for uploading the recorded data to the host machine. To perform this procedure using a CAN connection between host and target, profile_mpc555 first sends a CAN message that is a command to start an execution profiling run. The CAN identifier for this message must be specified as the same value on the target as on the host. The host-side values are hard-coded in profile_mpc555. If you are using an un-modified version of the host side utility, you should use the default value for this CAN message identifier. These are visible to help you avoid using the same identifier for other tasks.

Returned data CAN message identifier

Set the message identifier for the returned data. As with the message identifier for the start command, the value specified here must be the same as the hard-coded value in profile_mpc555.

Sample time

The sample time of the block. The faster the sample time of the block, the faster data will be uploaded at the end of the execution profiling run. You may want to run this block slower than the fastest rate in the system because the execution profiling itself imposes some loading on the processor. You can minimize this extra loading by not running it at the fastest rate.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS