cancel
Showing results for 
Search instead for 
Did you mean: 

Hi ST community; is there anyone who can explain to me how to connect STM32F0 with the microphone USB?

amlok.1
Associate II

Actually, my aim is to get data from a digiducer sensor with STM32F0 via USB port and can't understand how.

15 REPLIES 15

The sensor connects via USB?

Does you STM32F0 provide for a USB HOST?

It it does assume you'll need to write a suitable CLASS DRIVER

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
amlok.1
Associate II

yes the sensor connects only with USB.

and when i was searching for the right STM32 MCU to get data from this connector, i found the STM32F0 that has inside a USB device as shown in the figure below.

is there any piece of help about this CLASS driver to base on or a helpful document to assume this USB communication?

0693W00000NqYU1QAN.png

LCE
Principal

You know what you're doing?

In the headline you write about "microphone USB", in the description you mention a USB sensor.

USB device means that you can connect it to a USB host (for example a computer), not that you can connect other USB devices, such as your sensor.

amlok.1
Associate II

Thank you LCE for the explanation.

actually, according to my understanding, I thought that Microphone USB and My sensor ( in my case, a digiducer for vibration that has a USB connector) give the same data, that's why i mentioned both of them.

I'm a student and I'm working on an academic project in which i have to read data from this sensor with STM32F0. via USB and don't know how.

if you can guide me, I will be so thankful.

LCE
Principal

> i have to read data from this sensor with STM32F0. via USB

You cannot.

As I said: STM32F0 is a USB device only, as far as I understand the STM32F0 website.

You need an STM32 with USB host / on the go capabilities, which the STM32F0 does not have.

Maybe the assignment is a little bit different, like:

connect a sensor (not via USB) to an STM32F0, then send sensor data from STM32F0 via USB to PC.

?

@amlok.1​ "I'm a student"

Then you should be going to your teacher/supervisor for assistance: they know you, and the task you've been assigned, and the resources available to you - we know none of that.

"i have to read data from this sensor with STM32F0. via USB"

As the others have said, you cannot.

A USB connection always consists of a Host, and a Device (ignoring Hubs for now).

Your sensor is a USB Device - therefore you will need a USB Host to connect to it.

As it says in the diagram you posted, the STM32F0 is also a USB Device - it cannot connect to another USB Device.

0693W00000NqZUbQAN.png 

This is fundamental to the way USB works - it is not anything specific to the STM32

https://en.wikipedia.org/wiki/USB#System_design

ok, now I understand what you said.

in my case, the sensor( digiducer) can only be connected by USB. I need to get data from it and stock it in an MCU ( if you can suggest me a host that can work among the STM MCUs ).

Thank you @Andrew Neil​ for the clarification.

Do you know an MCU that can get this data for my sensor via USB because this is the only way it can connect?

I don't have an extensive list, perhaps you can do a parametric search on the part via the website, but the F2, F4, F7 and H7 all have models which support USB HOST, and USB DEVICE operational modes.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..