From owner-freebsd-usb@FreeBSD.ORG Tue Oct 16 12:47:50 2007 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 744D616A41A for ; Tue, 16 Oct 2007 12:47:50 +0000 (UTC) (envelope-from xiaofanc@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.182]) by mx1.freebsd.org (Postfix) with ESMTP id 6969613C45A for ; Tue, 16 Oct 2007 12:47:50 +0000 (UTC) (envelope-from xiaofanc@gmail.com) Received: by wa-out-1112.google.com with SMTP id k17so2405060waf for ; Tue, 16 Oct 2007 05:47:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=7nre4biftbkrs6K+9e5UL8HsDOFjxZcYy88S8MSO1RI=; b=NliN7TXorSgPR9sWC/EPv07yr84amuS2Sxc4vXaDby3vk+dWPIHRRZKwlVIWVH7tvPV42fmjrxRhPQNZfd2aiWdOxoZSQPJQ41ETCMWN7gOpwp6g5MfdAy0P+Jnv2v6hrwGb9AMPFa4rYaK8idoIieOHZc9PBdOBqdCykASQpyw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=bWNNu95VVqrjGr390rgj5an9W+kdWs40Yl2kzFtcR6nukFzPR6cUz2RgsvP/ZUvkcqUOypW3BM7h3Vm2/br7b/sfxH8rYKcnddtVz9oFrqI+Fft4vySK6yXwwBTYPcLQgAGYaO3i+2Asa2gK7uhHAdY08J5S4yT9H1LMQI/lkxc= Received: by 10.114.160.1 with SMTP id i1mr8397051wae.1192538869399; Tue, 16 Oct 2007 05:47:49 -0700 (PDT) Received: by 10.114.176.17 with HTTP; Tue, 16 Oct 2007 05:47:49 -0700 (PDT) Message-ID: Date: Tue, 16 Oct 2007 20:47:49 +0800 From: "Xiaofan Chen" To: freebsd-usb@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Subject: Re: PICDEM FS USB Demo under FreeBSD with HPS Stack X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Oct 2007 12:47:50 -0000 On 10/13/07, Xiaofan Chen wrote: > Today I checked the Demo mode of PICDEM FS USB demo board. > it does not work either. Again this uses interrupt transfer. This is with the latest HPS USB stack and 6.2 Stable. On 10/16/07, Hans Petter Selasky wrote: > On Saturday 13 October 2007, Xiaofan Chen wrote: > > On 10/13/07, Hans Petter Selasky wrote: > In the file "ugen.c" in the function "ugen_open_pipe_read()" you will find > a "case UE_INTERRUPT:". Some lines further down you will find: > > /* first transfer clears stall */ > sce->read_stall = 1; > > This you can set to "0". Then recompile and install the "ugen" module and/or > kernel. > > Does your USB hardware work now ? > This also solved the problem with PICDEM FS USB demo board. Thanks! ===[mcuee] ~/Desktop/build/fsusb/Demo # sudo ./fsusb_demo --readpot Locating Microchip(tm) PICDEM(tm) FS USB Demo Board (vendor 0x04d8/product 0x000c) usb_set_debug: Setting debugging level to 255 (on) setting USB debug on by adding usb_set_debug(255) usb_os_find_busses: Found /dev/usb0 usb_os_find_busses: Found /dev/usb1 usb_os_find_busses: Found /dev/usb2 usb_os_find_devices: Found /dev/ugen1 on /dev/usb1 usb_os_find_devices: Found /dev/ugen0 on /dev/usb1 usb_control_msg: 128 6 512 0 0xbfbfe9a8 8 1000 usb_control_msg: 128 6 512 0 0x8051040 41 1000 skipped 1 class/vendor specific interface descriptors usb_control_msg: 128 6 513 0 0xbfbfe9a8 8 1000 usb_control_msg: 128 6 513 0 0x804b120 32 1000 usb_control_msg: 128 6 512 0 0xbfbfe9a8 8 1000 usb_control_msg: 128 6 512 0 0x804b160 32 1000 Found USB PICDEM FS USB Demo Board as device '/dev/ugen1' on USB bus /dev/usb1 Communication established. answer was correct! Onboard firmware version is 1.0 Potentiometer now reads 263 usb_os_close: closing endpoint 4 Xiaofan