2017-01-30 10:21 AM
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
- 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 messageI checked to see if what recognised by Ubuntu / Linux. It is not
Am I missing something?
#cdc #stm32 #usb #vcpSolved! Go to Solution.
2017-02-01 09:33 AM
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.
2017-01-30 12:26 PM
Hi, did you find the soln to this problem?
2017-01-30 01:24 PM
Hel
lo,
Maybe the problem is due to heap and stack memory sizes defined in startup file.
Try to increase the heap and stack size and p
lease keep me updated on the progress.
Regards
Imen
2017-01-30 01:34 PM
Back again.
Imen D is right. For those in IAR the heap and stack sizes are sorta hidden.
Project ->Options ->Linker and then edit the linker configuration.
Change 200->2000
400->4000
This worked for me! I am so excited I have been working on this for over a week.
-Jen
EDIT: I am attaching the PDF that helped me out
________________ Attachments : Data exchange between STM32F411 and PC using USB.pdf : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hyxw&d=%2Fa%2F0X0000000bEU%2F7lvhMVuDIiZFx_j98IXzhFSfhsOYzVvbwy0rD0kHNLk&asPdf=false2017-01-30 03:27 PM
Hi
flowersnlyrics
,I'm happy to see
that my suggestion has been useful for you and
your problem is resolvedI want to thank youfor sharing your experience in the attached pdf, this will be helpful forusers forum.
Thanks
Imen
2017-01-31 05:16 AM
Hi,
So no luck for me...
I have increased the stack size 400 to 2500 (the max before non-compile), heap 200 to 2000. I cant increase the stack to 4000 (as per Jennifer D's tip) - it doesn't compile after this 2500.
Im using the free STM32 provide Keil offer. Could this somehow play a part? Is there a chance it is compilation size limited?With these settings still same: not recognised.
Also the 4 leds (ld1, ld2, ld3, ld4) are all flashing about about 2hz (incase that helps debug)
Any chance somebody at ST could get this working on the ST32F072-EVAL?
Thanks
2017-01-31 06:13 AM
Hi,
In my case (simple USB CDC project I made myself on a Nucleo-64 board), Linux would not enumerate the device.
The solution was the trick on p. 7 of the PDF referenced by Jennifer : edit usbd_conf.c and change
hpcd_USB_OTG_FS.Init.vbus_sensing_enable = ENABLE;
to :
hpcd_USB_OTG_FS.Init.vbus_sensing_enable = DISABLE;
Yet, I did disable VBUS sensing in CubeMX. Is it a bug in the code generation ?
I'm using CubeMX v4.18.0 (last version v4.19 won't work at all).
2017-01-31 07:53 AM
I've also tried to do this:
The solution was the trick on p. 7 of the PDF referenced by Jennifer : edit usbd_conf.c and change
hpcd_USB_OTG_FS.Init.vbus_sensing_enable = ENABLE;
to :
hpcd_USB_OTG_FS.Init.vbus_sensing_enable = DISABLE;
but this line or similar doesn't seem present in the version of usbd_conf.c in my project folder. I also did a grep search for that string in the project folder - nothing found for 'vbus'.
(file from)
STM32Cube_FW_F0_V1.7.0\Projects\STM32072B_EVAL\Applications\USB_Device\CDC_Standalone\Src\usbd_conf.c
2017-01-31 08:19 PM
Hi Chendy. I think we recall your name from the XMOS forum:) We have the same STM32F072-EVAL board in the lab and did get the full CDC_EXAMPLE (supplied by ST) working.
See AN4735: STM32Cube firmware examples for STM32F0 Series -> page
The supplied code (not Cube generated) works fine - we have tested against a SiLabs USB bridge to confirm the assorted baud rates and they did sync fine with each other (CMOS to CMOS wiring).
Are you using the 256k license from ST ?
2017-02-01 03:10 AM
Hey Chendy. Let us review the same procedure upon reaching the office. Up a bit early here and will be in the office in about 4 hours from now. At the very least, we should be able to generate a compiled binary for you to test.
Any reason why you cannot use the CDC_EXAMPLE for the STM32F072-EVAL ? It is complete and will perform even better than the STMCube generated code. That is, if you wish to alter the baud rates or line settings of the virtual UART, the STMCube code will not allow for this and is left as an exercise for the reader.
I would think that the compiler you have is fine for this example but again will confirm details once reaching the office. In the meantime, just import the complete project created for your (rather expensive) STM32F072-EVAL board. We brought in this same tool just for the CDC_EXAMPLE code so we can study how it works. Very nice to be able to just import -> compile -> test (without issues).