Author Topic: USB support for SAM7X  (Read 10588 times)

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
USB support for SAM7X
« on: October 19, 2008, 12:46:03 AM »
Hi All

Since I made some interesting progress today I thought I would make a pre-announcement of a new service pack for the SAM7X.
This will include (among various improvements and optimisations) UART on the debug unit (DGBU) and USB device with a CDC example, allowing a menu interface and firmware updates via USB.

The demo project code size (IAR 4 thumb) is about 60k with full TCP/IP, UART and USB support and allows the standard HTTP/FTP plus the standard menu driven interface via either UART, USB or TELNET. In a new USB menu, a USB<->RS232 function can be commanded or the firmware upload mode set.

The M522XX Coldfire project was the first to include USB device: see http://www.utasker.com/forum/index.php?topic=352.0
The USB user interface is 100% compatible so the code will run on the Coldfire and also on the SAM7X without any changes. This although the USB chip implementation is rather different. The Coldfire supports up to 16 fully configurable DMA driven endpoints (very powerful) and the SAM7X up to 6 FIFO based endpoints (with some restrictions to modes and buffer sizes). The SAM7X USB interface is however rather less complicated to control, so to get basic operation was quite a bit easier (although experience with the sophisticated Coldfire over a period of many months certainly helps...).

It is premature to say that everything is ready because the fact is I have in fact only just managed to get the device to successfully complete enumeration but was rather pleased that the configuration then did immediately allow the menu and RS232<->USB operation. There are however a few things that I haven't really looked into in any details yet but these will be necessary before conclusion - mainly the operation of double-buffered FIFOs on some of the endpoints; the users' manual is quite vague and I have already needed to experiment quite a lot to understand just how the chip reacts (it actually manages more internally then the Coldfire - this makes its basic use simpler but also masks out exactly what it is doing and sometimes what not...). But, I am quite sure that if this operation can be correctly taken advantage of it will result in an efficient solution and then it will be time to get the service pack available for real project.

Regards

Mark




Offline CarlMLE

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: USB support for SAM7X
« Reply #1 on: November 28, 2008, 01:21:45 PM »
Sounds Great!

Any rough idea when the USB Service pack for the SAM7 will be available?

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: USB support for SAM7X
« Reply #2 on: November 28, 2008, 02:52:40 PM »
Hi Carl

I must admit to having been side-tracked on this one. The demo is working but I haven't optimised the double buffer operation yet (without the correct optimisation is does choke when fast bulk data is sent, so this needs to be completed first).

The main reason for being side tracked is due to the fact that there has been very little interest in the USB features. This has meant that there has not been any real incentive to do a lot of work in that direction. I am wondering why this is. Is is that USB is still not really have serious use in industrial applications (the main use of the project with these types of chips) or is it that Ethernet users don't see any advantages in having USB (as well)?

Any way. I will make an effort to get this wrapped up so that a SP will include it asap.

Regards

Mark


Offline CarlMLE

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: USB support for SAM7X
« Reply #3 on: November 28, 2008, 05:38:58 PM »
Yeah having an Ethernet connection does get rid of the need for a USB connection, But not all applications need networking and you don't get PC's with serial ports anymore. So a low overhead USB CDC implementation would defiantly be useful. It saves you some money as you don't have to use a 232 to USB bridge.