03-18-2020 03:24 AM - edited 03-18-2020 03:28 AM
Dear all,
I'm trying to automate programmation of microcontroller STM32F410 with ST-LINK/V2 programmer on LabVIEW, using VISA Library.
First, I've generated the ".inf" driver with NI-VISA Driver Wizard, signed and installed it. It's seems to be OK, because in Device Manager I can see that the STM32 moves from "Périphériques Universal Serial Bus" to "NI-VISA USB Devices".
-->
But impossible to see my device on MAX :
The device seems to be properly defined as VISA ressource, it is not yet accessible for the software STM32 ST-LINK Utility.
I've tried to uninstall and install again my driver, restart my computer, but impossible to see my programmer in MAX. I've do the same operation with another driver (SEGGER JLink Base Compact programmer), and all is in order.
I work with:
- Windows 10 Enterprise version 1903
- LabVIEW 2018 SP1 version 18.0.1f4 (32-bit)
- NI-VISA 19.5
- NI-MAX 19.5.0f0
Programmer information (driver)
- access path: USB\VID_0483&PID_3748\5&A6A6D4&0&2
- supplier: STMicrolectronics
- Vendor ID: 0x0483
- Product ID: 0x3748
Can someone help me with this programmer? Have I made Something bad?
Thank you per advance!
Solved! Go to Solution.
03-18-2020 03:49 AM
More iniformation… when I've generated the driver.inf file, I had an error when I've selected my device:
To solve it, I've choose "Other…" in the Device List and manually set Names and IDs.
Maybe this error can be the cause of my problem...
Thank you!
03-18-2020 04:12 AM
Why not use VISA for a normal serial port connection instead via the USB wizard.
The serial connection will also use the USB port if you have a USB to serial converter and you can use the normal serial commands at high speed anyway.
No need to do the low level USB programming yourself.
03-18-2020 04:25 AM
Hello Albert,
Thank you for your response. It's good idea, but I'm not sure to good understand...
I've usb to serial converters, but I use it to connect devices RS232 with DB9 connector to an usb port. Maybe you talk about a driver, like a "Virtual COM Port"? I Don't know if can do this with this programmer...
03-18-2020 06:36 AM
Hi
I checked now to see what the communication system really is and found this:
A problem will be next sentence on page 15
The ST-LINK/V2 requires a dedicated USB driver.
So you probably need third party software
Or the guy who already have done something like that
03-19-2020 03:04 AM
Hello,
I've asked ST some days ago, their advice was to use CLI version of ST-Link with a batch file called from LabVIEW. I know how to do a batch file, how to call it from LabVIEW but I've difficulties to link it with STM32 ST-Link Utility CLI... I've asked ST support again for help.
03-19-2020 05:05 AM
I've finally find the way to call CLI of ST-LINK from LabVIEW. It runs properly. I share the code, if somebody else need it...
Many thanks to Albert.Geven for the help!
Regards,
03-19-2020 05:16 AM
06-21-2020 10:35 AM
Hi Francis M
i am also developing the same application to automate the program flash into STM8S105X6 micro controller using ST link/V2.
can you please share the application VI.
and i have some more queries since i am new to this type of application.
Do i need STM 32 programmer with this or i can transfer hex file directly from LabVIEW application by ST link/V2?
Regards
Anuj S
06-22-2020 12:44 AM
Hi Anu S,
The vi I use to program my microcontroler is the one I've posted as solution (VI snipped). You can use it directly. The vi doesn't directly program the hex file, it call the commande line interface of STM32 (C:\Program Files (x86)\STMicroelectronics\STM32 ST-LINK Utility\ST-LINK Utility\ST-LINK_CLI.exe) and send instructions to do this --> STM32 ST-Link Utility has to be installed. It's like a scripting of ST Link instructions in command lines.
Regards,