Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12600 Discussions

>30% CPU load increase with USB FLash plugged in (lots of SOF interrupts)

Altera_Forum
Honored Contributor II
1,721 Views

Hi, 

 

I have a Cyclone V (kernel 4.1.22-ltsi-rt) with an USB3320 transceiver connected to USB1. There is a USB2422 HUB (2 port) connected to USB3320. One of the ports is connected to a 4 port CY7C65630. 

 

 

CV <--> USB3320 <--> USB2422 <-port 2-> CY7C65630 <-4-ports-> (unused) | <-port 1-> USB Flash  

 

When I plug-in a USB flash to USB2422 (port 1), CPU load increases by ~30% (two IRQ 36 handlers). I've found out that this is mainly due to the Start-of-Frame (SOF) interrupts being triggered every 125us. I have also enabled CONFIG_USB_DWC2_TRACK_MISSED_SOFS in the kernel and I get a dump of first 1000 missed SOFS very quickly.  

 

Except from the above, the USB Flash is mounted and can be used without a problem. 

 

My question is, is the CPU load normal or have I configured something incorrectly? 

 

 

usbphy0: usbphy@0 { 

# phy-cells = <0>; 

compatible = "usb-nop-xceiv"; 

status = "okay"; 

}; 

 

usb0: usb@ffb00000 { 

compatible = "snps,dwc2"; 

reg = <0xffb00000 0xffff>; 

interrupts = <0 125 4>; 

clocks = <&usb_mp_clk>; 

clock-names = "otg"; 

phys = <&usbphy0>; 

phy-names = "usb2-phy"; 

status = "disabled"; 

}; 

 

usb1: usb@ffb40000 { 

compatible = "snps,dwc2"; 

reg = <0xffb40000 0xffff>; 

interrupts = <0 128 4>; 

clocks = <&usb_mp_clk>; 

clock-names = "otg"; 

phys = <&usbphy0>; 

phy-names = "usb2-phy"; 

status = "disabled"; 

}; 

 

 

BR mrkozmic
0 Kudos
2 Replies
Ventura
Beginner
917 Views

Dear Mr. @mrkozmic

 

Have you been able to fix this issue?

 

Like you, I'm currently testing a Cyclone V Board [1] with Linux Kernel 4.1.22 with RT Patch.

 

My USB Devices are a little different:

CV <--> USB3320 <--> SMSC_LAN9500

I don't have a hub connected to the USB-PHY. I am directly connecting an USB to Ethernet device.

 

I disabled the OTG, so that I only have two IRQs instead of the default 3 IRQs assigned by the dwc2 driver (USB driver).

I am currently watching around 20% CPU usage, but when I had the 3 interrupts, I also had 30% CPU usage exactly like you reported.

 

The number of interrupts observed on /proc/interrupts for IRQ45 (all USB interrupts) are also very very high too, around 7000 interrupts per second!

 

For debug, I also tested the non-RT version and this issue does not occur.

 

Best Regards,

Ventura

 

[1] - https://rocketboards.org/foswiki/Documentation/ArrowSoCKitEvaluationBoard

0 Kudos
MrFdez
Beginner
663 Views

Dear Mr. @mrkozmic and Ventura,

 

Did you get any conclusion on the above commented issue? We are experiencing the same situation in our Cyclone V based board.

 

Regards,

 

Mr Fdez

0 Kudos
Reply