cancel
Showing results for 
Search instead for 
Did you mean: 

porting the USB-FS-Device-Driver examples to STM32L-Discovery board

vicki19880929
Associate III
Posted on July 25, 2013 at 00:09

Hi all,

I'm a newbie in microcontroller.  Currently I'm trying to play with the USB library STM provides to work on the STM32L-Discovery board.  I know that the library does not have examples for the discovery board directly, so what I'm thinking is trying to modify the easiest example. I guess the easiest one would be the joystick... still pretty large project for a starter like me tho :(

First, I built the usb-joystick project which targets at STM32L152-EVAL board with MDK-ARM Keil-Lite IDE and tried to port it into my STM32L-Discovery board.  The code is downloadable and my Windows can detect an ''unknown device'' plugging to my laptop.  (USB-DM and USB DP is connected to my USB port).  

My first question is that why does my device manager not recognize the device name that is defined in the descriptor?  Is it because I haven't modified the code targeting to discovery board?

My second question is that, is there any easier example out there that give a tutorial of how to write the USB driver code?  The joystick example is really huge and I've been stuck researching it for a week.  What I tried to do is basically modifying some defined macro, but seems like it didn't make any difference.  Device manager still showed ''unknown device detected''.  I guess I must miss something there so I'd like to look for easier example.  :(

Thanks a lot.

V.

1 REPLY 1
crt2
Associate II
Posted on July 25, 2013 at 09:21

USB is not really the protocol to start with unless you really really know how it works (did you read the documentation?). I would start by checking if pins you're using to transfer stuff out of discovery board are differently set in EVAL board (some resistors or capacitors on them, or missing). That could cause data distortion problems (which triggers quite common error in Windows)...