cancel
Showing results for 
Search instead for 
Did you mean: 

USB OTG/Host driver for a custom/vendor-specifc USB device

marceldanilo
Associate II
Posted on May 21, 2012 at 15:16

Hi everyone!

I'm new to the STM32 world, so I'm looking for some concrete example that USB OTG application with a STM32 uC.

Did someone have sucess with a similar project that can be shared here?

If however you can advise me to guide me, I would be thankful.

15 REPLIES 15
marceldanilo
Associate II
Posted on June 27, 2012 at 21:39

I have got the ZIP file you cited - (it's 

http://www.4shared.com/zip/afqd65Wh/BDK_Download1.html

)

I used LeJOS language to communicate the Lego NXT to the PC;

There were two programs: A java applications running on the NXT and another Java app running in the PC;

I have ran two programs:

   1º - Download data into the NXT flash memory;

   2º - Data exchange between NXT and PC;

The results are in this 

http://www.4shared.com/folder/C6_tm4p_/USB_TRACER_RESULTADOS.html

. (Google Drive)

The NXT uses Fantom Driver for USB comm. Can I modify the STM32 MSD driver taking base on the Fantom? Could it be useful? (however, I still have no technical info about it)

Thank you very much, Tsuneo!

marceldanilo
Associate II
Posted on June 28, 2012 at 02:52

Inside the NXTGCCECLIPSE-project files I found the file

d_usb.c

. This file contains several USB device info;

Tsuneo, could you see this file? I think it can be useful. It's attached.

Thank you.

________________

Attachments :

d_usb.c : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0b0&d=%2Fa%2F0X0000000baz%2FhPRbZ4fXsibu2DL4SXSfFS72sJZD1r5ohYgD0R__nxc&asPdf=false
marceldanilo
Associate II
Posted on July 31, 2012 at 16:53

[replicating this

https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/ST USB Host releases - Generic Driver;&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&currentviews=84

- looking for some help]

  • Recently I have modified the MSC library to accept my device as a MSC device; So the STMF4 did the complete enumeration;
  • Second what I watched on a USB sniffer, after the device is ready, just Bulk transfers are performed; Tsuneo recommended this analisys, at[DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/USB OTG for custom an USB device&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&TopicsView=https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/AllItems.aspx?Paged%3DTRUE%26p_StickyPost%3D%26p_DiscussionLastUpdated%3D20120628%252003%253a22%253a38%26p_ID%3D23204%26View%3D%257bF47A9ED8%252dE726%252d42BE%252dACED%252d732F13B66581%257d%26FolderCTID%3D0x012001%26PageFirstRow%3D41&currentviews=212]this post;
  • The device has two endpoint bulk - like MSC devices;

  • Using BulkSendData I get a packet in the device side - I think it worked fine;

  • Using BulkReceiveData it doesn't work - However I have no ideia why the error occours. When I stop the degug, the program stop on interrupts routines, at the usb_hcd_int.c file. Is the host expecting something from the device? Can't the device response the host? I'm investigating about this currently.

If someone has some idea, please help me.

stormrush
Associate
Posted on July 27, 2013 at 02:56

stm32_nxt, were you ever able to get anywhere with this issue of yours? I am also working on a similar usb otg issue as you are. I am trying to communicate to a device via USB using a Bulk interface also.

rihab150192
Associate II
Posted on March 12, 2015 at 15:48

Posted on March 12, 2015 at 16:44

Hi i wanted to ask you if you have an idea about the porting netmf : i want to change the Oberon micro-system drivers(like usb, spi and i2c) from direct register access to hal layer to make it more portable but when i try to open the Oberon Library it is open with Block note, so i can find the declaration and the reference of many functions 

 

can you please help me to know how to open Oberon project with Keil 

 

and how can i migrate to the hal layer

 

Best regards,

 

Rihab.

Remember to top post your responses here.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..