2019-12-16 06:28 PM
Dear all,
is there a USBTMC implementation for the STM32 MCUs available? I wold be most interested in the STM32G4 series, but I guess, such an implementation would work for any USB slave. I have googled and searched on the ST.com site, but nothing found. There is one place, with a basic implementation: https://github.com/karlp/discotmc. But this code is unstable, and looks dead since 6 years.
Unfortunately, STM32cubeMX does not support USB slave as USBTMC class. At least not the version, I have. Does someone have a working example of an USBTMC app? Would be great, if STM32CubeMX would support this in the future.
Thank you
2019-12-17 05:50 AM
Why not start with the open source code, find the bugs and fix them, then contribute the working version so everyone else can use your work for free. To start you can tell us what you found after trying that Github code.
Like you I'm interested in finding a TMC class that can be integrated into a USB stack. If you can get one working it'll save me a lot of time.
Have you tried StackOverflow? They have a lot of free code available.
Jack Peacock
2019-12-17 05:30 PM
Dear Jack,
thanks for the answer. If I would have enough time and no pressure to have a solution in a somehow short time, I would of course do, what you suggest. But unfortunately, I am not in that position. I must build a product with USBTMC working, in a short time. And the USBTMC is only one of many problems.
Because I worked a lot with STM32 controllers, this was my first address to look. After googling around yesterday, I found a few other possibilities: USB-GPIB (https://github.com/xyphro/UsbGpib), based on ATmega32U4, what have a working USBTMC class. And Yaugi (https://github.com/essele/yaugi), based on PSoC4.
If there is no easy route with an STM32, I will use one of the above solutions. The product will use an STM32G4 anyway, so a integrated USBTMC would be nice, specially for future products. On the other side, this product need a galvanic isolated USB, so I need an second USB chip anyway. A ATmega32U4 adds 4$ to the BOM, an STM32L0 with USB maybe less then 1$. I would like to avoid 2 different software tools, if possible.
I thought, the STM32 are used in masses in handheld measurement tools, so they all need a USBTMC interface. I still think, there is a USBTMC class out somewhere.
2019-12-18 12:34 AM
Have you contacted some of the commercial STM32 USB stacks providers, e.g. Segger?
JW
2019-12-19 08:09 AM
@Camilo LEMOS issue with tepid support for real world USB applications beyond the VCP/CDC, MSC, HID type stuff everyone and dog can already do. See also composite devices consisting of multiple instantiations, and multi-lun. The ST support needs to be broader and deeper. Examples need to work and have supporting drivers, or use Microsoft supplied ones.
2019-12-19 08:24 AM
Thank you for tagging me here, Clive! For the moment, what I can do is forward the feedback to the product and support teams. I will certainly come back to this thread when I have more information from them. I know this is probably not a lot of specific info, but I will make sure your feedback gets to the right people. Thank you!
2019-12-19 09:36 AM
Generally when you've exhausted the "free lunch" options, you're going to need to pay some third party to provide libraries, support, or contract/consult with those with domain knowledge required.
2021-05-09 11:28 PM
Hello guys,
I have forked the project "discotmc" of karlp and modified a STM CDC project generated by cubeIDE to change endpoint descriptor and integrate the SCPI lib.
I use R&S visa tester (https://www.rohde-schwarz.com/fr/driver-pages/commande-a-distance/3-visa-and-tools_231388.html) available for Windows/Mac/Linux, to test the communication. This software can scan and to my device but i must fix the SCPI parser to answer to the command received. I think the cause is of my buffer endpoint in receive function.
The link ok the project is here. i'm very interested if you can participate in this project ^^
Thanks for all !!!