cancel
Showing results for 
Search instead for 
Did you mean: 

Getting USB to work with PC

sarling
Associate II
Posted on March 18, 2009 at 17:48

Getting USB to work with PC

3 REPLIES 3
sarling
Associate II
Posted on May 17, 2011 at 13:06

Hi,

I have a little difficulties getting STM32 USB to work with my software I have developed on my PC. I can read from the STM32 board but I can't write to it (network access is denied). I'm new to USB development since I have always used RS232. The software on my PC is written in Java with the JCommUSB API, on my STM32 I use ST's USB firmware for USB HID (

http://null

).

When I read from the board it's like it's always sends data, which I don't want. I would like to poll the STM32 for data. I'm trying to understand the USB protocol but it's not easy. Do you know of some example code, perhaps something you have written yourself that you could share? Also, the current setup in the example code seems to send one byte, i.e. unsigned char, I would like to send several bytes at a time. If you could give me a push in the right direction I would be thankful.

/Mattias

bbowling
Associate II
Posted on May 17, 2011 at 13:06

You are light-years ahead of me, I have been trying just to get the Custom_HID example to be recognized by the PC at all. Were you ever able to get the demos working (HID)? I am using IAR toolset, they also include demos that do not work.

For your Java setup, have you looked at the lvr.com site? I have the VCPP demo app working, and other HID devices I can interrogate with this. May be worth looking at for your Java end (I can send the VCPP one I have to you if you like).

- Bruce

sarling
Associate II
Posted on May 17, 2011 at 13:06

Yes the demos are working, but the VC++ code is immense, I'm having a hard time following it. I'm in contact with icaste.com's support and see if they can help me. BTW I have Keil's MCBSTM32 dev board. I master Java but VC++ is not my thing, tried to debug the demo, but I was lost after the first call.