UM1947
User manual
EVAL-L9942 Graphical User Interface
Introduction
This document describes the Graphical User Interface (GUI) to initiate and control the
EVAL-L9942 (Stepper Motor Driver application boards for L9942). The GUI allows to modify the parameters through the SPI protocol, to manage the enable, DIR pins and generate the pulse signal.
Figure 1. EVAL-L9942: Graphical User Interface (GUI)
The L9942 GUI has been developed by using Labview
®
and it must be used with the
EVAL-L9942 evaluation board in conjunction to the SPC56P-Discovery evaluation board
SPC560P-DISP.
September 2015 DocID028317 Rev 1 1/18
www.st.com
1
5
6
7
3
4
1
2
Contents
Contents
UM1947
Graphical User Interface description . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Running procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
SPC560P-DISP and EVAL-L9942 connection . . . . . . . . . . . . . . . . . . . . . 7
SPC56P-Discovery USB drivers installation guide . . . . . . . . . . . . . . . . 9
Labview driver installation guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
How to load the FW on SPC56P-DISP . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2/18 DocID028317 Rev 1
UM1947
List of figures
List of figures
Figure 1.
EVAL-L9942: Graphical User Interface (GUI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Figure 2.
GUI, fields description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Figure 3.
SPC560P-DISP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Figure 4.
SPC560P-DISP – 4 x 36 Connector, pin “A-17” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Figure 5.
SPC560P-DISP – 4 x 36 Connector, pins connected to EVAL-L9942 . . . . . . . . . . . . . . . . 7
Figure 6.
EVAL-L9942 and SPC560P-DISP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Figure 7.
EVAL-L9942 and SPC560P-DISP plugged . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Figure 8.
InstallPlsUsbJtagDriver.bat. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Figure 9.
SPC560P-DISP – USB port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Figure 10.
Device Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Figure 11.
Computer management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Figure 12.
PLS USB JTAG Adapter for SPCxxx A & B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Figure 13.
PLS USB JTAG adapter property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Figure 14.
COM port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Figure 15.
New Workspace for SPC56P-DISP (part 1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Figure 16.
New Workspace for SPC56P-DISP (part 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Figure 17.
STM Pictus Evaluation Board with SPC560P50 (SPC5 UDE/STK) . . . . . . . . . . . . . . . . . . 14
Figure 18.
UDE Visual Platform 4.0 (part 1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Figure 19.
UDE Visual Platform 4.0 (part 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Figure 20.
UDE Visual Platform 4.0 (part 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Figure 21.
UDE Visual Platform 4.0 (part 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
DocID028317 Rev 1 3/18
3
Graphical User Interface description
1 Graphical User Interface description
The L9942 GUI includes eight fields:
Figure 2. GUI, fields description
UM1947
4/18
1.
Com Port Setup: this menu allows to select the COM port.
2. SDI: through this menu it is possible to select the specific device register and program the bits
3. SDO: through this menu it is possible to read the device SDO register.
4. SPI Send/Receive: in this area, pushing the [SEND] button, it is possible to send the
SPI command configured in the SDI menu (menu #2) or directly send an SPI command manually and then send the command programmed in the MOSI field. In the same menu it is possible to read the SPI message from the device (MISO). The two LEDs,
SPI SEND OK and SPI RECEIVE OK show the status of the SPI communication. If the
DocID028317 Rev 1
UM1947 Graphical User Interface description
LED is turned ON the communication is established and the data is transferred properly.
5. PWM: through this menu it is possible to enable the PWM generator. The PWM frequency as well as the duty cycle is programmable.
6. GPIO: through this menu it is possible to manage the Pulse Generator setting the number of pulses, the Ton and Toff. After pushing the [OK] button, the configured number of pulses is generated. In this menu it is possible to Enable /Disable the device.
7. HELP: through this menu it is possible to download the GUI, the HW help and the
L9942 datasheet.
8. CLOSE: push this button to stop the execution of the GUI.
DocID028317 Rev 1 5/18
16
Running procedure UM1947
Here below there is a list of commands the user must follow to drive the EVAL-L9942 using the GUI:
1.
Configure the COM port
3. Write the desired value of the SPI in the field #2
4. Press “SEND” in the field #4. If the communication has been established, and the command has been sent properly, the LED “SPI SEND OK” is turned ON (red color).
The led “SPI RECEIVE OK” is turned ON if the answer from the device has been properly received.
5. In field #3 it is possible to read the answer from the device in bit format; in field #4 SDI and SDO data are shown (expressed in hex).
6. In field #5, to program the PWM frequency, press “SET” button.
7. Set the Duty Cycle value and then press “START” button.
8. To enable the Device (EN), press the “EN ON/OFF” button in field #6. If the communication has been established, and the command have been sent properly, the led “SEND ENABLE OK” is turned ON (red). The led D1, on the EVAL-L9942, is turned
ON as well.
9. In field #5 the “STOP PWM” button stops the PWM signal and the motor is blocked consequently.
10. The button “STOP” on the top side of the GUI stops the execution of Labview program and closes the window.
6/18 DocID028317 Rev 1
UM1947
3
SPC560P-DISP and EVAL-L9942 connection
SPC560P-DISP and EVAL-L9942 connection
SPC560P-DISP board has a connector 4 x 37 pin 100 mils where the EVAL-L9942 must be plugged. The user must pay attention to plug the EVAL-L9942 in the right position;
Figure 4:
SPC560P-DISP – 4 x 36 Connector, pin “A-17”
and
Figure 5: SPC560P-DISP – 4 x 36
Connector, pins connected to EVAL-L9942
show how to identify the pins.
Figure 3. SPC560P-DISP
Figure 4. SPC560P-DISP – 4 x 36 Connector, pin “A-17”
Figure 5. SPC560P-DISP – 4 x 36 Connector, pins connected to EVAL-L9942
DocID028317 Rev 1 7/18
16
SPC560P-DISP and EVAL-L9942 connection
Figure 6. EVAL-L9942 and SPC560P-DISP
UM1947
Figure 7. EVAL-L9942 and SPC560P-DISP plugged
8/18 DocID028317 Rev 1
UM1947
4
SPC56P-Discovery USB drivers installation guide
SPC56P-Discovery USB drivers installation guide
If the USB drivers are already installed, it is suggested to uninstall them and then follow the instructions reported below.
The USB connection provides the operating voltage to supply the board (no external PSU to supply the SPC560P-DISP is needed).
1.
Disconnect the USB from SPC56P-DISP board and then open the folder
“JtagUsbDriver”.
2. Right click on “InstallPlsUsbJtagDriver.bat” and then select “Run as administrator”
Figure 8. InstallPlsUsbJtagDriver.bat
3. Once the installation is completed, connect the USB cable to the SPC56P-DISP board: the USB drivers are installed.
Figure 9. SPC560P-DISP – USB port
4. From “Start” Menu, right click on “Computer” and select “Manage”.
DocID028317 Rev 1 9/18
16
SPC56P-Discovery USB drivers installation guide
Figure 10. Device Manager
UM1947
5. Once the computer management popup appears, select Device Manager from the
System Tools menu.
Figure 11. Computer management
6. Expand the item Universal Serial Bus controllers: the item “PLS USB JTAG Adapter for
SPC5xxx A” and “PLS USB JTAG Adapter for SPC5xxx B” appears.
Figure 12. PLS USB JTAG Adapter for SPCxxx A & B
10/18
7. To enable the COM port, right click on “PLS USB JTAG Adapter for SPC5xxx B” (only this post) and then click on “Properties”. A new window pops up: select the tab
DocID028317 Rev 1
UM1947 SPC56P-Discovery USB drivers installation guide
“Advanced” then flag the “LOAD VCP” (Virtual COM Port) box. This item should be already flagged, leave it as it is.
Figure 13. PLS USB JTAG adapter property
8. Click OK button to continue.
9. Disconnect the USB cable from the SPC56P-DISP and reconnect it.
10. A COM port is detected and a new driver automatically installed. From the Device
Manager window check the new COM port available .
Figure 14. COM port
Note:
11. The COM port is now available on the SPC56P-DISP and the USB on the board can be used for serial communication with the PC.
Once the USB cable is connected, either at points 3 or 9 of the procedure above, should
Windows not automatically install the drivers, the manual installation is still possible using the path “…\JtagUsbDriver\driver”.
DocID028317 Rev 1 11/18
16
Labview driver installation guide
5 Labview driver installation guide
UM1947
The L9942 GUI can be used Stand Alone, without a Labview license, by installing the free
Runtime Engine for Labview 2013 and the VISA Runtime 5.4.
12/18 DocID028317 Rev 1
UM1947
6
How to load the FW on SPC56P-DISP
How to load the FW on SPC56P-DISP
In order to use the L9942 GUI the SPC560P-DISP must be programmed with a dedicated
Firmware (named “GP-Pictus.elf”).
1.
Start UDE Visual Platform 4.0x.
2. Create a new Workspace for SPC56P-DISP. Click File>New Workspace
Figure 15. New Workspace for SPC56P-DISP (part 1)
3. Name the new Workspace i.e. Pictus then select OPEN
Figure 16. New Workspace for SPC56P-DISP (part 2)
4. Select “STM Pictus Evaluation Board with SPC560P50 (SPC5 UDE/STK)” then click
OK
DocID028317 Rev 1 13/18
16
How to load the FW on SPC56P-DISP UM1947
Figure 17. STM Pictus Evaluation Board with SPC560P50 (SPC5 UDE/STK)
5. UDE Visual Platform 4.0 is refreshed and new functionalities available.
Figure 18. UDE Visual Platform 4.0 (part 1)
14/18
6. Click on “Load Program”, browse to find the file “GP-Pictus.elf “, click “Open” and in the next windows click on the button “Program All”
DocID028317 Rev 1
UM1947 How to load the FW on SPC56P-DISP
Figure 19. UDE Visual Platform 4.0 (part 2)
7. The procedure starts and its status is shown in a new window.
Figure 20. UDE Visual Platform 4.0 (part 3)
8. When the procedure is terminated click on “Exit” on all windows. The program procedure is finished and the SPC56P-DISP is ready to be used with the Graphical
User Interface (GUI) for L9942.
DocID028317 Rev 1 15/18
16
How to load the FW on SPC56P-DISP
Figure 21. UDE Visual Platform 4.0 (part 4)
UM1947
16/18 DocID028317 Rev 1
UM1947
Date
24-Sep-2015
Table 1. Document revision history
Revision Changes
1 Initial release.
Revision history
DocID028317 Rev 1 17/18
17
UM1947
IMPORTANT NOTICE – PLEASE READ CAREFULLY
STMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, enhancements, modifications, and improvements to ST products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on
ST products before placing orders. ST products are sold pursuant to ST’s terms and conditions of sale in place at the time of order acknowledgement.
Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or the design of Purchasers’ products.
No license, express or implied, to any intellectual property right is granted by ST herein.
Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product.
ST and the ST logo are trademarks of ST. All other product or service names are the property of their respective owners.
Information in this document supersedes and replaces information previously supplied in any prior versions of this document.
© 2015 STMicroelectronics – All rights reserved
18/18 DocID028317 Rev 1