/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / um0424 virtual usb demos don't work on stm32primer

Username:     
Password:     
             

Forum

# 1   2008-04-18 18:52:45 um0424 virtual usb demos don't work on stm32primer

jens8051
New member
From: Zetel, Germany
Registered: 2008-04-15
Posts: 3

um0424 virtual usb demos don't work on stm32primer

Hello all,
I can compile and run the usb demos from st, but none of them works. When i plug the usb cable into the primer, windows xp shows the message "USB device was not recognized". The circle os based virtual comport demo from this forum "PrimerVirtualCom-1.1" works fine, but I don't want to use a os based aplication. Has anybody an idea what I must change to run the demos on the stm32primer?
Best regards
Jens

Offline

 

# 2   2008-04-19 16:40:05 um0424 virtual usb demos don't work on stm32primer

Stewee
Member
From: Dorset/England
Registered: 2007-10-11
Posts: 47
Website

Re: um0424 virtual usb demos don't work on stm32primer

Hi Jens8051

Differences.
1. STM32f103b-eval  'USB_Disconnect' uses pd9(output=high) to disconnect usb via software.
   [refs a,b,3]
   The stm32 Primer 'USB_NCON'       uses pb12(input=high) to detect usb disconnect [refs b,c]
   ( It maybe interesting to configure pb12 as a low-output to disconnect a Primers USB thru
    software.   To reconnect you would reconfigure pb12 as as an input).

2. The STM32f103b-eval has a built-in rs232 driver chip connected to UART1
   The STM32 Primer has no RS232 driver chip on UART1 so it cannot be connected
   to a PC without modification.

3. The STM32f103b-eval uses the 100 pin STM32f103 package.
    The STM32  Primer uses the 64 pin package with no port pd9!!

References;
   a) http://www.st.com/stonline/products/lit … /13472.pdf p14 USB and JP1,
       p31 schematic of USB
   b) google for Usb-in-a-nutshell.pdf see section: Speed Identification. page6 para1.
      1.5k pullup on usb+ (also called usb_dp) indicates to host that a usb device
       (hi speed) is connected
   c) get the stm32 primer schematic in the RESOURCES section of this site using the
       Resources button at the top of all pages
   

I will check this and edit this post accordingly.
Stewee

Last edited by Stewee (2008-04-20 04:28:35)


( Please Give Blood http://www.blood.co.uk >50% can.  5% do. )

Offline

 

# 3   2008-04-20 08:32:24 um0424 virtual usb demos don't work on stm32primer

jens8051
New member
From: Zetel, Germany
Registered: 2008-04-15
Posts: 3

Re: um0424 virtual usb demos don't work on stm32primer

Hi Stewee,

thank you for your help. I am new to the STM32 family and to USB, so I have to learn many things these days. My goal is to write a stand alone application which uses a virtual comport. First I'll have a look at your references. Any further help is welcome.
Jens

Offline

 

# 4   2008-05-13 10:50:50 um0424 virtual usb demos don't work on stm32primer

jens8051
New member
From: Zetel, Germany
Registered: 2008-04-15
Posts: 3

Re: um0424 virtual usb demos don't work on stm32primer

Hello, now I've the solution. To use the virtual comport demo from the application note um0424 change the following things:

1. in hw_config.c -> set_system()

    change

    /* PLLCLK = 8MHz * 9 = 72 MHz */
    RCC_PLLConfig(RCC_PLLSource_HSE_Div1, RCC_PLLMul_9);

    to

    /* PLLCLK = 12MHz * 6 = 72 MHz */
    RCC_PLLConfig(RCC_PLLSource_HSE_Div1, RCC_PLLMul_6);

2. For a correct USART Baudrate in stm32f10x_conf.h
   
    change

#define HSE_Value    ((u32)8000000) /* Value of the External oscillator in Hz*/

to

#define HSE_Value    ((u32)12000000) /* Value of the External oscillator in Hz*/


Best regards
Jens

Offline

 

# 5   2008-05-15 23:00:41 um0424 virtual usb demos don't work on stm32primer

Rayman
New member
Registered: 2008-03-31
Posts: 6

Re: um0424 virtual usb demos don't work on stm32primer

I'm glad you got it working 'cause I want to try that soon too!

PS:  Do you see any way to get a DTR signal this way?  I've looked a bit and it doesn't look easy...

Offline

 

# 6   2008-10-03 11:53:37 um0424 virtual usb demos don't work on stm32primer

Stewee
Member
From: Dorset/England
Registered: 2007-10-11
Posts: 47
Website

Re: um0424 virtual usb demos don't work on stm32primer

Can somebody at Raisonance or elsewhere kindly confirm how USB_NCON (PB12) was originally supposed to be used.

Was pb12  to be used as an output to disconnect the device by sending it low.

Or Was pb12 always meant to be an input to test if the STM32 USB was connected to a host?

Or was it intended to used both ways?

The primer mouse project does not seem to use it, and if I remember correctly the documentation expressed regret that there was no Disconnect feature like on the STM3210B-EVAL. Yet surely configuring pb12 as a low output for a few seconds might disconnect the device and cause a re-enumeration when re-configured as an input.

The STM3210B-EVAL Pd9  USB_Disconnect clearly is intended to be an output to disconnect (and reconnect). It is clearly a requirement. It is clear why you would want it.

Last edited by Stewee (2008-10-03 13:13:03)


( Please Give Blood http://www.blood.co.uk >50% can.  5% do. )

Offline

 

Board footer