2009-06-10 04:42:08     Using Clock API for Knowing Time taken

Document created by Aaronwu Employee on Aug 15, 2013
Version 1Show Document
  • View in full screen mode

2009-06-10 04:42:08     Using Clock API for Knowing Time taken

Narendra Nath (INDIA)

Message: 75441   

 

Hi

 

       I am working on BF533 based board with ISP1761 as USB Host controller .I need support for following two queries

 

1. I want to get details of time taken for reading from MSC device.I am using following Piece of code for the same

 

Start=clock();

fread(testdata,sizeof(unsigned char),INPUT_FILESIZE,fo);

Stop=clock();

Timetaken=Stop-Start;

 

Can you please let me know if Timetaken is time taken  to read INPUT_FILESIZE bytes/Is there any other way could know.

 

2. With the USB Host controller drivers the following prints are coming immediately after  inserting USB

 

usb 1-1.2: new high speed USB device using isp1761 and address 4

usb 1-1.2: Product: Mass Storage Device

usb 1-1.2: Manufacturer: Generic

usb 1-1.2: SerialNumber: DBZ3BN98

usb 1-1.2: configuration #1 chosen from 1 choice

scsi1 : SCSI emulation for USB Mass Storage devices

usb 1-1.2: new high speed USB device using isp1761 and address 4

 

after around 15 to 20 sec the below prints are coming,IS that  its taking around this time to establish USB as MSC device.So is there any way i could reduce this time

 

scsi 1:0:0:0: Direct-Access     JetFlash TS512MJF2A/120   8.07 PQ: 0 ANSI: 2

sd 1:0:0:0: [sda] 1003518 512-byte hardware sectors (514 MB)

sd 1:0:0:0: [sda] Write Protect is off

sd 1:0:0:0: [sda] Assuming drive cache: write through

sd 1:0:0:0: [sda] 1003518 512-byte hardware sectors (514 MB)

sd 1:0:0:0: [sda] Write Protect is off

sd 1:0:0:0: [sda] Assuming drive cache: write through

sda:<7>usb-storage: queuecommand called

unknown partition table

sd 1:0:0:0: [sda] Attached SCSI removable disk

 

Best Regards

 

Narendra

Attachments

    Outcomes