Author Topic: DEVICE_WITHOUT_USB  (Read 7503 times)

Offline hervé

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
DEVICE_WITHOUT_USB
« on: January 11, 2011, 10:18:36 AM »
Hi Mark,

On the file config.h there is this line
Code: [Select]
    #define DEVICE_WITHOUT_USB                                           // LPC23XX doesn't support USB yet
Does this means that the version 1.4 doesn't support the slave USB ?


Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3234
    • View Profile
    • uTasker
Re: DEVICE_WITHOUT_USB
« Reply #1 on: January 11, 2011, 12:02:39 PM »
Hi Hervé

You can get a new Beta version with USB device support here:
http://www.uTasker.com/software/V1.4/uTaskerV1.4-4B_LPC2XXX.zip

When USB is activated (in config.h) it will allow the SD card to appear as a disk to the PC. The USB interface is running in interrupt mode whereby the SDIO is in DMA mode. The demo can be seen here with some details of the SDIO configuration: http://www.youtube.com/watch?v=5dD2cZ8FEqo

The project is configured for the Olimex 2478 board with TFT where it will show a slide show in the TFT of images in the directors "pics" on the SD card (when inserted). When no SD card is inserted it will run a graphical demo.

In usb_application.c the mass-storage device mode can be selected with MJBC_DEVELOP_MASS_STORAGE. Without this it will default to CDC mode.

Regards

Mark



Offline hervé

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
Re: DEVICE_WITHOUT_USB
« Reply #2 on: February 01, 2011, 04:01:06 PM »
Hello Mark,

Your are using a define for Mass Storage (MJBC_DEVELOP_MASS_STORAGE), does this means that we couldn't have both CDC and Mass Storage at the same time ?

Regards.



Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3234
    • View Profile
    • uTasker
Re: DEVICE_WITHOUT_USB
« Reply #3 on: February 01, 2011, 06:06:29 PM »
Hi Hervé

With the define MJBC_DEVELOP_MASS_STORAGE set, the mass storage class is used.
Without the define MJBC_DEVELOP_MASS_STORAGE the CDC class is used.

I don't think that it is possible for both classes to be active at the same time - during the enumeration one of them must be reported. I may be wrong and it may be possible to configure a device with multiple classes (composite device?) using an appropriate setup but the code must also be modified to be able to do multiple functions at the same time.

It would be possible to change from one class to a another by having two tasks - one containing the CDC class code and the other containig the mass storage class code. It would be necessary to only allow the required task to start depending on which class is to be reported, or swap between enumerations.

Regards

Mark


P.S. Note that MJBC_DEVELOP_MASS_STORAGE is a development define to allow easily switching. Depending on suitability there will later be either two USB task codes or a new define name will be used. [MJBC_ type defines distinguish developemnt (Beta) code]