Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Oct 2007 17:52:57 +0800
From:      "Xiaofan Chen" <xiaofanc@gmail.com>
To:        "Hans Petter Selasky" <hselasky@c2i.net>
Cc:        freebsd-usb@freebsd.org
Subject:   Re: PICkit 2 again with HPS stack
Message-ID:  <a276da400710130252k2d2d0db2n2ac1f40c20b64a1b@mail.gmail.com>
In-Reply-To: <200710121912.03585.hselasky@c2i.net>
References:  <a276da400710120332h5f780ee8g9a12d5fb5548f8da@mail.gmail.com> <200710121912.03585.hselasky@c2i.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 10/13/07, Hans Petter Selasky <hselasky@c2i.net> wrote:
> Resource temporarily unavailable maps to EAGAIN
> according to "man errno". From what I can see from the log
> you have provided this means that the "msleep()"
> call in "ugenread" timed out.
>
> What timeout have you programmed in your PICkit ?

It is 1000ms. I change it to 10000ms but this does not help.

> Can you set the debugging value to 15 using the PICkit ?
> Alternativly:
> sysctl hw.usb.debug=15

===[mcuee] ~/Desktop/build/pk2-2.04 # sudo sysctl hw.usb.debug=15
hw.usb.debug: 15 -> 15

===[mcuee] ~/Desktop/build/pk2-2.04 # sudo ./pk2 --on

PK2 version 2.04 - 2006/12/17
 ./pk2 --on
usb_set_debug: Setting debugging level to 255 (on)

Locating USB Microchip PICkit2 (vendor 0x04d8/product 0x0033)
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 0xbfbfe7e8 8 1000
usb_control_msg: 128 6 512 0 0x8066120 32 1000
usb_control_msg: 128 6 512 0 0xbfbfe7e8 8 1000
usb_control_msg: 128 6 512 0 0x806c0c0 41 1000
skipped 1 class/vendor specific interface descriptors
usb_control_msg: 128 6 513 0 0xbfbfe7e8 8 1000
usb_control_msg: 128 6 513 0 0x8066160 32 1000
Found USB PICkit as device '/dev/ugen1' on USB bus /dev/usb1
Setting USB configuration is okay.
Claiming USB interface is okay.
Sending GETVERSION command using interrupt transfer.
USB> 76
Receiving PICkit VERSION information using interrupt transfer.
USB error: error reading from interrupt endpoint /dev/ugen1.1:
Resource temporarily unavailable
Fatal error> USB read did not return 64 bytes

===[mcuee] ~/Desktop/build/pk2-2.04 # dmesg | grep ugen
ugenopen: flag=1, mode=8192
ugenioctl: cmd=40125569
ugenclose: flag=1, mode=8192
ugenopen: flag=1, mode=8192
ugenioctl: cmd=40125569
ugenclose: flag=1, mode=8192
ugenopen: flag=3, mode=8192
ugenioctl: cmd=80045572
ugenioctl: cmd=c018556f
ugenioctl: cmd=80045572
ugenioctl: cmd=c018556f
ugenclose: flag=3, mode=8192
ugenopen: flag=3, mode=8192
ugenioctl: cmd=80045572
ugenioctl: cmd=c018556f
ugenioctl: cmd=80045572
ugenioctl: cmd=c018556f
ugenioctl: cmd=80045572
ugenioctl: cmd=c018556f
ugenioctl: cmd=80045572
ugenioctl: cmd=c018556f
ugenclose: flag=3, mode=8192
ugenopen: flag=3, mode=8192
ugenioctl: cmd=80045565
ugen_set_config: configno 1, sc=0xc35c7000
ugenclose: flag=0, mode=0
ugenopen: flag=3, mode=8192
ugenioctl: cmd=80045572
ugenwrite:
ugenwrite: transferred 64 bytes
ugen_write_clear_stall_callback: sce=0xc35c7084: stall cleared
ugen_default_write_callback: waking 0xc35c7084
ugenioctl: cmd=80045572
ugenioctl: cmd=80045571
ugenread:
ugen_open_pipe_read: interrupt open done
ugen_read_clear_stall_callback: sce=0xc35c7084: stall cleared
ugenclose: flag=3, mode=8192
ugenclose: flag=3, mode=8192

To Hans:
The full dmesg log will be sent to you per email.

Xiaofan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a276da400710130252k2d2d0db2n2ac1f40c20b64a1b>