02-05-2018 09:39 AM
Hello Everyone!
I am trying to connect a STM32F401 via USB. Using other terminals the communication works fine. Now i want to implement it in LABVIEW 2017.
I started with installing the device driver from the ST for Virtual COM Port
In the device manager everything seems to work fine. But there is a problem accesing the device using MAX or VISA.
It is not possible to open VISA Testpanel. Error Code reads as follows
Error opening resource:
ASRL5::INSTR
VISA: (Hex 0xBFFF0000) unknown systemerror (several errors).
Using the VISA driver wizard i got the message that the drivers are already installed porperly.
Using WIN10 64 bit
Labview 2017 32 bit
MAX 17.0
Any suggestions on how to continue? Can it be possible to acces the port in LABVIEW without having a proper VISA setup?
Thankful for any suggestion, Gu
04-10-2018 06:37 AM
Hi,
did you walk through the forum discussion here? https://forums.ni.com/t5/LabVIEW/Reasons-for-Error-code-in-viWrite-0xBFFF0000/td-p/2101734
The error code is the same, and there are some suggestions how to proceed.
A proper VISA setup is mandatory for LabVIEW usage, as it works on the VISA drivers (ignoring stuff like self-written FPGA-based solutions).
Greetings
Stefan
10-24-2018 11:27 PM
Hello GL_HEI,
I faced the same problem. the problem is in two parts.
First of all you should use the last BSP package for configuring the STM board. I am using stm cube with package stm32cube_fw_f3_v1.10. in addition update your compiler to the last version (as example Keil v5.26).
Give the USB driver in STM a proper time to configure as follow
MX_USB_DEVICE_Init();
/* USER CODE BEGIN 2 */
HAL_Delay(2000);
Now in labview you will find your usb appear in NI MAX without any problem.
Notes
Update your NI VISA to the version 18 and installed driver.
Good Luck
Ibrahim I. N.
11-22-2018 09:17 PM
I use System Workbench for STM32 and I did everything as you said.
I download latest version of BSP for my F4 board and also added HAL_Delay(2000).
Unfotunely for me the problem still occurs.
03-15-2019 10:24 AM
Hi Kamil,
Did you ever resolve this issue? I am having the same problem.
03-15-2019 11:13 AM - edited 03-15-2019 11:14 AM
I think the problem is with windows 10 default COM port driver. I was able to properly connect STM32 via USB on windows 7. To do so you just need to install driver for USB stm32 from ST company website.
10-01-2019 09:25 PM
I have been having a problem like you have described above and wanted to "bump" this post to see if anyone has been able to make any progress with this. With windows 7 going EOL that is not going to be a suitable option soon.
I am using an STM32F446RE running on System workbench and STM32Cube with everything updated to the latest versions. I have just updated to NI-Visa 18.5 but not having any luck.
10-10-2019 01:25 AM
I managed to get a response on the ST forums if any one comes across this in the future.
In your STM32 code look in usbd_cdc_if.c for CDC_SET_LINE_CODING and CDC_GET_LINE_CODING cases. There needs to be code to save the settings from the "set line" command, and return those saved settings in the "get line" command. Most HAL libraries don't have that code. If you search the forums for CDC_SET_LINE_CODING you should find examples of this. There is a USBD_CDC_LineCodingTypeDef in usbd_cdc.h that defines the data used in these commands.