Skip to main content
Associate III
September 29, 2024
Solved

Cannot communicate woth STM32 chip via simple USB cable on my Windows 10 PC

Hello,

- I am new to the STM32 software suite
- I have a (professional) project to develop with fast analog acquisitions that also involves a dialogue with a computer via a simple USB cable.
- I am evaluating an Olimex model STM32-H107 board on which is mounted an STM32F107VCT6 chip
- I have installed the STM32CubeIDE software
- FreeRTOS has been activated and a test task has been automatically generated
- An empty program now compiles without errors and the files to be downloaded to the chip should now be on the computer.
- The chip on the board is connected to my computer via a simple USB cable
- --> The computer does not beep when connecting the USB cable (although STM32CubeIDE is installed)
- I tried the "Run-run" function on STM32CubeIDE to send the program to the chip but I get an error message "No ST-LINK detected! Please connect ST-LINK and restart debug session."
- I then installed the STM32CubeProgrammer software to try to program the chip. I tried on the right of the "Usb - Connect" buttons but without success either. I get the error "Error: Establishing connection with device failed"
- I then installed STM Link Utility, STSW-LINK004. I tried "Target - Connect" but I get the error: "No ST-LINK detected"

In short, I can't connect to my chip via USB, in any way.

Here are my questions
1) It is not clear anywhere on your site whether I need to acquire the special "ST-LINK" cable or not ? This, in order to program the chip through your software suite (Please NOTE : I don't need the debugger - I just need to program the chip)
2) Subsequently, I would need to communicate from my PC to the chip anyway and this, with a simple cable.
- Do I need to install special software on the chip to do this? or is the basic USB on-chip function sufficient?
- Are there ready-made PC-side drivers from you (or elsewhere) allowing me to communicate with your chips with an ordinary cable (without any special ST cable) for communicating with my future application.

I have exhausted everything, I can't find any clear information on this subject on the Internet. I can't find any Windows drivers there either to communicate with my card.

Thanks for your answers.
---

MDe / Belgium

    This topic has been closed for replies.
    AScha.3
    AScha.3Best answer
    Super User
    September 29, 2024

    Sure, IDE always expects the debug connection. ST-link or J-link - but nothing is ... no debug possible.

    So what should it do ? Tell you : connect a debug probe to do debug ? :)

    You just can compile -> then load flash with CubeProgrammer -> dfu bootloader .

     

    +

    If you buy a 2 $  st-link V2 stick - first look at comments: real stm chip inside, working with stm IDE - or not.

    Then dont buy this - it will not work with IDE. Buy another...

    or good and safe: buy a st-link V3 , from mouser or so. Just 10 $ , for a miniE - and it works. ;)

    If you feel a post has answered your question, please click on " Best Answer ".

    5 replies

    AScha.3
    Super User
    September 29, 2024

    Hi,

    1. STM32F107VC has USB dfu bootloader - so you can flash without st-link debug probe.

    2. set boot0 hi , to start bootloader (+ power-up/reset to start bootloader)

    3. forget STM Link Utility , its old , deprecated. Use CubeProgrammer (only).

    4. now you should "see" the new device on USB : check (in device manager - or whatever its called in Win )

     

    5. start connection in usb/dfu mode then ->

    AScha3_0-1727596551692.png

    + show, what Programmer telling then.

    If you feel a post has answered your question, please click on " Best Answer ".
    MDeAuthor
    Associate III
    September 29, 2024

    Hello Ascha.3,

    Thanks for your quick reply.
    Thank you for telling me that an ST-Link debug probe is not necessary, that's what I thought.
    Thank you also for telling me that ST LINK Utility is useless.

    I just did what you said:
    - Set the BOOT0 signal of the STF32F107 component to High using the jumper on my board.
    - Reconnected this board to the USB of my PC. A LED is lighting meaning the board is powered up but I still don't hear any connection beep when I insert the USB cable into a USB slot on my PC (this slot is working with other devices)
    - Started STM32Programmer, chosed "USB" click on "Connect" but still nothing happens, I get the error message "Error: Establishing connection with device failed", screenshot attached.

    Can you help ?

    Regards,
    --
    MDe / Belgium

     

    AScha.3
    Super User
    September 29, 2024

    >Can you help ?

    no. :)

    Just - your PC has to "see" the new USB device - otherwise nothing will happen.

    So try other plug, cable - until you see it (in device manager ) or get ding-dong...

    + set jumpers boot0 hi , boot1 lo.

    +

    is you clock /crystal on board:

    AScha3_0-1727603796953.png

    check it.

    + read AN2606 ...

    AScha3_1-1727603923865.png

     

    If you feel a post has answered your question, please click on " Best Answer ".