8.1. PRU ICSS Profibus Master User Guide

Jump to: navigation, search


Last updated: 08/04/2017

8.1.2. Introduction

PRU-ICSS Profibus Master package is designed for the Sitara processor family (with PRU-ICSS IP) to enable customers add Profibus master protocol support to their system. Release 01.00.01

Released Aug 2017

8.1.3. System Requirements

This release uses the PROCESSOR-SDK-RTOS 04_00_00 which is available

8.1.4. Directory Structure

|   |--- docs

|       |---Industrial_Protocol_Package_Getting_Started_Guide.pdf

|       |---Industrial_Protocol_Package_Software_Developer_Guide.pdf

|       |---PRU_ICSS_Profibus_Master_User_Guide.pdf

|       |---PRU_ICSS_Profibus_Master_Release_Notes.pdf

|       |---Profibus_Master_Datasheet.pdf

|       |---PRU-ICSS-Profibus_Master_01.00.xx_manifest.html

|   |--- examples

|       |--- profibus_master

|           | --- hal

|   |--- protocols

|       |--- profibus_master

|               |--- docs

|                       |--- doxygen

|               |--- firmware

|               |--- include

|               |--- projects

|   |--- third_party

|       |--- protocols

|               |--- profibus_master

|                           |--- include

|                           |--- stack_lib
|                                    |--- am335x
|                                            |--- a8
|                                    |--- am57xx
|                                            |--- a15
NOTE : Refer to install path to get updated view for any changes

in directory structure

8.1.5. Generating Project files

NOTE : Unlike [legacy Industrial SDK], the CCS project files are not readily available in the protocol package installer. The steps that are involved to generate CCS project files with the help of the Batch file or Shell script are as explained below.

8.1.6. Steps to generate Project files

  • Setup the environment variables
    • Edit the file [INSTALL-DIR]/protocols/<protocol name>/projects/projectCreate.bat or .sh to align to the environment in your machine. All these paths should be accurate and mandatory, and will cause errors otherwise
      • CCS_INSTALL_DIR - Set the path where the recommended version of CCS is installed in user machine(The path upto where folder ‘eclipse’ is located.)
      • CCS_WORKSPACE_LOC - Set the CCS workspace location. This folder will be created if it doesn’t exist already.
  • IA_SDK_HOME - Specify the IA_SDK_HOME based on the directory where the industrial package is installed. If the package is installed in a custom directory, make sure this path is modified properly.
  • PDK_INSTALL_PATH - Set the path where PDK RTOS package is installed (Refer to default path in projectCreate.bat)
  • PROJECT_CREATE_DIR - Set the folder where the created project will be kept. User can import the projects from this directory to CCS
  • PROJECT_CREATE_OPTIONS_FILE_DIR - Specify the directory where the project create options files are kept. This folder contains the *.txt files which specify the project settings (linked files, predefined symbols, compiler and linker options for a specific project)
  • Open Command/Shell Prompt and navigate to [INSTALL-DIR]/protocols/<protocol name>/projects
  • Run projectCreate.bat or projectCreate.sh. The batch file intakes three mandatory command line arguments (The mandatory arguments are case sensitive!)

Usage format: projectCreate.bat [SOC] [PROCESSOR] [PROJECT_NAME]

  • [SOC]
    • The valid values for first command line argument [SOC] are
      • AM571x - To generate a project specific to AM571x
      • AM572x - To generate a project specific to AM572x
      • AM335x - To generate a project specific to AM335x
    • The valid values for second command line argument [PROCESSOR] are
      • arm - To generate a project specific to ARM core
    • The valid values for third command line argument [PROJECT_NAME] to be used with Profinet master installer package
      • profibus_master - to generate Profibus master application project
Ensure that Code Composer Studio is not running when executing

projectCreate.bat or projectCreate.sh. If not, the eclipse may throw errors

Usage example 1 : projectCreate.bat AM572x arm profibus_master
To generate the project files for Profibus master application for

AM572x ARM core by overwriting the project if it is already existing in PROJECT_CREATE_DIR\PROJECT_NAME_SOC_PROCESSOR | Usage example 2 : projectCreate.bat AM335x arm profibus_master | To generate the project files for Profibus master application for AM335x ARM core by overwriting the project if it is already existing in PROJECT_CREATE_DIR\PROJECT_NAME_SOC_PROCESSOR

If the project create is successful, the generated project files will

be found in [INSTALL-DIR]/protocols/<protocol name>/projects/PROJECT_NAME/SOC

The projectCreate.bat or.sh utilizes the project arguments provides in [INSTALL-DIR]/protocols/<protocol name>/projects/ccsproject_args to generate the project file

The projectCreate.bat or.sh utilizes the project arguments provides in [INSTALL-DIR]/protocols/<protocol name>/projects/ccsproject_args to generate the project file

8.1.7. Board Setup

  • After powering on the board the bootloader will load the APP from SDMMC/SPI flash/NOR flash into DDR/Internal RAM/Cache
  • The boot logs can be seen on serial console. Serial console need to be configured with 8 bit data, 1 stop bit and with the baud rate of 115200.

8.1.8. Running and configuring the Profibus master application

Profibus master application provides the feature of configuring and controlling the master application through the UART interface provided and if UART interface is not present profibus application works with default configuration. After successful powering on the board, application waits for 5 sec for the keyboard input data through the UART. If it doesn’t get (UART cable not connected or user didn’t press the keyboard in 5 sec). Application configures the master with the default configurations. The default configuration details are as below.

  • Master Application supports 3 TI supported slaves with slave address of 3, 4, and 7.
  • Communication baud rate between master and slave is set to 12MB.

In case of board is connected to UART cable, on powering on,


If user presses any key within 5 sec, console displays the following for Baud rate configuration.


User can select the required baud rate by pressing the respective number. For ex. For 12 MB baud rate, user needs to press 8.After Baud rate it goes for configuring the number of slaves in a group. Console displays as below.


User can configures the no. of slave by entering the value from 1 to 32.


Slave address for each slave device should be enter separately followed by “ENTER” At this stage User completes the configuration. On success of configuration console displays as below.


Now master is in Data exchange with the Slave device (address = 3,4,5).user can see the data exchange through the Profitrace.

In RUN time, the Master application supports the following commands for control and to get the status of master and slaves connected.

1. Sync.: This command is used to sync (to cache output data and only

forward it to the physical outputs) all the slaves connected to master. With the single input command, Master sends the sync command to all the slaves which are connected.


  1. Unsync: This commands unsync all the slaves.

3. Freeze: A FREEZE instruction causes all slaves activated with a group address to cache physical input values.


  1. Unfreeze: unfreezes all the slaves

5. Getdiag : This command is used the get Diagnostics data of all the slaves.


8.1.9. Limitations

Profibus master application (evaluation version) supports only the TI Profibus slaves and maximum number of three slaves Archives