TI中文支持网
TI专业的中文技术问题搜集分享网站

Am3352 USB1 port connect to 4G Modem(USB Host Mode, use USB cable)problem(Anti-interference)

Hi, all:

    In our application, we use Am3352 USB1 port connect to 4G modem through USB cable. Because the product is used in the base station, the electromagnetic interference on site is relatively strong, we found that the driver(option.ko)of 4G modem can’t load normally, sometimes attached, sometimes disconnected, continued, as follows:

     We think it may be caused by interference of USB cable, replace another USB cable for experiment, the result is more serious, the USB message of the kernel prompts an error, as follows:

    Since the 4G modem is a High-Speed device, the driver recognizes the High-Speed device when loading, which is more vulnerable to interference, so we consider forcing the USB1 port of Am3352 into Full-Speed mode, modified /drivers/usb/musb/musb-core.c, as follows:

    In the field test, it has obvious effect and the drive(options.ko) can be loaded normally, and the product works normall.

    However, after running for a period of time, the 4G modem's network is disconnected, check the cause, and find the USB printing information prompt error of the kernel, as follows:

   Prompt "Babble Interrupt Occurred usb1-1: USB disconnect, device number 2" error messages, and it can not be restored to normal, only restart the product.

We don't know the cause of the problem, the site can't be recovered, and the customer complains.

We now have two questions:

1. We use SDK7, how to modify the software of kernel to force the USB1 port of Am3352 to work in Full-Speed mode? Is the current modification method correct?

2. Why does “Babble Interrupt Occurred” error occur? How to modify the software of kernel to solve this problem?

Nancy Wang:

SDK7是比较老的版本,建议用新的SDK。
Babble的问题 主要是由于噪声引起的,可能是因为4G radio, 这是硬件问题引起的,软件上没有办法避免,建议改善系统来减少usb总线上的噪声。

Tony Tang:

回复 Nancy Wang:

请打下面链接提供的相应patch:

http://processors.wiki.ti.com/index.php/Sitara_Linux_MUSB_Issues

 AMSDK 07.00.00.00

7.1. USB gadget driver is failed to load while it is built into the kernel image.

If a USB gadget driver is selected and built into the kernel along with MUSB drivers, the gadget driver initialization failed. The output of command 'cat /sys/class/udc/musb-hdrc.0.auto/uevent' does not show 'DRIVER=<xxx>'.

Solution: 'Manually' apply Ezequiel Garcia's patch [ARM: dts: am33xx: Move the cppi41dma node so it's probed early].

Please ensure all MUSB related drivers are not confiugered as module, or the gadget driver is unable to bind to UDC.

7.2. MUSB CPPI DMA driver does not handle RX Zero-Length Packet (ZLP).

Solution: Apply Daniel Mack's patch [dma: cppi41: handle 0-length packets].

7.3. Kernel crashes if unplug a USB device while a USB transfer is till active.

Solution: Apply the following Daniel Mack's patches, which are available in mainline kernel v3.14.

a. [usb: musb: use is_host_active() to distinguish between host and gadget mode].

b. [usb: musb: fix bit mask for CSR in musb_h_tx_flush_fifo()].

7.4. Fix RX short packet handling in host mode

Solution: Apply Daniel Mack's patch [usb: musb: introduce dma_channel.rx_packet_done]. This patch is available in mainline kernel v3.14.

7.5. Access incorrect endpoint CSR registers, which causes strange issues such as stream starvation.

Solution: Apply Daniel Mack's patch [usb: musb/cppi41: call musb_ep_select() before accessing an endpoint's CSR]. This patch is available in mainline kernel v3.14.

7.6. Fire hrtimer too late for pre-mature TX DMA completion interrupt for smaller packets.

Solution: Apply the following Daniel Mack's patchs, which are available in mainline kernel v3.14.

a. File:0001-Revert-usb-musb-musb cppi41-Handle-ISOCH-differently.patch.gz.

b. [usb: musb: cppi41: fire hrtimer according to programmed channel length].

7.7. In some cases the USB port is dead due to a USB PHY operation is following the PHY power on transition too quickly.

Solution: 'Manually' apply Daniel Mack's patch [usb: phy: am335x-control: wait 1ms after power-up transitions]. This patch is available in mainline kernel v3.14.

赞(0)
未经允许不得转载:TI中文支持网 » Am3352 USB1 port connect to 4G Modem(USB Host Mode, use USB cable)problem(Anti-interference)
分享到: 更多 (0)