cancel
Showing results for 
Search instead for 
Did you mean: 

USB transfer

cyril2399
Associate II
Posted on June 06, 2011 at 17:11

Hello,

I want to do a USB transfert from my computer to an USB.

I am working with IAR embedded workbench with a stm32f107vct6.

All the examples given with the software can't help me because it is for doing a USB mouse...

Is there anybody who can help me for this? (functions or everything)

thanks to all
8 REPLIES 8
cyril2399
Associate II
Posted on June 07, 2011 at 15:46

I have found these 4 .txt.

in the GPIO it's for all the ports

in usb hw it's for all the init, reset etc.. of the usb

in usb buffer it's for prepare and send as they say.

in flahs it's for write data

I want to create a file into my flash memory and transfert it to an usb device (with D+ and D- at PA10 and PA12). I want to see the st.txt into my usb device.

Could someone just have a look on the attached file, for helping me to know if i can use this?

If yes please tell me how.

Thanks to all

________________

Attachments :

fonction.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0b9&d=%2Fa%2F0X0000000bax%2FOnQZot8GfXCOO99.3A1.PThDkDdEAQrOqxDIm1H3AxA&asPdf=false
dtnaik26
Associate II
Posted on June 07, 2011 at 18:12

Hello ,

You need Mass storage example for this.

Pls download the ''STM32F10x and STM32L1xx USB full-speed device library'' from below link. Refer Mas storage example. You can find this for different compiler. For IAR also they have provided the mass storage exmple. Pls read the ''readme.txt''.

You will find the full firmware here. This will help you to resove your problem.

http://www.st.com/stonline/stappl/resourceSelector/app?page=resourceSelector&doctype=FIRMWARE&SubClassID=1169

Posted on June 07, 2011 at 19:08

He said he wants to transfer the data

to

   a USB Device - which would mean that his application must be a USB Host.

If that's what he really means, then the Mass Storage example will be no use...

dtnaik26
Associate II
Posted on June 09, 2011 at 18:12

if USB host is the requirement then pls go through the below link.

http://www.st.com/stonline/stappl/resourceSelector/app?page=resourceSelector&doctype=FIRMWARE&SubClassID=1169

USB host firmware is available for STM32F107 controller .

cyril2399
Associate II
Posted on June 14, 2011 at 11:18

Ok thank you all.

If I have well understand I must use my MCU as a Host and the USB key as a device...

I will have look on it...
Posted on June 14, 2011 at 14:03

''I must use ... the USB key as a device''

 

Yes, you must - you have absolutely no choice whatsoever in that matter.

Given that the USB Key has to be the Device (''slave''), it follows directly that your MCU must be the Host.

cyril2399
Associate II
Posted on June 16, 2011 at 13:45

ok it's clear.

I have look the USB host and there is a function call:

/* Host Task handler */

USBH_Process();

I have attached what it does. I don't understand what this do.

And for my problem if I have to use something in it or adding something else (that I actually don't know)

________________

Attachments :

usb_process.txt : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0b4&d=%2Fa%2F0X0000000bav%2FopHoHXAsfvQZ0awczquKTEpjjUQFoRJcLjMLIQ9JU3U&asPdf=false
vikas_sinha75
Associate II
Posted on July 06, 2011 at 08:19

Hi,

As mentioned in above mentioned post if you want to send some data from your device to PC you have to be in host mode. If you do not want to make a host device. the CDC class (V com port example) can also be help. You can try it. Its example available at

http://www.st.com/stonline/stappl/resourceSelector/app?page=resourceSelector&doctype=FIRMWARE&ClassID=1734

and install the required driver from

http://www.st.com/stonline/stappl/resourceSelector/app?page=resourceSelector&doctype=SW_DRIVER&ClassID=1734