Teensy 3.x NATIVE USB HOST PREVIEW AVAILABLE

Status
Not open for further replies.
Setup Netbeans IDE

download from here - I picked the "All" option and configured it on installing.
netbeans.org/downloads

Install per instructions.

Then import compiler settings from the attached "nbsettings.zip" exported from Andrews project.
Download View attachment nbsettings.zip.

From the netbeans IDE
Tools-->Preferences Select C/C+
At the bottom left click Import button, Browse to the downloaded "nbsettings.zip"

They should now look something like this.

NetbeansBuildTools.png

NetbeansBuildProjectOptions.png

NetbeansBuildCodeAssistance.png

NetbeansBuildOther.png


create gmake mapping to make
cd /usr/bin -
sudo ln -s make gmake # requires sudo aseverything else is owner=root
sudo ln -s make cmake
ln -all *make

Now invoke Netbeans IDE (8.1 as of today)
File->Open a project,
and navigate to ~/NetBeansProjects Click on UHS30 and Open -
It will discover the nbproject directory and suck in the project and start indexing the files. Very nice.!!
Now exit out of Netbeans or File-->Close.

One thing NOT to do is delete the project as it will delete the files ~/NetBeansProjects/UHS30/nbproject
 
Last edited:
Build UHS30 and download

#now to try the build
cd ~/Arduino/libraries/UHS_host/UHS_KINETIS_EHCI/examples/KINETIS_EHCI_TEST (master)]$
$ make
(optional if fails: mkdir ~/Arduino/hardware)
$ make upload # this says it failed, but actually seemed to work for me

#optionally to make all the projects:
cd ~/NetBeansProjects/UHS30 (master)]$ make #

All the command line entries above, I did via remote SSH bash shell.

To build the project from the Netbeans IDE
Start Netbeans
File-->Open Project (~/NetBeansProjects/UHS30)
Navigate the project tree - UHS30/libraries/UHS_host/UHS_KINETIS_EHCI/examples/KINETIS_EHCI_TEST
Then on the Makefile - alternate click - select Make - should execute the Make file


To add an upload - on the Makefile, alternate click, "Select Make Target -> Add" in the popup "upload"

