Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
acheesehead
Level 1
Level 1
First solution authored 5 sign-ins First reply posted

I have implemented DFU for a PSOC6 (CY8C6247BZI-D54) with the update provided over UART by a Sitara running Debian. The update works just fine, but my PSOC design has a USB serial interface to the Sitara. The Sitara recognizes the USB device but immediately disconnects.

[66991.563301] usb 1-1: new full-speed USB device number 10 using musb-hdrc
[66991.712709] usb 1-1: New USB device found, idVendor=04b4, idProduct=f21d, bcdDevice= 0.00
[66991.712730] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[66991.712738] usb 1-1: Product: CDC Serial Port
[66991.712745] usb 1-1: Manufacturer: MSI
[66991.712753] usb 1-1: SerialNumber: 12101010
[66991.720231] cdc_acm 1-1:1.0: ttyACM0: USB ACM device
[66991.770830] usb 1-1: USB disconnect, device number 10

When running the application as a non-DFU application, the USB works just fine. I have tried numerous things to fix, like increasing the flash size of app1. I am stumped. Any suggestions are welcome and appreciated.

Thanks,

Todd

0 Likes
1 Solution

Solved. Realized I needed a wire from the Sitara to the PSoC to act as the program button. Duh.

View solution in original post

0 Likes
3 Replies
Alakananda_BG
Moderator
Moderator
Moderator
50 likes received 250 sign-ins 250 replies posted

Hi @acheesehead ,

Can you check the trace of ISB packets and see what is the last transaction before the USB is disconnected.

Ca you also check how does the USB device appear in the device manager for example will that say unrecognized?

Regards

Alakananda
0 Likes

Here is what a USB trace looks like when I perform a reset of the PSoC with the application in non-DFU mode.

