/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / Auto connect USB mass storage

Username:     
Password:     
             

Forum

# 1   2011-01-18 04:24:33 Auto connect USB mass storage

JamesSt
New member
Registered: 2010-01-17
Posts: 9

Auto connect USB mass storage

Hi,

With a standard CircleOS and Primer2, when you connect the  STM32 USB port to your PC, to access the SDCard as a mass storage device you have to navigate the menu and tell CircleOS to go into PC mass storage connect mode.

If there a way to make CircleOS detect the cable is plugged in and automatically go to mass storage mode?

I just tried using UTIL_GetUsb() to at least read the "connexion" state, but it always returns 0 regardless of the actual connection state.

James.

Offline

 

# 2   2011-01-18 07:14:29 Auto connect USB mass storage

yrt
Administrator
From: Grenoble-France
Registered: 2008-06-11
Posts: 520
Website

Re: Auto connect USB mass storage

The Primer is not able to detect a connection, but only to be detectable or not on the bus, with the function "USB_Cable_Config", and to change the connection status without disconnecting the cable.
The Primer USB port must be initialized (in mass storage mode, or another device mode) before the connection to the PC, unless the PC will not recognize the Primer ("Unknown device connected").
UTIL_GetUsb() is a deprecated function.

Offline

 

Board footer