cancel
Showing results for 
Search instead for 
Did you mean: 

Complete procedure to implement USB on STM32F107 chip - detailed and working ! Please.

MDe
Associate III

Hello,

I am using STM32CubeIDE to implement an application under FreeRTOS on a STM32F107 chip installed on an Olimex board.

I also need a USB communication with a PC computer to exchange commands and data between our software on both sides (application specific)

- I installed (validated) the USB module via STM32CubeIDE Middelware.
- In "Connectivity" for "USB_OTG_FS" selected "Device_Only"
- In "Middleware - USB_Device", signal "Class For FS IP", I selected "Custom Human Interface Device Class (HID)"
- That's it

Then, I downloaded the whole thing (including FreeRTOS and a small LED blinking app) into the chip but it does not work :
 - The PC does not beep when connecting the STM32F107 chip card via USB
 - The LED is not blinking
So I still have no proof that something is running or if the CPU is stalled ?

I have an ST-Link cable. Is it possible to check what is running or not through debug ? If yes, how ?

Please note, the cable, the connection and the chip work since I use this channel to download the program (successfully)

Question:
- What exact procedure should I follow to install this USB functionality?
- Isn't it necessary to install/configure/start something in FreeRTOS for the USB to work?
- ...

Thanks for your help.

--

Mde / Belgium

 

1 ACCEPTED SOLUTION

Accepted Solutions

What do you mean by:


@MDe wrote:

Now the issue is that this JTAG <-> USB cable powers up the board


Check the power of your board and if possible to power it with an external source.

 




To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

View solution in original post

6 REPLIES 6
SofLit
ST Employee

Hello,


@MDe wrote:

 

I have an ST-Link cable. Is it possible to check what is running or not through debug ? If yes, how ?


ST-LINK cable or STLINK probe?

You need an STLINK probe and that "OLIMEX" board need to have an STLINK connector (Serial Wire Debug).

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
MDe
Associate III

I have an ARM-USB-OCD-H device.
Here : https://www.olimex.com/Products/ARM/JTAG/ARM-USB-OCD-H/
I hope it's a probe ?

 

MDe
Associate III

Up.

An answer please ?

Do you mean a "JTag probe" ?

This is what I'm talking about STLINK:

V2: https://www.st.com/en/development-tools/st-link-v2.html

or

V3: https://www.st.com/en/development-tools/stlink-v3set.html

Since you are using STM32CubeIDE, I don't know about the probe you are sharing and if CubeIDE supports it.

And the board needs to have JTAG connector with Serial Wire Debug (SWD) support.

This is the 20 pin connector you need on your board:

SofLit_0-1728981548060.png

Otherwise you need to get the signals by wires.

 

 

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
MDe
Associate III

Hello Soflit,
Thanks for your reply.

Yes, this is almost what I have for the JTAG. Even some more signals :

MDe_0-1728986977436.png

But I think it will work. The manufacturer, Olimex, claims it is compatible with STM32CubeIDE.

Now the issue is that this JTAG <-> USB cable powers up the board for a few seconds then shuts it down slowly (the RED Led which should be blinking goes down slowly)

I am now reading the user's manual of this cable from first phrase to last phrase trying to understand what's happend ?

 

 

 

What do you mean by:


@MDe wrote:

Now the issue is that this JTAG <-> USB cable powers up the board


Check the power of your board and if possible to power it with an external source.

 




To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.