This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

C55xx USB Module on Bootfile Mode is failed

Hallo e2e members,

In my Project, I use the USB module to send data to the PC.

On the debug mode for custom design board application, I avoided to use the gel file and place the initialization on vector.asm (reset_isr) to be called first time when the program started.

The debug mode works fine. But when I store the program on NOR Flash, the USB module generates the D+ and D-, but the PC won't recognize the USB Connection. I use also for example the I2S and SPI module, both are working properly.

Does someone have another suggestion what to be done to handle this program?

Thanks.

Regards,

V

  • Does the PC recognize the C5515 as an USB device in Device Manager?

    Regards.

  • Hallo Steve,

    thanks for the reply.

    On the Debug Mode, the PC recognize the USb Connection and Show the :

    HID\VID_04B3&PID_310E&REV_0110

    HID\VID_04B3&PID_310E

    HID_DEVICE_UP:FFFF_U:0001

    HID_DEVICE

    On the Bootload mode:

    USB\VID_04B3&PID_310E&REV_0110

    USB\VID_04B3&PID_310E

    So I assume, the PC read the device connection, but the communication somehow failed.

    Regards

  • You are referring to Debug mode and Bootload mode, where is your application program? For 5515, USB only boot encrypted boot image.

    Regards.

  • So:

    1. I developed a program which contains the use of I2S, SPI, and USB. The USB I used to do the  data communication with the PC.

    2. The debug mode with the custom board works fine. The PC could receive data from C5515 correctly. On this debug mode in CCS, I avoided to use the gel file (because later i want to run it stand alone from flash). All initialization I put on the assembly file, basically I translate the gel file into assembly.

    3. Next step is I download the program into flash. before that i got the bin file (use the hex55 and norwriter program provided).

    4. The writing process works fine too. I read the written data on flash and make sure the program downloaded correctly.

    5. Now I would like to boot the file from flash, and run the program without ccs.

    6. The result is: I2S and SPI work fine. USB could not be detected on PC. but I probe the USB data D+ and D-, the signal is there.

    Is there any method that I can do to check whether the USB is really working on the boot mode?

    Regards,

    Vava

  • Step 1. Good.

    Step 2. Good to avoid Gel for standalone mode. Also need to avoid allocating program code to SARAM31 memory because bootloader writes to SARAM31.

    Step 3. Good. Bootloader can boot unencrypted image created by hex55 from NOR.

    Step 4. Good practice to read back to confirm.

    Step 5. Good. Cycle power should boot image from NOR and run program.

    Step 6. Use USB bus analyzer to debug USB tranactions.

    Regards.

     

  • Hallo Steve,

    thank you for the Suggestion. I try this step now directly.

    Regards,

    Vava

  • Hallo Steve, i got some result from the USB analyzer:

    Debug on CCS

    000000: PnP Event: Device Connected (UP), 19.08.2014 10:32:29.158 (1. Device: USB-Eingabegerät)

    ThE USB device has just been connected to the system.

    000001: Get Descriptor Request (DOWN), 19.08.2014 10:32:29.158 +0.0 (1. Device: USB-Eingabegerät)

    Descriptor Type: Device

    Descriptor Index: 0x0

    Transfer Buffer Size: 0x12 bytes

    000002: Control Transfer (UP), 19.08.2014 10:32:29.158 +0.0. (1. Device: USB-Eingabegerät) Status: 0x00000000

    Pipe Handle: Control Pipe

     12 01 00 02 00 00 00 40 B3 04 0E 31 10 01 00 00

     00 01

    .......@³..1....

    ..

     Setup Packet 

     80 06 00 01 00 00 12 00

    €.......

    Recipient: Device

    Request Type: Standard

    Direction: Device->Host

    Request: 0x6 (GET_DESCRIPTOR)

    Value: 0x100

    Index: 0x0

    Length: 0x12

    000003: Get Descriptor Request (DOWN), 19.08.2014 10:32:29.158 +0.0 (1. Device: USB-Eingabegerät)

    Descriptor Type: Configuration

    Descriptor Index: 0x0

    Transfer Buffer Size: 0x9 bytes

    000004: Control Transfer (UP), 19.08.2014 10:32:29.158 +0.0. (1. Device: USB-Eingabegerät) Status: 0x00000000

    Pipe Handle: Control Pipe 

     09 02 29 00 01 01 00 A0 32

    ..).... 2

     Setup Packet 

     80 06 00 02 00 00 09 00

    €.......

    Recipient: Device

    Request Type: Standard

    Direction: Device->Host

    Request: 0x6 (GET_DESCRIPTOR)

    Value: 0x200

    Index: 0x0

    Length: 0x9

    000005: Get Descriptor Request (DOWN), 19.08.2014 10:32:29.158 +0.0 (1. Device: USB-Eingabegerät)

    Descriptor Type: Configuration

    Descriptor Index: 0x0

    Transfer Buffer Size: 0x29 bytes

    000006: Control Transfer (UP), 19.08.2014 10:32:29.158 +0.0. (1. Device: USB-Eingabegerät) Status: 0x00000000

    Pipe Handle: Control Pipe 

     09 02 29 00 01 01 00 A0 32 09 04 00 00 02 03 00

     00 00 09 21 11 01 00 01 22 35 00 07 05 81 03 40

     00 20 07 05 02 03 20 00 20

    ..).... 2.......

    ...!...."5....@

    . .... .

    Setup Packet 

     80 06 00 02 00 00 29 00

    €.....).

    Recipient: Device

    Request Type: Standard

    Direction: Device->Host

    Request: 0x6 (GET_DESCRIPTOR)

    Value: 0x200

    Index: 0x0

    Length: 0x29

    000007: Select Configuration (DOWN), 19.08.2014 10:32:29.158 +0.0 (1. Device: USB-Eingabegerät)

    Configuration Index: 1

    000008: Select Configuration (UP), 19.08.2014 10:32:29.158 +0.0. (1. Device: USB-Eingabegerät) Status: 0x00000000

    Configuration Index: 1

    Configuration Handle: 0x9b61440

    000009: Class-Specific Request (DOWN), 19.08.2014 10:32:29.158 +0.0 (1. Device: USB-Eingabegerät)

    Destination: Interface, Index 0

    Reserved Bits: 34

    Request: 0xa

    Value: 0x0

    Send 0x0 bytes to the device

    000010: Control Transfer (UP), 19.08.2014 10:32:29.158 +0.0. (1. Device: USB-Eingabegerät) Status: 0x00000000

    Pipe Handle: Control Pipe

    Setup Packet 

     21 0A 00 00 00 00 00 00

    !.......

    Recipient: Interface

    Request Type: Class

    Direction: Host->Device

    Request: 0xa (Unknown)

    Value: 0x0

    Index: 0x0

    Length: 0x0

    000011: Get Descriptor Request (DOWN), 19.08.2014 10:32:29.158 +0.0 (1. Device: USB-Eingabegerät)

    Descriptor Type: HID Report Descriptor

    Descriptor Index: 0x0

    Transfer Buffer Size: 0x75 bytes

    000012: Control Transfer (UP), 19.08.2014 10:32:29.158 +0.0. (1. Device: USB-Eingabegerät) Status: 0x00000000

    Pipe Handle: Control Pipe 

     06 FF FF 09 01 A1 01 09 02 09 03 15 00 26 FF 00

     75 08 95 18 81 02 09 04 09 05 15 00 26 FF 00 75

     08 95 06 91 02 09 07 09 07 15 00 26 FF 00 75 08

     95 04 B1 02 C0

    .ÿÿ..¡.......&ÿ.

    u.•........&ÿ.u

    .•.‘.......&ÿ.u.

    •.±.À

     Setup Packet 

     81 06 00 22 00 00 75 00

    .."..u.

    Recipient: Interface

    Request Type: Standard

    Direction: Device->Host

    Request: 0x6 (GET_DESCRIPTOR)

    Value: 0x2200

    Index: 0x0

    Length: 0x75

    000013: PnP Event: Query ID (UP), 19.08.2014 10:32:29.158 +0.0 (1. Device: USB-Eingabegerät)

    Device ID: USB\VID_04B3&PID_310E

    000014: PnP Event: Query ID (UP), 19.08.2014 10:32:29.158 +0.0 (1. Device: USB-Eingabegerät)

    Hardware IDs: USB\VID_04B3&PID_310E&REV_0110, USB\VID_04B3&PID_310E

    000015: Bulk or Interrupt Transfer (DOWN), 19.08.2014 10:32:29.158 +0.0 (1. Device: USB-Eingabegerät)

    Pipe Handle: 0x6ecf748 (Endpoint Address: 0x81)

    Get 0x18 bytes from the device

    000016: Bulk or Interrupt Transfer (DOWN), 19.08.2014 10:32:29.158 +0.0 (1. Device: USB-Eingabegerät)

    Pipe Handle: 0x6ecf748 (Endpoint Address: 0x81)

    Get 0x18 bytes from the device

    000017: Bulk or Interrupt Transfer (UP), 19.08.2014 10:32:29.173 +0.015. (1. Device: USB-Eingabegerät) Status: 0x00000000

    Pipe Handle: 0x6ecf748 (Endpoint Address: 0x81)

    Get 0x18 bytes from the device

    _________________________________________________________________________________________

    Boot file from NOR Flash:

    000000: PnP Event: Device Connected (UP), 19.08.2014 10:24:48.909 (1. Device: Unknown)

    The USB device has just been connected to the system.

    000001: Get Descriptor Request (DOWN), 19.08.2014 10:24:48.909 +0.0 (1. Device: Unknown)

    Descriptor Type: Device

    Descriptor Index: 0x0

    Transfer Buffer Size: 0x12 bytes

    000002: Control Transfer (UP), 19.08.2014 10:24:48.909 +0.0. (1. Device: Unknown) Status: 0x00000000

    Pipe Handle: Control Pipe 

     12 01 00 02 00 00 00 40 B3 04 0E 31 10 01 00 00

     00 01

    .......@³..1....

    ..

     Setup Packet

     80 06 00 01 00 00 12 00

    €.......

    Recipient: Device

    Request Type: Standard

    Direction: Device->Host

    Request: 0x6 (GET_DESCRIPTOR)

    Value: 0x100

    Index: 0x0

    Length: 0x12

    000003: Get Descriptor Request (DOWN), 19.08.2014 10:24:48.909 +0.0 (1. Device: Unknown)

    Descriptor Type: Configuration

    Descriptor Index: 0x0

    Transfer Buffer Size: 0x9 bytes

    000004: Control Transfer (UP), 19.08.2014 10:24:48.909 +0.0. (1. Device: Unknown) Status: 0x00000000

    Pipe Handle: Control Pipe

     

     09 02 29 00 01 01 00 A0 32

    ..).... 2

    Setup Packet 

     80 06 00 02 00 00 09 00

    €.......

    Recipient: Device

    Request Type: Standard

    Direction: Device->Host

    Request: 0x6 (GET_DESCRIPTOR)

    Value: 0x200

    Index: 0x0

    Length: 0x9

    000005: Get Descriptor Request (DOWN), 19.08.2014 10:24:48.909 +0.0 (1. Device: Unknown)

    Descriptor Type: Configuration

    Descriptor Index: 0x0

    Transfer Buffer Size: 0x29 bytes

    000006: Control Transfer (UP), 19.08.2014 10:24:48.909 +0.0. (1. Device: Unknown) Status: 0x00000000

    Pipe Handle: Control Pipe 

     09 02 29 00 01 01 00 A0 32 09 04 00 00 02 03 00

     00 00 09 21 11 01 00 01 22 35 00 07 05 81 03 40

     00 20 07 05 02 03 20 00 20

    ..).... 2.......

    ...!...."5....@

    . .... .

    Setup Packet

     80 06 00 02 00 00 29 00

    €.....).

    Recipient: Device

    Request Type: Standard

    Direction: Device->Host

    Request: 0x6 (GET_DESCRIPTOR)

    Value: 0x200

    Index: 0x0

    Length: 0x29

    000007: Select Configuration (DOWN), 19.08.2014 10:24:48.909 +0.0 (1. Device: Unknown)

    Configuration Index: 1

    000008: Select Configuration (UP), 19.08.2014 10:24:48.909 +0.0. (1. Device: Unknown) Status: 0x00000000

    Configuration Index: 1

    Configuration Handle: 0x6ef3ca0

    000009: Class-Specific Request (DOWN), 19.08.2014 10:24:48.909 +0.0 (1. Device: Unknown)

    Destination: Interface, Index 0

    Reserved Bits: 34

    Request: 0xa

    Value: 0x0

    Send 0x0 bytes to the device

    000010: Control Transfer (UP), 19.08.2014 10:24:48.909 +0.0. (1. Device: Unknown) Status: 0x00000000

    Pipe Handle: Control Pipe 

    Setup Packet 

     21 0A 00 00 00 00 00 00

    !.......

    Recipient: Interface

    Request Type: Class

    Direction: Host->Device

    Request: 0xa (Unknown)

    Value: 0x0

    Index: 0x0

    Length: 0x0

    000011: Get Descriptor Request (DOWN), 19.08.2014 10:24:48.909 +0.0 (1. Device: Unknown)

    Descriptor Type: HID Report Descriptor

    Descriptor Index: 0x0

    Transfer Buffer Size: 0x75 bytes

    000012: Control Transfer (UP), 19.08.2014 10:24:48.909 +0.0. (1. Device: Unknown) Status: 0x00000000

    Pipe Handle: Control Pipe

    Invalid descriptor structure!

    Setup Packet

     

     81 06 00 22 00 00 75 00

    .."..u.

    Recipient: Interface

    Request Type: Standard

    Direction: Device->Host

    Request: 0x6 (GET_DESCRIPTOR)

    Value: 0x2200

    Index: 0x0

    Length: 0x75

    000013: Abort Pipe (DOWN), 19.08.2014 10:24:48.925 +0.015 (1. Device: Unknown)

    Pipe Handle: 0x712f3f8 (Endpoint Address: 0x81)

    000014: Abort Pipe (UP), 19.08.2014 10:24:48.925 +0.0. (1. Device: Unknown) Status: 0x00000000

    Pipe Handle: 0x712f3f8 (Endpoint Address: 0x81)

    000015: PnP Event: Device Disconnected (UP), 19.08.2014 10:24:48.925 +0.0 (1. Device: Unknown)

    The USB device has just been removed from the system, all drivers all drivers unloaded

    _________________________________________________________________

    Is it possible that the device could not be recognized caused by the hardware reset at the beginning that influence the setup of USB?

     

    Thank you.

     

    Regards,

    Vava

  • No. I am not an USB expert but I think you problem is because in CCS, your program is halted while in boot mode, it exits. Thus in boot mode the USB analyzer claims the device is removed.

    Regards.

  • We just found one failure inside the program. There is one buffer contains the constants to be used on the USB initialization declared without 'const'. This becomes the problem when we write into Flash Memory. If we looked into the USB analyzer, these initialization bytes always read on the PC as 0x00. Now the USB Connection is recognized in the PC :) although now the next transmission is not correct, sometimes the data sent to the PC, sometimes it is not sent.

    Thanks for the suggestion to use the USB Analyzer, Steve! It brought us to the solution faster.

    Regards,

    Vava

  • Glad it helps. I am sure you will get to the bottom very soon.

    Regards.

  • Hallo Steve,

    I left the USB part for a while and just got back to this Problem last Friday. I just now I found the cause of the failure.

    All the Setting for clock and USB Setup are ok. There is something important that I just read from the USB guide this morning: "USB can access internal single-access (SARAM) and external memory. It can not Access the dual-Access RAM (DARAM)."

    I looked into my memory mapping file, and that's the suspect is there :) the USB still Access some data from DARAM. Problem solved! :)

    I suggest for People who found difficulties in building USB Connection, to use free usb analyzer software was Steve's Suggestion. since it is difficult to see the signal on the scope, by reading the data sent/received in the PC, we could really track the miss data.

    Regards,

    Vava

  • Hello Vava,

    Thank you very much for sharing your successful experiences with us. This is the spirit of E2E forum to help each others.

    Glad that your problem is resolved.

    Regards.