( I tried to get remote rxdp working for me - but didn't work see c-nergy.be/blog XRDP to Unity Desktop Ubuntu 16.04)
 
Last edited:
Note the above is if you want to help with development. The libraries work just fine in the Arduino IDE too.
The root makefile builds every demo. In order to build and upload just one of them, invoke "make upload" from the example directory containing the example you want to try
 
Last edited:
Here is a link - Andrew has created an updated version of the above
https://github.com/felis/UHS30/wiki/Arduino-Install-and-configure-for-Netbeans

We've been testing the software - for me that is on a Teensy36 FS port.
The dedicated Teensy36 HS port sw is still evolving.

The Teensy36 setup is to provide a separate +5V power bus from the microB plug, and also a separate dedicated debug port on Teensy36 pins 0 & 1.

Then when testing, switch the T3xFS port between the Teensy3x/Arduino build and download, to a T3xFS host port, powered by the external power.

My testing has been with a
libraries\UHS_host\UHS_CDC_ACM\examples\UHS_KINETIS_FS_HOST\acm_terminal\acm_terminal.ino
and plugging in a
AdaFruit BackPackLCD https://www.adafruit.com/products/782 - typing at the console then comes out on the screen
(requires a USB cable microB male to USB Type A female, then a USB Type a Male to USB mini male)

FTDI cable with the tx/rx pins looped back, and characters are echoed back on the console.
(requires a USB cable microB male to USB Type A female)
 
I'll be making my own pluggable connector on mine, that way I can have an A or B port, or any of the mini or micro ones.
 
Teensy 3.2 RTClib RTCset Epoch small problem

Hi, I'm really exited about this development.

I'm trying to make touch GUI for setting the time and have date stamp data logging capability. I got the UHS30 working with Teensy 3.2 atm I can write simple text files which is great. I'm having a problem with setting time with RTClib fork which is used by UHS30.

Code:
 DateTime testmytime = RTCnow();
  DateTime epoch_test =DateTime(2016,12,11,4,5,6)  ;
  RTCset( epoch_test);
  testmytime = RTCnow();
  sprintf(crtc, "%02d/%02d/%d    %02d:%02d:%02d" ,testmytime.day(), testmytime.month(), testmytime.year(), testmytime.hour(), testmytime.minute(), testmytime.second());

The Epoch date/time conversion works fine as long as month is not December(12). When it is then year and day increments by 1 and months becomes 0.
Can someone tell me if i'm doing this right?

Any input much appreciated.
 
At its core USB protocols look like I2C on steriods - just to provide a comparison - but no end device data sheets to define how to make the master tickle the slave.

While the USB specification define protocol macros, including hardware, there is no specific USB EndPoint handshake communication flow definitions.
http://www.usb.org/developers/docs/usb20_docs/

It seems the end-to-end checking is done through "USB Compliance Workshops" free to members.
http://www.usb.org/developers/compliance/highspeed/


While we are used to Winix (Windows Linux including Apple) working, it seems some one has made these work, and particularly device manufacturers will want it to be compatible with a specific host and presumably went to the compliance workshops that are part of USB developer membership.

Does anybody have any knowledge of how these have worked, particularly the Linux development.

The USB specification is a commercial product, and clearly any useage of logo's needs to fit into the commercial process.

Are there any trip wires to be careful for the open source community..?

Does anybody know of any end to end message definitions ?

For the separate effort by UHS30/Teensy3x - which is absolutely fantastic code - the core testing becomes the enumeration of the devices by the UHS. Which is turning out to be challenging for the small number of devices being tested.

Does anybody have any insight into other similar protocols that can apply to an open source UHS.

Should it be something that can be configured to work with specific custom devices by individual contributors, and then the verification becomes just applicable to the range of devices that individual contributor can do.?
 
Hi Andrew,
I ran a test of the UHS30/Teensy36 FS CDC_ACM connecting to Particle.io / photon_wifi chip - its run overnight, very stable with 121,000 msgs.

For anybody interested, the test setup is a T36 powered off an independent 5V source, then using the T36 FS microB connector, to connect and power the photon WiFi chip. The Photon WiFi has a custom build to accept JS compatible commands over the USB device/serial.
On the Teensy I've developed a simple "acm_modem.ino" that is a modification to the Terminal.ino - to wait for a USB Host FS connection and then output "{v}" for version over the USB Host FS, wait for a result string {} and then repeat the {v}. The photon is quite slow to respond - about 0.5second.

To connect to the Photon I've modified Andrews excellent USH30 to be able to enumerate for a CDC_ACM - requiring a small modification - and pushed it to my account https://github.com/neilh10/UHS30 "develop01" branch. As Andrew points out its only the FS at this point and Alpha
The acm_modem.ino can be found in:
libraries/UHS_host/UHS_CDC_ACM/examples/UHS_KINETIS_FS_HOST/acm_modem

Next step is to combine it with the Snooze lib for power saving and wake up periodically to activate the UHS3, send a result, and then go back to sleep.
 
Hi Paul
I'm working on the Snooze/T36, what pins do I need to keep as output, Which is the VUSBHOST _En pin. ?
thanks
 
I want to be able to use the high speed USB pins on the Teensy 3.6. It *seems* like the UHS30 library is the closest thing to such a library. But, it also seems to be geared toward creating a USB host on that USB port. I just wanted to be able to connect to a PC via high speed USB. I know that all of the code is in a state of development but is there any support for being a HS USB slave via those 5 pins? Or, alternatively, is it something that might exist at some point in the future?
 
I'm confused about this library. Does it use the teensy as a host or does it require a separate USB host board? If it requires a separate host does it have provisions to use other SPI devices at the same time? I seem to remember seeing a comment about it not requiring SS, if that is so how can another device operate at the same time. Can someone clarify please.
 
I'm confused about this library. Does it use the teensy as a host or does it require a separate USB host board? If it requires a separate host does it have provisions to use other SPI devices at the same time? I seem to remember seeing a comment about it not requiring SS, if that is so how can another device operate at the same time. Can someone clarify please.

Host mode on the micro-USB port that you normally upload to, on all ARM teensy boards (3.x)
As it says, Native. No additional boards required.
For the Teensy 3.6 the additional port is in-progress, and because I am so busy with work...
Holidays mean rampping up in production, end of year means new products that I have to write code for.
 
Hi, I'm really exited about this development.

I'm trying to make touch GUI for setting the time and have date stamp data logging capability. I got the UHS30 working with Teensy 3.2 atm I can write simple text files which is great. I'm having a problem with setting time with RTClib fork which is used by UHS30.

Code:
 DateTime testmytime = RTCnow();
  DateTime epoch_test =DateTime(2016,12,11,4,5,6)  ;
  RTCset( epoch_test);
  testmytime = RTCnow();
  sprintf(crtc, "%02d/%02d/%d    %02d:%02d:%02d" ,testmytime.day(), testmytime.month(), testmytime.year(), testmytime.hour(), testmytime.minute(), testmytime.second());

The Epoch date/time conversion works fine as long as month is not December(12). When it is then year and day increments by 1 and months becomes 0.
Can someone tell me if i'm doing this right?

Any input much appreciated.
I'll look into this as soon as I can. VERY busy here.
 
Thank you for clarification. I understand software schedules perfectly, 1 week to deadline and a months worth of coding left. :)
 
