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

uClinux freeze during USB copy - Nios2 nommu - USB Host

Altera_Forum
Honored Contributor II
1,036 Views

Hello, 

 

I did a no mmu niosII platform with uClinux booting (test-nios2 branch). I use an Open Core USB Host. I can read and write in a USB Key. 

 

But I have a problem. When I copy a file upper to 20Mbyte, or 4 files of 5Mbytes, uClinux is frozen. I have no bug or warn messages but I have no shell anymore and no activity in uClinux... 

 

I checked with a USB bus analyser, and the reading and writing access work fine (any no ACK frames or error frames), even before the freeze... 

With a file of 20 Mbytes, I can see that during a copy from USB Key to USB Key, that uClinux start by read the USB Key but dosen't write to the USB Key. It freezes before. 

With a file of 5Mbytes, for example, I can see uClinux start by read the USB Key but after it writes to the USB Key... and it works fine. 

 

Can it be possible that uClinux dosen't manage its memory fine, or the USB copy fine? 

 

Thank you very much for your help. 

 

Pierre
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
211 Views

How much memory do you have and how are you copying the file?

0 Kudos
Altera_Forum
Honored Contributor II
211 Views

Hello, 

 

I use 64 Mbytes of SDRAM. I use "cp" to copy from the USB Key to USB Key. 

I tried with "dd" with different size of blocks. But it's the same. When 20 Mbytes are transfered, uClinux freezes. 

 

With the command "free", I saw the field "buffers" : when I make a copy from USB Key to USB key, the size of "buffers" increases but never decreases... 

I saw that there is an option during the kernel configuration : "kernel log buffer size" but I don't know how to calculate the real size of the buffers. 

When I make a copy from SDRAM to SDRAM this size dosen't move. 

 

Thank you for your help. 

Best regards. 

 

Pierre
0 Kudos
Altera_Forum
Honored Contributor II
211 Views

Hello, 

 

I resolved my problem. I had a SDRAM error (bank, row and column not configured well). I use the NiosII software build tools to generate a RAM test program. Now I can do copy of 20Mbytes files and more. 

The USB Host works (but with a little bandwidth). 

 

Will Altera plan to provide a RAM test program (NiosII software build tools) for Nios2 with mmu? 

 

Best regards. 

 

Pierre
0 Kudos
Reply