Quantcast
Channel: EngineerZone: Message List
Viewing all articles
Browse latest Browse all 24339

Re: sharc usb extender on 21469 board, porting example code to VDK

$
0
0

After a reboot the problem went away.

 

Now I have added some more of my code. Now the application is really broken. I have added an event handler in file eventhandler.c. It is invoked through this code in usbservices.c:

 

USB_Services_DeviceObject.DeviceEventHandler = VDK_DeviceEventHandler;

 

In main_thread.c the wait loop is now using the global variable defined in eventhandler.c:

 

while (!usb_link)              VDK_Sleep(1);

 

I have added to the enum in adi_net2272.h:

 

ADI_DEV_RESULT_NO_LINK, // 0x10017 - the usb link went down

 

and using it in adi_dev_Read:

 

    while(!pBuff->ProcessedFlag)    {              if ( !usb_link )                        return ADI_DEV_RESULT_NO_LINK;        VDK_Sleep(1);    }

 

Maybe the code I have added makes the interrupt routine execute for too long. Personally I believe that there are too much code executing in the interrupt.


Viewing all articles
Browse latest Browse all 24339

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>