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.

AM5746: Issue about the reading data from the external USB flash drive

Part Number: AM5746
Other Parts Discussed in Thread: MATHLIB, SYSCONFIG

Dear TI Expert

We encountered the usb issue of AM5746 with our custom board.

When we read some data from the external USB flash drive, the data read from the usb sometimes are corrupted. For example, the last 2 or 3 bytes of 512 bytes got to be zero.

We investigated the above issue and following facts are confirmed.

  • In the function “USBHostRead” in usb_xhci_hcd.c, the data which is pointed by *puData is corrupted before exiting the function
  • As we inserted the usb_osalDelayMs(15) at the line just below “xhci_wait_for_event(baseAddr);”, the issue is never happened.
  • If we change the USB flash drive to other product, the probability of issue is changed.

Considering above facts, we plan to insert “usb_osalDelayMs(15)”.

However, why the issue happened whether the delay existed?

Could you answer the below questions?

  1. Is it possible that the data transfer to *puData is not finished after “xhci_wait_for_event(baseAddr);”?
  2. Is it possible that the product type of USB flash drive affect the possibility of the transfer failure?
  3. If we insert the above delay, what is the recommended delay time?

Below is the our environment information

- CPU: AM5746

- Board: Custom Board based idkAM574x

- SDK Version

am57xx OpenMP v2.6.3.00

am57xx PDK v1.0.18

CTools Library v2.2.0.00

DSPLIB C66x v3.4.0.4

EDMA3 Low Level Driver v2.12.5

Framework Components v3.40.2.07

IMGLIB C66x v3.1.1.0

IPC v3.50.4.08

MATHLIB C66x v3.1.2.4

NDK v3.61.1.01

SYS/BIOS v6.76.3.01

SysConfig v1.9.0

System Analyzer (UIA Target) v2.30.1.02

XDAIS v7.24.0.04

- IDE: CCS Version: 10.4.0.00006