Topic : USB Sample programs

Forum : ARM

Original Post
Post Information Post
October 8, 2007 - 2:09am
Guest

Has Raisonance ported the ST USB example programs to the RIDE environment? In particular the USB-CDC example?

Thanks,
Erik

Replies
Post Information Post
+1
0
-1
October 8, 2007 - 4:30pm
Guest

Hi Erik,

what family are you wroking on more precisely ? I ported the USB Virtual COM Port demo for the STR750. Is it what you're searching for ?

regards
Lionel

+1
0
-1
October 9, 2007 - 2:07am
Guest

Alas, the STR71x. Specifically the STR711. Should be close to the STR75x, no?

Thanks,
Erik

+1
0
-1
October 24, 2007 - 6:07pm
Guest

Hi
Could I have that software? I'm trying to use the USB interface in a STR750 and It could be a geat help.
Thanks in advance.

+1
0
-1
November 1, 2007 - 10:48pm
Guest

I'm attempting to build the ST USB Development Kit demo projects for the SMT32 Primer. I've downloaded the latest version of the source code from ST and they include RIDE7 projects for each of the examples. Each project fails to build when the "dwf2xml.exe" program crashes. I would give you the command line from the "Build Log" but I am unable to copy & paste it here for some reason.

Any ideas?

Thanks,

Dale Wheat

+1
0
-1
November 7, 2007 - 5:32pm
Guest

lionel wrote:
Hi Erik,

what family are you wroking on more precisely ? I ported the USB Virtual COM Port demo for the STR750. Is it what you're searching for ?

regards
Lionel


Hi Lionel,

I wish to acquire data from sensors connected to ADC I/O of a STR750F Reva board into my laptop. Can I use your USB Virtual COM Port demo in such a case ? Can I get your file ?

Thank you.
Marco

+1
0
-1
November 7, 2007 - 6:05pm
Guest

Yes, you can use it as a basis. It is quite interesting because it emulates a serial port, so it's an easy way to retrieve and display data.
The best would be to redirect the read/write functions assigned to the UART of the STR750 to appropriate routines making use of the ADC instead.
Then the USB configuration can be kept.
As a result, you connect the USB of your STR750 to your PC and a virtual COM port is assigned: all you have to do is open a Terminal software like HyperTerminal, configure it to use the virtual COM port and see the values flow into the terminal screen !

I will send you the project.

regards,
Lionel

+1
0
-1
February 5, 2008 - 4:23pm
Guest

Hi all,
Someone tried successfully USB Virtual COM Port sample? I have Reva Starter Kit and I tried USB sample from ST USB Development Kit but my problem is in this point:

while (pInformation->Current_Configuration == 0) NOP_Process ();
     bDeviceState = CONFIGURED;

in Virtual_Com_Port_init() function. It's remain locked in this point because pInformation->Current_Configuration is always equal to 0. Who knows how can I solve this problem?
The only change I have made was the PLL config in Set_System() function to work with on board 4MHz oscillator and RCCU_Main_Osc define. I must change something else?

Thanks
Daniele

+1
0
-1
February 21, 2008 - 4:54pm
Guest

Hi dan,

The usb clock must be 48MHz. You must change the PLL:
-if you use HSI : RCC_PLLConfig(RCC_PLLSource_HSI_Div2, RCC_PLLMul_12);
-if you use HSE : RCC_PLLConfig(RCC_PLLSource_HSE_Div1, RCC_PLLMul_12);

It ok for STM32 . The problem can be similar for you STR.

+1
0
-1
February 21, 2008 - 5:03pm
Guest

Hi,

I have copy the ST DFU exemple. The micro is acknowledge by PC but when I try to reprogram STM32F103, I have an unexpected error. The flash size is more important that the program. Are you a single example you run on Reva board (STM32F103B)?

Thanks

+1
0
-1
February 27, 2008 - 2:33pm
Guest

Hi boubou,

