[Enhancement] USB CDC Build on DISCO_F072RB

ekawahyu
Tue Sep 26, 2017 9:38 am
I made some enhancement to enable USB CDC to build on STM32F072RB Discovery. Please review the code, it is in here:

https://github.com/ekawahyu/Arduino_Cor … sb-cdc-acm

I added USB IRQ Handler as part of hw_config. I hope this is the right place to put it, otherwise please suggest what best to do.

Questions:

  1. Serial.begin(), Serial1.begin(), etc are intended for hardware serial port, what would be the syntax for USB Serial?
  2. Is SoftwareSerial library supported with the latest core? Has anyone tried it?

fpiSTM
Tue Sep 26, 2017 1:22 pm
I’m currently working on USB features (not only USB CDC).
https://github.com/stm32duino/Arduino_C … 32/pull/91

This will not be the correct implementation but I’ve provided an CDC implementation to wi6labs for this:
https://github.com/stm32duino/Arduino_C … e0d9eb8f05

When I’m working with Arduino guy they used SerialUSB but I think Serial would be good and more generic. Then for hardware Serial use Serialx when x is the number of the Serial instance (Serial1 == USART1).
I never tried the SoftwareSerial, maybe @wi6labs test it.


ekawahyu
Tue Sep 26, 2017 5:57 pm
When I was working on the HALMX project, it used Serial instead of SerialUSB. I think we can keep it as Serial. Any other concern?

What is the ETA of this USB changes to become mainstream? Is there anything I can do to help? All I need right now is to merge USBSerial.cpp (I think) to get Serial working?

Good job at making the USB devices selectable from the menu!


fpiSTM
Tue Sep 26, 2017 7:06 pm
I’m currently working on USB features as a background task.
During this task I saw several restriction in the core that I’m currently removed.
Name of the instance will be SerialUSB but it will be link to Serial.
Serial will be the generic name to use in the sketch (Hw uart or Serial USB).

ekawahyu
Fri Sep 29, 2017 9:42 pm
@fpiSTM There is a fundamental difference between USB driver I am adding with the one in the library. Mine is based on the latest v2.0_Cube, and the library you have written is based on the non-Cube USB driver v1.0.2. My question is, do you plan to migrate from this version to V2.0_Cube anytime soon? I am stuck at porting the USBSerial because there are some differences in function call namings. What version would you suggest me to work with?

Rick Kimball
Fri Sep 29, 2017 10:50 pm
You could spend a few dollars and get a nucleo version of the F072 and use the builtin serial port instead of trying to use CDC USB.

http://www.st.com/en/evaluation-tools/n … 072rb.html


fpiSTM
Sat Sep 30, 2017 4:20 am
@ekawahyu,

I will check this point next week. But in general, I use the latest version. As I’ve done this first port some month ago, I will probably update it.


ekawahyu
Sat Sep 30, 2017 8:29 am
[fpiSTM – Sat Sep 30, 2017 4:20 am] –
@ekawahyu,

I will check this point next week. But in general, I use the latest version. As I’ve done this first port some month ago, I will probably update it.

Ok, cool! Please keep me updated. Thank you for spending the time looking at it.


ekawahyu
Sat Sep 30, 2017 8:35 am
[Rick Kimball – Fri Sep 29, 2017 10:50 pm] –
You could spend a few dollars and get a nucleo version of the F072 and use the builtin serial port instead of trying to use CDC USB.

http://www.st.com/en/evaluation-tools/n … 072rb.html

Well, I consider doing things for fun and not getting a shortcut just to make it work. Anyway, your GitHub links in this post:

viewtopic.php?f=35&t=113#p837

are all not working, where can I get the source, or whatever you had in those GitHub repos, from? Do you still have it or is it completely vanished from your machine as well?


Rick Kimball
Sat Sep 30, 2017 2:17 pm
[ekawahyu – Sat Sep 30, 2017 8:35 am] – Do you still have it or is it completely vanished from your machine as well?

viewtopic.php?f=35&t=113&start=40#p24403


ekawahyu
Sat Sep 30, 2017 6:43 pm
[Rick Kimball – Sat Sep 30, 2017 2:17 pm] –

[ekawahyu – Sat Sep 30, 2017 8:35 am] – Do you still have it or is it completely vanished from your machine as well?

viewtopic.php?f=35&t=113&start=40#p24403

Yeah, I could definitely read those! And I am keeping the Makefile cause I don’t want to go what you went through from scratch. Thanks anyway.


Leave a Reply

Your email address will not be published. Required fields are marked *