0
\$\begingroup\$

I want implement my bluepill as a midi controller from scratch(like register twiddling or using cmsis max in a text-editor with gnu-arm toolchain and makefiles) and I have been trying to find out resources on working with the usb peripheral. After extensively searching through the data sheets, I cannot find any proper resource on using the usb of the mcu. I even tried looking at the usb protocol specifications but I could not find much apart from intimidation due to information overload...

Tl:dr can't find any resource on how to implement usb on stm32f103c8t6 from scratch.

New contributor
nalostta is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
\$\endgroup\$
  • \$\begingroup\$ are you sure there is nothing in STM32F103C8 datasheet about it? I'm pretty sure it describes every function of the MCU as deeply as it gets, no? You must be looking for some library? \$\endgroup\$ – Ilya 2 days ago
  • \$\begingroup\$ Implementing USB is a non trivial project, but it's certainly doable, and all the information you need is freely available. The USB 2.0 spec can be obtained from USB.org and the reference manual for the controller you've chosen will detail the USB peripheral and it's registers. \$\endgroup\$ – Colin 2 days ago
  • \$\begingroup\$ Ah,I missed out the reference manual...yep that's what I was looking for I guess \$\endgroup\$ – nalostta 2 days ago
  • 1
    \$\begingroup\$ I find that libopencm3 has an excellent USB implementation for STM32 (small, easy to understand and use). There is even a MIDI example. By changing otgfs_usb_driverr to st_usbfs_v1_usb_driver it should be very close to working on a BluePill. The easiest project setup is with PlatformIO. \$\endgroup\$ – Codo 2 days ago
0
\$\begingroup\$

The problem is quite big. First you need to know how USB works, then implement your own USB driver on the MCU, and implement USB MIDI on top of the USB driver. You should consider running existing USB driver and stack provided by chip manufacturer, and implement USB MIDI on top of that. At least you can take the existing USB stack as an example even if you don't want to use it. The MCU peripheral details can be found in the reference manual, not in the datasheet.

| improve this answer | |
\$\endgroup\$

Your Answer

nalostta is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.