Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
1,574 Views

USB 2.0 Slave HwLib

Hello! I am developing an application for the Cyclone V where the board is connected to a Windows PC as a USB 2.0 slave. I have following wishes: 

 

 

  • Use case 1: The board collects data and provides it to the Windows PC, perhaps as mass storage device  

  • Use case 2: The Windows PC configures the board via USB and receives data. This is not covered by an existing USB class driver. I would write an own driver.  

 

 

The application must run baremetal (no OS) on the HPS. On Linux there are drivers available (e.g. USB gadget g_ether), but I can't use Linux because of the boot time. 

 

I would need the HwLib (Hw manager) for USB 2.0 slave from Altera. Quartus 14.0 provides a SoCal for USB, but I can't write the HwLib on top of it by myself. HwLib USB support was planned for Quartus 14.0 according to my sources, but it did not show up. 

 

Could someone from Altera please give information about the USB 2.0 slave HwLib?
0 Kudos
5 Replies
Altera_Forum
Honored Contributor I
132 Views

USB -- very big mountain, Altera go to there in last time! 

Meanwhile you may try to use many RTOSes with 1 thread -- suddently some have USB API ? 

Or if drag over from Linux sources to alt_usb.c ?.. If works there :) 

 

P.S. On Altera CV board where located HPS USB 2.0 OTG connector ? 

I see and use only 2 mini-USBs: for internal USB-Blaster and RS-port. 

And the possibility to connect as slave flash device to PC is very need !
Altera_Forum
Honored Contributor I
132 Views

 

--- Quote Start ---  

Could someone from Altera please give information about the USB 2.0 slave HwLib? 

--- Quote End ---  

 

 

Altera has released an update for the 14.0 HW libs with some new libraries and a new non-GPL preloader called MPL (Minimal Preloader), but there is no USB HW Lib today. 

 

You can get the update here, it will patch your 14.0 SoC EDS installation: 

 

https://www.altera.com/download/soc-eds/rtos-tools.jsp
Altera_Forum
Honored Contributor I
132 Views

Thanks, for version 14.0 need be download and install "HWLIBs and baremetal update for SoC EDS 13.1 " first ? 

Where I may subscribe for Altera news about updating all for SoC ? 

For Baremetal USB developing I try remake Linux drivers... :(
Altera_Forum
Honored Contributor I
132 Views

 

--- Quote Start ---  

Thanks, for version 14.0 need be download and install "HWLIBs and baremetal update for SoC EDS 13.1 " first ? 

--- Quote End ---  

 

 

If you have 14.0 SoC EDS, you only need the patch for 14.0. The update for 13.1 is just for SoC EDS 13.1. 

 

If you have SoC EDS 13.1, you may want to upgrade to 14.0 first, then apply the patch for 14.0. 

 

 

--- Quote Start ---  

Where I may subscribe for Altera news about updating all for SoC ? 

--- Quote End ---  

 

 

There is a email list on rocketboards.org that is mostly for Linux, and you can check these forums too.
Altera_Forum
Honored Contributor I
132 Views

I know from personal experience that using linux USB drivers isn't fruitful. The hardware specific portion is small, and it won't work without the rest of the USB framework. This has many dependencies on the rest of the kernel that you might as well just run linux. 

 

USB device mode (what DeTeWeF calls a slave) is much easier to work with, as long as you don't bring in the complexities of OTG and host mode. It is doable in a bare metal environment, but I'd still recommend an RTOS for something like this.
Reply