cancel
Showing results for 
Search instead for 
Did you mean: 

can not detect olimex STM32-H107 Virtual Port

saimaddy123
Associate II
Posted on March 14, 2011 at 06:24

can not detect olimex STM32-H107 Virtual Port

4 REPLIES 4
tsuneo
Senior
Posted on May 17, 2011 at 14:27

Here is the schematic of Olimex STM32-H107 board

http://www.olimex.com/dev/pdf/ARM/ST/STM32-H107-schematic.pdf

Is R34 populated on your board?

The schematic shows it as NA

This resistor connects MCU PA9/OTG_FS_VBUS pin to the USB connector VBUS pin.

The OTG engine requires this connection to enable on-chip D+ pull-up resistor automatically at plug-in.

> the device is not detected on windows XP first

 

It suggests that the D+ pull-up resistor is not enabled.

So, I have doubt on the R34 resistor. 

Tsuneo

saimaddy123
Associate II
Posted on May 17, 2011 at 14:27

Tsuneo,

Thanks for the reply,, You are right R34 is not populated. But, D+ pull-up resistor is connected to PA12 of MCU. I am setting this GPIO pin so that D+ pull-up resistor is enabled. Still, I could see that the device is not getting detected...

Is n't it the case that we can drive it without R34 also?

Thanks,

Sai

tsuneo
Senior
Posted on May 17, 2011 at 14:27

> But, D+ pull-up resistor is connected to PA12 of MCU.

This OTG engine has on-chip pull-up resistor(s). You don't need any external one.

> I am setting this GPIO pin so that D+ pull-up resistor is enabled. Still, I could see that the device is not getting detected..

Check the voltage of D+ and D- lines. Do you see the pull-up voltage at one of these lines?

As Windows don't tell any USB hardware connection, I believe these lines are kept in low.

Maybe, the connection routine, which enables the external pull-up, is not called on your firmware.

Did you change the processor type on the header file, as follows?

The default is STM32F10X_XL. For STM32F107, STM32F10X_CL is chosen.

Or, as the tips suggests, add this definition to the compile option.

----------------- excerpt from the source code, from here ----------------

\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h

/* Uncomment the line below according to the target STM32 device used in your

   application 

  */

#if !defined (STM32F10X_LD) && !defined (STM32F10X_LD_VL) && !defined (STM32F10X_MD) && !defined (STM32F10X_MD_VL) && !defined (STM32F10X_HD) && !defined (STM32F10X_XL) && !defined (STM32F10X_CL) 

  /* #define STM32F10X_LD */     /*!< STM32F10X_LD: STM32 Low density devices */

  /* #define STM32F10X_LD_VL */  /*!< STM32F10X_LD_VL: STM32 Low density Value Line devices */  

  /* #define STM32F10X_MD */     /*!< STM32F10X_MD: STM32 Medium density devices */

  /* #define STM32F10X_MD_VL */  /*!< STM32F10X_MD_VL: STM32 Medium density Value Line devices */  

  /* #define STM32F10X_HD */     /*!< STM32F10X_HD: STM32 High density devices */

//   #define STM32F10X_XL      /*!< STM32F10X_XL: STM32 XL-density devices */       // <------ comment this line

   #define STM32F10X_CL      /*!< STM32F10X_CL: STM32 Connectivity line devices */  // <------ recover this line

#endif

/*  Tip: To avoid modifying this file each time you need to switch between these

        devices, you can define the device in your toolchain compiler preprocessor.

----------------- to here ----------------

Tsuneo

saimaddy123
Associate II
Posted on May 17, 2011 at 14:27

Tsueno,

I could have the USB port working by putting PA11 and PA12 to BIT_RESET. You are right that those pull-up resisters are inside OTG. As the lines are multiplexed between PA11/USART/OTG_FS_DP, i disabled PA11 (and USART lines are not connected on this board), so that connected OTG_FS_DP to D+. So, I could detect it finally and Windows Recognizes it as Virtual COM port..

The tool chain I am using(CrossWorks) automatically selects STM32F10X_CL as build option for STM32F107.

I have different set of problems now.. I will post a different topic for that..

Thanks,

Sai