2024-09-30 07:34 PM
Hello,
I have an Olimex board with an STM32F107 cpu on it.
It start in the bootloader and I can upload firmware to it.
For this I use CubeIDE and CubeProgrammer.
I need to give USB support to my application so that to communicate with a PC.
In CubeIDE, I have initialized USB_OTG_FS (without SOF signal as my cpu does not support it)
I then regenarated code and recompile (through right click on project name then "Build project").
Then program the cpu.
Then Reset the cpu but it does not work (I do not hear beep as when a new USB device is connected) ?
Do you have an idea on what happens ?
Thanks in advance for your help.
Kind regards,
--
MDe / Belgium
2024-09-30 11:53 PM
First, read something about USB device classes. Decide on what device class you want to implement - provably CDC ACM or HID. Read some ST tutorial on how to implement CDC ACM device with CubeIDE. You need to Select Middleware - USB Device - CDC ACM from the left side menu in CubeMX.
2024-10-13 06:39 AM
Hello gbm,
Thanks for your reply.
Sorry for the delay, I am not working on this project everyday.
I've been trying to run a tiny program on this chip for a long time (to make a LED blink). I can't wait to get there because this is a real obstacle course in the middle of a huge forest where you have to find your way.
I did what you suggested. I went to "Middleware - USB" but the "Class for FS IP" field is disabled (see screen capture attached)
How should we make this field accessible?
Thank you very much,
--
MDe / Belgium
2024-10-13 07:15 AM
Read The Fine Docs.
Enable USB as Device. Then select device class.
There are few tutorials available, just look for them.
2024-10-13 08:19 AM
Hello gbm,
Thanks for your help.
Now it works, the field is now enabled and I selected "Device_only"
Then I recompiled by clicking on the "Device Configuration Tool Code Generation" button and all is compiled successfully.
I then, downloaded the whole thing (I guess ?) into the chip using STM32Programmer through USB. All downloaded successfuly.
I then changed the jumer Boot0 so that the CPU restarts in my program. I disconnect, reconnect USB but still no beep from the PC that shoudl indicate a USB connection occured.
What should I do now ?
Can you tell which document exactly I should read for it to work ?
Thanks,
Regards,
--
MDe/Belgium