USB Host MSD Fatfs FreeRTOS Example Problems

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USB Host MSD Fatfs FreeRTOS Example Problems

1,303 Views
Microfelix
Contributor IV

hi, i am using K66 and freertos sdk 2.10.0.
I am working on USB with fatfs and freertos. During the development of my project I realized that every now and then the reading of a USB file fails.
So I created a routine that continuously reads a file and after several reads it goes into error giving "DISK_ERROR"

Help me

Maurizio

 

0 Kudos
4 Replies

1,296 Views
Microfelix
Contributor IV

what I noticed from the tests is that this kind of error occurs if I insert other "ENET lwip" work tasks in the project.
As soon as this task is activated, errors become very frequent.
While if, I disable it, there are + no errors and it completes many readings

 

Maurizio

0 Kudos

1,275 Views
bobpaddock
Senior Contributor III

USB can be Interrupt intense.
Could lwip be disabling IRQs too long?

 

0 Kudos

1,247 Views
Microfelix
Contributor IV

hi,
it seems that the problem occurs more frequently when I have large files.
With small files the problem is not there.

Any solution?

 

Maurizio

0 Kudos

1,269 Views
Microfelix
Contributor IV

I thought about this. In fact I tried to change the IRQ values. I changed the priorities of the usb which was originally 6. I took it to a lower level and nothing has changed. I tried to raise it a lot, and it seems to be doing better but it still goes wrong.

Is there any other way to fix?
Is it possible that while you are working the usb, the other interrupts go to the queue?

 

Maurizio

0 Kudos