add usb for stm32

Post here to discuss any new features, components, chips, etc, that you would like to see in Flowcode.
Post Reply
hungbulon1122
Posts: 3
http://meble-kuchenne.info.pl
Joined: Sun Mar 05, 2023 2:50 pm

add usb for stm32

Post by hungbulon1122 »

Could you please add USB support for STM32 devices in Flowcode? It would be very helpful for STM32 projects. Thank you!

BenR
Matrix Staff
Posts: 2307
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 639 times
Been thanked: 848 times

Re: add usb for stm32

Post by BenR »

Hello,

Would you need full speed or high speed. Full speed is available directly on chip, high speed requires an external transceiver.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel

BenR
Matrix Staff
Posts: 2307
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 639 times
Been thanked: 848 times

Re: add usb for stm32

Post by BenR »

I've had a go at supporting the CDC component in STM32 for you now. I had already laid the groundwork but I've now filled in the details too.

Which chip are you using and I'll add the USB define to the specific chip definition file so we can test if its working.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel

hungbulon1122
Posts: 3
Joined: Sun Mar 05, 2023 2:50 pm

Re: add usb for stm32

Post by hungbulon1122 »

I am currently using the STM32F401RC microcontroller. I would really appreciate it if Flowcode could provide full support for the STM32F401RC, and ideally support as many STM32 microcontrollers as possible.

STM32 devices are affordable, widely available, and easy to source, so comprehensive STM32 support would be very useful for developers and users who want to build embedded projects with Flowcode.

Thank you very much for considering this request. I hope future versions of Flowcode can provide broader and more complete support for the STM32 family.

BenR
Matrix Staff
Posts: 2307
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 639 times
Been thanked: 848 times

Re: add usb for stm32

Post by BenR »

Hello,

Right I have now pushed these changes to the library updates system and they should be live if you do a full database update.

Let me know how you get on and if things are working well I'll roll out the change to the other USB enabled STM32 devices.

edit: I've done some testing and we're getting some compile errors to do with linker and library settings, I've managed to fix a bunch of them but need time to fully finish it off. I'll keep on it.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel

hungbulon1122
Posts: 3
Joined: Sun Mar 05, 2023 2:50 pm

Re: add usb for stm32

Post by hungbulon1122 »

"Hello Flowcode Support Team,

I am testing a USB HID project on the STM32F401RC chip. I successfully compiled the project and generated the HEX/BIN file, then flashed it into the microcontroller. However, when I plug the board into my PC via the USB data lines (PA11/PA12), the computer fails to recognize it—the USB HID device name does not appear, and it does not work at all.

Could you please help me check what might be causing this issue or guide me on the correct USB HID configuration for this chip in Flowcode? Thank you very much."

BenR
Matrix Staff
Posts: 2307
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 639 times
Been thanked: 848 times

Re: add usb for stm32

Post by BenR »

USB HID is currently not supported and likely currently not generating any code, there should be a warning that it's not supported I'll check this. I'm working on support for the CDC serial USB device so that's the one to try currently.

If you need HID then I'll get that one on the list too.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel

Post Reply