Skip to main content
Associate III
October 14, 2024
Solved

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

  • October 14, 2024
  • 1 reply
  • 1658 views

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

 

Best answer by mƎALLEm

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.

 




1 reply

mƎALLEm
ST Technical Moderator
October 14, 2024

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 "Best answer" on the reply which solved your issue or answered your question.
MDeAuthor
Associate III
October 14, 2024

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 ?