debian@beaglebone:~$ tshark -i usbmon0
Capturing on 'usbmon0'
1 0.000000 1.1.1 → host USB 65 URB_INTERRUPT in
2 0.000043 host → 1.1.1 USB 64 URB_INTERRUPT in
3 0.000157 host → 1.1.0 USBHUB 64 GET_STATUS Request [Port 1]
4 0.000466 1.1.0 → host USBHUB 68 GET_STATUS Response [Port 1]
5 0.000529 host → 1.1.0 USBHUB 64 CLEAR_FEATURE Request [Port 1: C_PORT_CONNECTION]
6 0.000577 1.1.0 → host USBHUB 64 CLEAR_FEATURE Response [Port 1: C_PORT_CONNECTION]
7 0.009221 host → 1.1.0 USBHUB 64 GET_STATUS Request [Port 1]
8 0.009462 1.1.0 → host USBHUB 68 GET_STATUS Response [Port 1]
9 0.044851 host → 1.1.0 USBHUB 64 GET_STATUS Request [Port 1]
10 0.045062 1.1.0 → host USBHUB 68 GET_STATUS Response [Port 1]
11 0.080698 host → 1.1.0 USBHUB 64 GET_STATUS Request [Port 1]
12 0.080899 1.1.0 → host USBHUB 68 GET_STATUS Response [Port 1]
13 0.116665 host → 1.1.0 USBHUB 64 GET_STATUS Request [Port 1]
14 0.116718 1.1.0 → host USBHUB 68 GET_STATUS Response [Port 1]
15 0.152670 host → 1.1.0 USBHUB 64 GET_STATUS Request [Port 1]
16 0.152717 1.1.0 → host USBHUB 68 GET_STATUS Response [Port 1]
17 0.152900 1.1.1 → host USB 64 URB_INTERRUPT in
18 1.179214 host → 1.1.0 USBHUB 64 GET_STATUS Request [Port 1]
19 1.179292 1.1.0 → host USBHUB 68 GET_STATUS Response [Port 1]
20 1.179330 host → 1.1.0 USBHUB 64 CLEAR_FEATURE Request [Port 1: PORT_ENABLE]
21 1.179353 1.1.0 → host USBHUB 64 CLEAR_FEATURE Response [Port 1: PORT_ENABLE]
22 1.179373 host → 1.1.0 USBHUB 64 CLEAR_FEATURE Request [Port 1: C_PORT_CONNECTION]
23 1.179393 1.1.0 → host USBHUB 64 CLEAR_FEATURE Response [Port 1: C_PORT_CONNECTION]
24 1.179410 host → 1.1.0 USBHUB 64 CLEAR_FEATURE Request [Port 1: C_PORT_ENABLE]
25 1.179429 1.1.0 → host USBHUB 64 CLEAR_FEATURE Response [Port 1: C_PORT_ENABLE]
26 1.179446 host → 1.1.0 USBHUB 64 CLEAR_FEATURE Request [Port 1: C_PORT_RESET]
27 1.179464 1.1.0 → host USBHUB 64 CLEAR_FEATURE Response [Port 1: C_PORT_RESET]
28 1.284680 host → 1.1.1 USB 64 URB_INTERRUPT in
29 1.284756 host → 1.1.0 USBHUB 64 GET_STATUS Request [Port 1]
30 1.284812 1.1.0 → host USBHUB 68 GET_STATUS Response [Port 1]
31 1.284893 host → 1.1.0 USBHUB 64 SET_FEATURE Request [Port 1: PORT_RESET]
32 1.284931 1.1.0 → host USBHUB 64 SET_FEATURE Response [Port 1: PORT_RESET]
33 1.340698 1.1.1 → host USB 65 URB_INTERRUPT in
34 1.340728 host → 1.1.1 USB 64 URB_INTERRUPT in
35 1.352678 host → 1.1.0 USBHUB 64 GET_STATUS Request [Port 1]
36 1.352719 1.1.0 → host USBHUB 68 GET_STATUS Response [Port 1]
37 1.352745 host → 1.1.0 USBHUB 64 CLEAR_FEATURE Request [Port 1: C_PORT_RESET]
38 1.352767 1.1.0 → host USBHUB 64 CLEAR_FEATURE Response [Port 1: C_PORT_RESET]
39 1.412715 host → 1.0.0 USB 64 GET DESCRIPTOR Request DEVICE
40 1.412840 1.0.0 → host USB 72 GET DESCRIPTOR Response DEVICE[Malformed Packet]
41 1.413322 host → 1.1.0 USBHUB 64 SET_FEATURE Request [Port 1: PORT_RESET]
42 1.413379 1.1.0 → host USBHUB 64 SET_FEATURE Response [Port 1: PORT_RESET]
43 1.468730 1.1.1 → host USB 65 URB_INTERRUPT in
44 1.468765 host → 1.1.1 USB 64 URB_INTERRUPT in
45 1.480701 host → 1.1.0 USBHUB 64 GET_STATUS Request [Port 1]
46 1.480760 1.1.0 → host USBHUB 68 GET_STATUS Response [Port 1]
47 1.480789 host → 1.1.0 USBHUB 64 CLEAR_FEATURE Request [Port 1: C_PORT_RESET]
48 1.480813 1.1.0 → host USBHUB 64 CLEAR_FEATURE Response [Port 1: C_PORT_RESET]
49 1.540683 host → 1.0.0 USB 64 SET ADDRESS Request
50 1.540772 1.0.0 → host USB 64 SET ADDRESS Response
51 1.560685 host → 1.30.0 USB 64 GET DESCRIPTOR Request DEVICE
52 1.560823 1.30.0 → host USB 82 GET DESCRIPTOR Response DEVICE
53 1.560872 host → 1.30.0 USB 64 GET DESCRIPTOR Request DEVICE QUALIFIER
54 1.560915 1.30.0 → host USB 64 GET DESCRIPTOR Response
55 1.560941 host → 1.30.0 USB 64 GET DESCRIPTOR Request DEVICE QUALIFIER
56 1.560980 1.30.0 → host USB 64 GET DESCRIPTOR Response
57 1.561003 host → 1.30.0 USB 64 GET DESCRIPTOR Request DEVICE QUALIFIER
58 1.561041 1.30.0 → host USB 64 GET DESCRIPTOR Response
59 1.561083 host → 1.30.0 USB 64 GET DESCRIPTOR Request CONFIGURATION
60 1.561164 1.30.0 → host USB 73 GET DESCRIPTOR Response CONFIGURATION
61 1.561194 host → 1.30.0 USB 64 GET DESCRIPTOR Request CONFIGURATION
62 1.561399 1.30.0 → host USB 131 GET DESCRIPTOR Response CONFIGURATION
63 1.561453 host → 1.30.0 USB 64 GET DESCRIPTOR Request STRING
64 1.561518 1.30.0 → host USB 68 GET DESCRIPTOR Response STRING
65 1.561546 host → 1.30.0 USB 64 GET DESCRIPTOR Request STRING
66 1.561728 1.30.0 → host USB 98 GET DESCRIPTOR Response STRING
67 1.561760 host → 1.30.0 USB 64 GET DESCRIPTOR Request STRING
68 1.561911 1.30.0 → host USB 108 GET DESCRIPTOR Response STRING
69 1.561942 host → 1.30.0 USB 64 GET DESCRIPTOR Request STRING
70 1.562040 1.30.0 → host USB 82 GET DESCRIPTOR Response STRING
71 1.563267 host → 1.30.0 USB 64 SET CONFIGURATION Request
72 1.563385 1.30.0 → host USB 64 SET CONFIGURATION Response
73 1.569725 host → 1.30.0 USBCOM 71 SET LINE CODING Request
74 1.569899 1.30.0 → host USB 64 URB_CONTROL out
75 1.574613 host → 1.1.0 USBHUB 64 GET_STATUS Request [Port 1]
76 1.574690 1.1.0 → host USBHUB 68 GET_STATUS Response [Port 1]
77 1.576942 host → 1.1.0 USBHUB 64 CLEAR_FEATURE Request [Port 1: C_PORT_ENABLE]
78 1.576993 1.1.0 → host USBHUB 64 CLEAR_FEATURE Response [Port 1: C_PORT_ENABLE]