Thanks for your answer. Anyway I tried to change the PLL config in Set_System() and Set_USBClock() functions with both configuration, but I had always the same problem. Maybe I make changes in other place? I'm not tried more than one example at a time.

Thanks a lot anyway.
Dan

+1
0
-1
February 27, 2008 - 3:26pm
Guest

Hi Dan,
I have forgot another configuration : RCC_USBCLKConfig

if PLL = 72 MHz
RCC_USBCLKConfig(RCC_USBCLKSource_PLLCLK_1Div5); //USBCLK = PLLCLK / 1.5 = 48MHz
RCC_APB1PeriphClockCmd(RCC_APB1Periph_USB, ENABLE); //Enable USB clock

if PLL = 48Mhz (in your case with a 4Mhz HSE)
RCC_USBCLKConfig(RCC_USBCLKSource_PLLCLK_Div1); //USBCLK = PLLCLK / 1 = 48MHz
RCC_APB1PeriphClockCmd(RCC_APB1Periph_USB, ENABLE); //Enable USB clock

If you use DFU example, this commande is in Set_System()

+1
0
-1
March 3, 2008 - 4:28pm
Guest

Hi boubou,

Finally it work :-D
I trash the project and I reopen it from the original zip package, then I change only the PLL config line, without replace the code with the library functions.

For anyone that want to play this demo with REVa Starter Kit, the changes I made are:
RCCU->PLL1CR = ( Tmp & ~0x7 ) | RCCU_Div_1 | 0x40; //old line RCCU->PLL1CR = ( Tmp & ~0x7 ) | RCCU_Div_2 | 0x40;
in Set_System() function;

PCU->PLL2CR = 0x81D0; //uncommented in Set_USBClock() function

Both of them are in hw_config.c file.

Thanks a lot!

+1
0
-1
May 24, 2012 - 2:38am
Guest

Sorry to bring an old thread back to life, but I found the following posts via a Google search:

lionel wrote:
I ported the USB Virtual COM Port demo for the STR750. Is it what you're searching for ?

regards
Lionel

lionel wrote:
...you connect the USB of your STR750 to your PC and a virtual COM port is assigned: all you have to do is open a Terminal software like HyperTerminal, configure it to use the virtual COM port and see the values flow into the terminal screen !

I will send you the project.

regards,
Lionel

I hope Lionel is still reading this forum, because I too would like to request a copy of his Virtual COM Port Demo for the STR750 for use with our STR750F Reva board.

So, Lionel, please if you happen to see this message, I hope you can help. Thanks in advance :)

+1
0
-1
May 24, 2012 - 9:18am
Raisonance Support Team

Hi,

This example is now part of the software install.
Just install the latest versions of Ride7 (7.38) and RKit-ARM (1.38), and you'll find it here:
\Examples\ARM\REva\STR75X_VirtualComPort\...

(Lionel does not work here anymore)

Best Regards,

Vincent

+1
0
-1
May 30, 2012 - 2:44am
Guest

Hi Vincent,

Thanks for your reply.

I found the Virtual COM port sample, and successfully loaded the project file, did the build, loaded the output hex data into STR750, and got the miniUSB connected to a Windows XP computer (via the provided Virtual COM port driver).

Then I was able to launch a HyperTerminal session for the Virtual COM port. Next, I connected SER1 (on Reva mother board) via serial cable to a 2nd computer, then launched a HyperTerminal session for it.

So the link is basically as follows:

(Computer 1) <-> virtual COM port/miniUSB <-> Reva STR750 daughtercard
<-> Reva STR750 mother board <-> SER1/COM port <-> (Computer 2)

When keyboard input is entered into HyperTerminal on Computer 2, the keyed data emerges in HyperTerminal on Computer 1.

However, when keyboard input is entered into HyperTerminal on Computer 1, the keyed data does not emerge in HyperTerminal on Computer 2.

This indicates that TX on the virtual COM port side is not working, but RX is okay.

Has anyone else here observed the same?

Thank you very much for the help and support given through this forum.

Regards,
Mark