cancel
Showing results for 
Search instead for 
Did you mean: 

STM32072B-EVAL + STM32Cube: unmodified USB VCP example not recognised properly

sseveelavanan9
Associate II
Posted on January 30, 2017 at 19:21

I'm using this example

STM32Cube_FW_F0_V1.7.0\Projects\STM32072B_EVAL\Applications\USB_Device\CDC_Standalone

Which should simply present a VCP in Windows/Linux, after the drivers are installed (for Windows): 

http://www.st.com/en/development-tools/stsw-stm32102.html

 

For the setup, I do the following

- ''For power supply from USB (CN4) to STM32072B-EVAL only, JP19 is set..'' - from

http://www.st.com/content/ccc/resource/technical/document/user_manual/63/18/cb/de/57/a6/45/17/DM00104135.pdf/files/DM00104135.pdf/jcr:content/translations/en.DM00104135.pdf

- link TX / RX for loop-back using jumpers (but not important I just want the device to be recognised for now)

- connect a standard USB cable from CN4 USB port to my computer. The cable is fine, as I also use this one connected to CN13 for programming via ST-Link.

I get this unhappy message0690X00000606BxQAI.png

I checked to see if what recognised by Ubuntu / Linux. It is not

Am I missing something?

#cdc #stm32 #usb #vcp
17 REPLIES 17
Posted on February 01, 2017 at 12:02

hi yes its me from XMOS : )

completely unmodified example from STM32CubeF0?

So you did not have to change the heap and stack size? vbus stuff? 

0690X00000606BTQAY.png

Is this a suitable license? 

Posted on February 01, 2017 at 12:20

Hi Bhatia, Great, thanks for your help... 

Any reason why you cannot use the CDC_EXAMPLE for the STM32F072-EVAL?

I thought I was?? I dont want to auto generate code. I want a basic working VCP, ideally from an unmodified ST provide example. see my OP:

I'm using this example

STM32Cube_FW_F0_V1.7.0\Projects\STM32072B_EVAL\Applications\USB_Device\CDC_Standalone

^ this is the examples referred to as STM32CubeF0 examples in AN4735, right?

Posted on February 01, 2017 at 12:29

My apologies. Correct - that is the same code we compiled with success. We do not recall any special tweaks to compile this supplied project but it was last week so may me missing some simple detail. Will confirm once at the office.

Your Device Manager tree looks busy with Jungo (good ole Jungo - great s/w) -> can you expand and review your USB tree to be sure that you do not have a stale STM device driver being mapped for this VCP device ? For us, we found that the Total Phase tools were stealing our links because they also use STM processors for DFU. Just be sure that you do not have another widget already installed with the STM drivers. What are the details of your STM device driver ?

Silly request but can you confirm your TARGET CPU matches the details for the STM32F072-EVAL board ? (ie. CPU number & package)

Posted on February 01, 2017 at 16:47

Silly request but can you confirm your TARGET CPU matches the details for the STM32F072-EVAL board ? (ie. CPU number & package)

yep matches up, no problems here it seems

So, I tested the whole example again from fresh, on a pretty much fresh computer (theres defiantly nothing ST related installed):

1. I downloaded a fresh

https://my.st.com/content/my_st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-embedded-software/stm32cubef0.license%3d1485958572460.html

2. I installed the

http://www.st.com/en/development-tools/stsw-stm32102.html

, including these steps (this second laptop is windows 10 64bit, there was no windows 10 option tho. And my main computer I have been using for the discussion here is Win 8.1):

 3- Go to Your installation directory - Example, C:\Program Files (x86)\STMicroelectronics\Software\Virtual comport driver

4- Go to Your OS version directory ([Win7] or [Win8])

+ Then :

- Double click on dpinst_x86.exe if you are running a 32-bits OS version

- Double click on dpinst_amd64.exe if you are running a 64-bits OS version

+ Follow the instructions.

3. set the power source jumpers on JP19 so powered from CN4.

4. still the problem : (

0690X00000606CRQAY.png

UPDATE:

5. tested on mac osx, works fine. loopback test working.

6. tested on ubuntu linux. works fine. loopback test working.

-----

So, is the STM32 VCP driver supposed to work on windows 8.1 or 10?

Posted on February 01, 2017 at 17:33

Hey Chendy. Ok, downloaded a fresh copy of the same source code -> imported the CDC_EXAMPLE project -> compiled and tested on our same target board (STM32F072-EVAL). Also initially noted the yellow bang (screens are attached) and reviewed the following important steps:

1) be sure that the USB cable for the ST/LINK is connected - this powers the kit

2) then dock the cable for the USB interface to perform the CDC emulation. Also right-click the current yellow bang mark and select UNINSTALL AND check the box to delete the driver. This will force a fresh start for your device driver links.

3) Install the VCP driver using the installer package supplied with the 1.4.0 VCP driver package (yours appears to be the same but included in our download as well).

4) A compiled HEX file is also posted in this download for your testing.

Curious to hear about your results.

BTW - Any chance you a virus protection s/w running in the background that may be halting this installation ?? Known to happen and be sure you have admin rights.

https://axxonshare.s3.amazonaws.com/STM32F072-EVAL/STM32F072-EVAL_CDC_EXAMPLE.zip

Update:

1) We are on Win7 x64 - have not yet tested on Windows 8.x nor 10. According to the readme - should work fine on Windows 8.x

2) Tested with the power jumper for CN4 - works fine using a single cable to power the eval kit.

Posted on February 01, 2017 at 18:47

hi again,

I tried this:

...

2) then dock the cable for the USB interface to perform the CDC emulation. Also right-click the current yellow bang mark and select UNINSTALL AND check the box to delete the driver. This will force a fresh start for your device driver links.

3) Install the VCP driver using the installer package supplied with the 1.4.0 VCP driver package (yours appears to be the same but included in our download as well).

4) A compiled HEX file is also posted in this download for your testing.

So some good news. It kind of works.

When I insert the USB, it has the yellow_bang. I then un-install then re-install (in admin mode) - with USB still inserted. It then *sometimes* correctly shows up, and works as a COM port. If I then remove the USB and re-insert the USB, it then shows the yellow_bang again always. I then have to do this loop again: un-install then re-install whilst still plugged in (which again only sometimes works).

Jinhui Lin
Associate II
Posted on February 18, 2017 at 15:10

It also works for me to expand stack & heap.

Change 0x200->0x500+

              0x400->0x500+

^_^!!!

Chip:STM32F746NGH

Version:[stm32cube_fw_f7_v160/stm32cubemx version 4.19.0/stm32cube v1.0]

Posted on March 23, 2017 at 13:18

Hi,

I'm using Nucleo F207ZG on ubuntu 16.04 machine , I'm trying to use USB_CDC .My problem is when i connect one usb cable for s-tlink is works good , but the usb cable which i connected with STM microcontroller it's not detect ..... I did hpcd_USB_OTG_FS.Init.vbus_sensing_enable = DISABLE; then also it not detect for me .... Pls give a proper solution

Thanks in advance