And what the Sitara sees.

debian@beaglebone:~$ lsusb
Bus 001 Device 030: ID 04b4:f21d Cypress Semiconductor Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Here is the trace with the application running as DFU app1.

tshark -i usbmon0
Capturing on 'usbmon0'
1 0.000000 host → 1.1.0 USBHUB 64 GET_STATUS Request [Port 1]
2 0.000240 1.1.0 → host USBHUB 68 GET_STATUS Response [Port 1]
3 0.000303 host → 1.1.0 USBHUB 64 CLEAR_FEATURE Request [Port 1: PORT_ENABLE]
4 0.000367 1.1.0 → host USBHUB 64 CLEAR_FEATURE Response [Port 1: PORT_ENABLE]
5 0.000391 host → 1.1.0 USBHUB 64 CLEAR_FEATURE Request [Port 1: C_PORT_CONNECTION]
6 0.000412 1.1.0 → host USBHUB 64 CLEAR_FEATURE Response [Port 1: C_PORT_CONNECTION]
7 0.000541 host → 1.1.0 USBHUB 64 CLEAR_FEATURE Request [Port 1: C_PORT_ENABLE]
8 0.000575 1.1.0 → host USBHUB 64 CLEAR_FEATURE Response [Port 1: C_PORT_ENABLE]
9 0.000593 host → 1.1.0 USBHUB 64 CLEAR_FEATURE Request [Port 1: C_PORT_RESET]
10 0.000613 1.1.0 → host USBHUB 64 CLEAR_FEATURE Response [Port 1: C_PORT_RESET]
11 0.107838 host → 1.1.1 USB 64 URB_INTERRUPT in
12 0.107903 host → 1.1.0 USBHUB 64 GET_STATUS Request [Port 1]
13 0.108050 1.1.0 → host USBHUB 68 GET_STATUS Response [Port 1]
14 0.108172 host → 1.1.0 USBHUB 64 SET_FEATURE Request [Port 1: PORT_RESET]
15 0.108214 1.1.0 → host USBHUB 64 SET_FEATURE Response [Port 1: PORT_RESET]
16 0.163878 1.1.1 → host USB 65 URB_INTERRUPT in
17 0.163903 host → 1.1.1 USB 64 URB_INTERRUPT in
18 0.175846 host → 1.1.0 USBHUB 64 GET_STATUS Request [Port 1]
19 0.175886 1.1.0 → host USBHUB 68 GET_STATUS Response [Port 1]
20 0.175977 host → 1.1.0 USBHUB 64 CLEAR_FEATURE Request [Port 1: C_PORT_RESET]
21 0.176005 1.1.0 → host USBHUB 64 CLEAR_FEATURE Response [Port 1: C_PORT_RESET]
22 0.235889 host → 1.0.0 USB 64 GET DESCRIPTOR Request DEVICE
23 0.236003 1.0.0 → host USB 72 GET DESCRIPTOR Response DEVICE[Malformed Packet]
24 0.236095 host → 1.1.0 USBHUB 64 SET_FEATURE Request [Port 1: PORT_RESET]
25 0.236135 1.1.0 → host USBHUB 64 SET_FEATURE Response [Port 1: PORT_RESET]
26 0.291909 1.1.1 → host USB 65 URB_INTERRUPT in
27 0.291939 host → 1.1.1 USB 64 URB_INTERRUPT in
28 0.303864 host → 1.1.0 USBHUB 64 GET_STATUS Request [Port 1]
29 0.303917 1.1.0 → host USBHUB 68 GET_STATUS Response [Port 1]
30 0.303947 host → 1.1.0 USBHUB 64 CLEAR_FEATURE Request [Port 1: C_PORT_RESET]
31 0.303970 1.1.0 → host USBHUB 64 CLEAR_FEATURE Response [Port 1: C_PORT_RESET]
32 0.363855 host → 1.0.0 USB 64 SET ADDRESS Request
33 0.363969 1.0.0 → host USB 64 SET ADDRESS Response
34 0.383908 host → 1.32.0 USB 64 GET DESCRIPTOR Request DEVICE
35 0.384049 1.32.0 → host USB 82 GET DESCRIPTOR Response DEVICE
36 0.384106 host → 1.32.0 USB 64 GET DESCRIPTOR Request DEVICE QUALIFIER
37 0.384148 1.32.0 → host USB 64 GET DESCRIPTOR Response
38 0.384172 host → 1.32.0 USB 64 GET DESCRIPTOR Request DEVICE QUALIFIER
39 0.384210 1.32.0 → host USB 64 GET DESCRIPTOR Response
40 0.384234 host → 1.32.0 USB 64 GET DESCRIPTOR Request DEVICE QUALIFIER
41 0.384273 1.32.0 → host USB 64 GET DESCRIPTOR Response
42 0.384313 host → 1.32.0 USB 64 GET DESCRIPTOR Request CONFIGURATION
43 0.384393 1.32.0 → host USB 73 GET DESCRIPTOR Response CONFIGURATION
44 0.384422 host → 1.32.0 USB 64 GET DESCRIPTOR Request CONFIGURATION
45 0.384629 1.32.0 → host USB 131 GET DESCRIPTOR Response CONFIGURATION
46 0.384681 host → 1.32.0 USB 64 GET DESCRIPTOR Request STRING
47 0.384745 1.32.0 → host USB 68 GET DESCRIPTOR Response STRING
48 0.384772 host → 1.32.0 USB 64 GET DESCRIPTOR Request STRING
49 0.384999 1.32.0 → host USB 96 GET DESCRIPTOR Response STRING
50 0.385049 host → 1.32.0 USB 64 GET DESCRIPTOR Request STRING
51 0.385130 1.32.0 → host USB 72 GET DESCRIPTOR Response STRING
52 0.385160 host → 1.32.0 USB 64 GET DESCRIPTOR Request STRING
53 0.385257 1.32.0 → host USB 82 GET DESCRIPTOR Response STRING
54 0.386408 host → 1.32.0 USB 64 SET CONFIGURATION Request
55 0.386527 1.32.0 → host USB 64 SET CONFIGURATION Response
56 0.392882 host → 1.32.0 USBCOM 71 SET LINE CODING Request
57 0.393054 1.32.0 → host USB 64 URB_CONTROL out
58 0.397854 host → 1.1.0 USBHUB 64 GET_STATUS Request [Port 1]
59 0.397932 1.1.0 → host USBHUB 68 GET_STATUS Response [Port 1]
60 0.400119 host → 1.1.0 USBHUB 64 CLEAR_FEATURE Request [Port 1: C_PORT_ENABLE]
61 0.400173 1.1.0 → host USBHUB 64 CLEAR_FEATURE Response [Port 1: C_PORT_ENABLE]
62 0.439618 1.1.1 → host USB 65 URB_INTERRUPT in
63 0.439657 host → 1.1.1 USB 64 URB_INTERRUPT in
64 0.439766 host → 1.1.0 USBHUB 64 GET_STATUS Request [Port 1]
65 0.440111 1.1.0 → host USBHUB 68 GET_STATUS Response [Port 1]
66 0.440215 host → 1.1.0 USBHUB 64 CLEAR_FEATURE Request [Port 1: C_PORT_CONNECTION]
67 0.440272 1.1.0 → host USBHUB 64 CLEAR_FEATURE Response [Port 1: C_PORT_CONNECTION]
68 0.442187 host → 1.1.0 USBHUB 64 GET_STATUS Request [Port 1]
69 0.442357 1.1.0 → host USBHUB 68 GET_STATUS Response [Port 1]
70 0.475960 host → 1.1.0 USBHUB 64 GET_STATUS Request [Port 1]
71 0.476178 1.1.0 → host USBHUB 68 GET_STATUS Response [Port 1]
72 0.511937 host → 1.1.0 USBHUB 64 GET_STATUS Request [Port 1]
73 0.512158 1.1.0 → host USBHUB 68 GET_STATUS Response [Port 1]
74 0.547983 host → 1.1.0 USBHUB 64 GET_STATUS Request [Port 1]
75 0.548069 1.1.0 → host USBHUB 68 GET_STATUS Response [Port 1]
76 0.583918 host → 1.1.0 USBHUB 64 GET_STATUS Request [Port 1]
77 0.584134 1.1.0 → host USBHUB 68 GET_STATUS Response [Port 1]
78 0.584314 1.1.1 → host USB 64 URB_INTERRUPT in

And what Linux on the Sitara sees:

debian@beaglebone:~$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

0 Likes

Solved. Realized I needed a wire from the Sitara to the PSoC to act as the program button. Duh.

0 Likes