Target Category: Arduino, Cortex M3, Delfino, F280x, F281X, Generic MCU, Linux AMD64 and Raspberry Pi, MSP430, Piccolo, STM32
Target Sub-Category: Target Interface
Description: The Target Interface block lets you validate and tune your control algorithm as it executes on a target device during PIL and HIL testing. When you simulate the diagram, the Target Interface block automatically downloads the OUT or ELF file to the target and begins executing the code on the target. While the target executable runs, you can communicate with the target via the inputs and outputs on the Target Interface block. Note the following:
• Because the target always runs in real time, you should configure the diagram to run in real-time mode when communicating with the target. This way, Embed is synchronized with the target.
• If you are performing HIL on the Arduino, you cannot use serial UART blocks in your diagram or include them in Extern Definition blocks. This is because Arduino HIL communication relies on UART-0 on the target. Consequently, it is necessary to remove all UART-0 usage in your diagram when using HIL to debug it.
To probe stack and heap usage, use the Get Target Stack and Heap commands.
Block Title: Indicates an optional name that appears on the Target Interface block.
Connectors: Specifies the number of inputs and outputs on the compound block from which the code was generated.
Embedded Target Support Version: Indicates the version number of the driver board in use.
Keep Target Running: Allows the embedded target application to continue running even after you quit Embed.
Sample Rate: Specifies the sample rate at which the embedded algorithm should run. The default is 10 kHz.
Show CPU Utilization: Creates an extra output that displays the CPU utilization on the target while your target execution file runs. CPU usage only works with Timer 2 on Delfino, F280x, F281x, and Piccolo targets.
Sync Target to This Block: Synchronizes the target to your simulation. It waits until the data from the host is presented; then the host waits for the target to operate for one timer interrupt interval. This parameter is available only for devices that support it.
Target Board: Specifies the target card if multiple cards are supported. Board numbers are 0 – 3.
Target Execution File: Indicates the complete pathname of the OUT or ELF file previously generated. If you are not sure of the pathname, click … to locate the target execution file.
If the OUT or ELF file name does not match the name of the block diagram, Embed issues a warning message about the mismatch when you simulate the diagram. To suppress the warning message, add the following keyword value pair to your vissim.ini file:
disabletgtInterfacefilenamecheck=1
Target Frequency (MHz): Indicates the speed of your CPU. Embed needs to know the speed for the timing to be accurate.