Thank you for clarification. I understand software schedules perfectly, 1 week to deadline and a months worth of coding left. :)

More than just writing code.
I also have to pick-n-place/reflow boards. I also have to do the usual CAD work for new boards.
If it were JUST code, then, well, I'd have more time :rolleyes:
 
Sounds like old times to me. I used to work for Delta Design/Cohu doing pick and place IC handlers for IC testers. Some of us are retired and got out of that race. Best of wishes for new year,
 
I want to be able to use the high speed USB pins on the Teensy 3.6. It *seems* like the UHS30 library is the closest thing to such a library. But, it also seems to be geared toward creating a USB host on that USB port. I just wanted to be able to connect to a PC via high speed USB. I know that all of the code is in a state of development but is there any support for being a HS USB slave via those 5 pins? Or, alternatively, is it something that might exist at some point in the future?

So, it appears the library author resurfaced but everyone forgot about my question above. Briefly, what is the likelihood that this library would support high speed USB client mode connection to a PC? Or, should I be looking elsewhere. I can't believe that nobody else would want high speed 480mbit USB on the Teensy.
 
Pretty much this:

Or, alternatively, is it something that might exist at some point in the future?

I can tell you this is definitely on my to-do list. I already did some very early preliminary work. But a fully functional & usable USB stack is not going to happen quickly. My focus will be on host mode first, and later device mode.
 
So, it appears the library author resurfaced but everyone forgot about my question above. Briefly, what is the likelihood that this library would support high speed USB client mode connection to a PC? Or, should I be looking elsewhere. I can't believe that nobody else would want high speed 480mbit USB on the Teensy.

Sorry, I must have missed that post....
Yes, it is planned to be supported (as said above).
SOME work has been done already.
More needs to be done, but I simply lack time to do this currently.
 
Hey Guys, Great work on getting some code working with the High speed usb port! Eagerly waiting for someone to use what you all started to enable device mode. Much thanks for your contributions
 
As I understand it, its only the FS port working. HS is in the works. Paul verified the PLL at 480Mhz, but there is still a bunch of sw.
Its a different interface from the FS, and the chances are its going to require a HS protocol analyzer - which is ~tripple the price of FS protocol analyzer.
 
As I understand it, its only the FS port working. HS is in the works. Paul verified the PLL at 480Mhz, but there is still a bunch of sw.
Its a different interface from the FS, and the chances are its going to require a HS protocol analyzer - which is ~tripple the price of FS protocol analyzer.

@Neil: The good news here is that I have acquired a beagle 480 :) No worries on that anymore. If you checked your hangouts chat you'd know this ;-)
 
Yeah a Beagle Usb HS 480!!!!!Mhz

Oh Yea I guess I'm not hanging out in the coolest of places - nice pic ......
good news you got a beagle 480!!!!!


Beagle480Mhz (Small).jpg

I'm jealous!!! :) , thinking of it myself, and been keeping any eye on ebay to see it comes up there.
 
Hey xxxajk , I am curious if you ever got MIDI Host mode working at all? I Have hardware that I would love to test!
 
Status
Not open for further replies.
Back
Top