AnsweredAssumed Answered

bf527 hangs with shell browser

Question asked by windhunter on Nov 13, 2010
Latest reply on Jan 10, 2011 by MartinK



We try to make our custom board with bf527 to work with usb-sticks. So we try to use shell browser example. It works fine with good usb-sticks. But when i use some not so good usb-stick, the blackfin hangs. I see that there are many whiles in usb drivers (libusb527, libdrv527), where it can hang, if somethin goes wrong. I don't want to make blackfin to work with all usb-sticks. But it shouldn't hang due to inserting of a bad stick! Now it hangs on insertion of usb-stick and on writing. It reads files without problems. I notice, that if i turn on nak timeouts, i can catch bad situations. But i cannot write a code to correctly inform filesystem about this. I use the following code


          pExitCriticalArg = adi_int_EnterCriticalRegion( pDevice->pEnterCriticalArg );
          pDevice->ClassCommandComplete = TRUE;

          if (FSSDirectCallbackFunction)
                (FSSDirectCallbackFunction)( &pDevice->DeviceHandle, ADI_FSS_EVENT_MEDIA_REMOVED, 0 );
            } else
                (pDevice->DMCallback) ( pDevice->DeviceHandle, ADI_FSS_EVENT_MEDIA_REMOVED, 0 );


but it still hangs. Could you recommend a correct way to process nak-timeouts.


I use visualDsp++