7.3. PROFIBUS DP Slave demo setup on AM335x¶
This article describes how to set up the AM335x PROFIBUS DP Slave with PROFIBUS master software running on a PC.
We use ProfiTrace (Version 2.6.1 or Later) from Procentec as Profibus master. This software can be run on Windows machine and the ‘ProfiCore Ultra’ hardware should be connected between the PC and the EVM running Profibus slave application. The ProfiTrace configuration should be done as follows-
Copy PRU_OCDA.gsd file provided in the SDK package [(ISDK_HOME)\examples\profibus_slave\GSD] into master GSD library (ProfiCaptain- Settings->Add/Copy GSD to catalog)
Fig 1 - Adding GSD file to ProfiTrace and generating the catalog
Use ‘Generate Catalog’ option to regenerate the catalog when the GSD file is modified (ProfiCaptain- Settings-> Generate catalog).
ProfiCore Initialization: Once the Proficore Ultra is connected to EVM, initialize the proficore using ‘Init ProfiCore Ultra’ (ProfiTrace-> Init ProfiCore Ultra). If profiTrace shows ‘Unable to detect Baud Rate’, proceed by clicking ‘OK’.
Load/Save Project: Configure the ProfiCaptian Project by drag-dropping the “AM335x Evaluation Module (EVM)” slave into the ProfiCore slave Network.Verify that the module parameters are correctly configured using ‘Setup Modules and Parameters’. Save this project in ProfiCaptain Project File (*.ppf) format (File->Save Project). This project files can be used in future for the easy reloading (File->Load Project)
Operate Master: By default, the master will not be active on the bus. When the master goes to ‘Operate’ state, it will become active by transmitting tokens in the bus.
Set up the board in which Profibus Slave application is running as shown below:
ICE V2 Setup
NOTE 1 - Set Jumpers between pins 2 & 3 on J18 and J19 to select ICSS mode NOTE 2 - Set jumper on J7, J8 ( pin 1 and 2) and J10. Remove Jumper on J6 as shown in Fig 2
Fig 2 - ICEv2 Setup for running Profibus Slave
Set Jumper on J6 (pin 1 and 2), J7,J5 and remove Jumper J4 as shown in Fig 3.
Fig 3 - ICE Setup for running Profibus Slave
Connect the Proficore Ultra Serial interface to J13 of IDK as shown in Fig 4
Fig 4 - IDK Setup for running Profibus Slave
After powering on the board, the bootloader will load the APP from SDMMC/SPI flash into DDR/Internal RAM
The boot logs can be seen on serial console (Connect the JTAG in case of ICE boards and use DB9 serial cable to ‘J10’ in case of IDK)
Configuring the Station Address:
The procedure for configuring the station address depends on the EVM type in which the application is running.
The application will detect the board type. In case of ICEv2, the station address are read based on the ‘Rotary Switch Position’ (Refer Fig 2). The rotary switch can be positioned to 0 to 9 and the application will be running with a station address which is read based on the rotary switch position as shown in Fig 6
Fig 6 - UART console view for application running on ICE2