This is a discussion on Flash Device Reading and writiing advice - VxWorks ; Hi All i have 1 usb mass storage card and driver (source code ) for this mass storage card.. when i compiled and builded the driver i got these msgs... /bd0 bulk device is created /bd5 bulk device is created ...
Hi All
i have 1 usb mass storage card and driver (source code ) for this mass storage card.. when i compiled and builded the driver i got these msgs...
/bd0 bulk device is created
/bd5 bulk device is created
/bd10 bulk device is created
/bd15 bulk device is created
since my card is 64GB when i tried on WINDOWS/ LINUX , it detects as a 4 (16 GB each ) memory sticks and i m able to paste files and folders in it. becoz file system is already there is windows/linux .
but i am working on vxworks 653 and there is no file system implemented yet . so how can i read and write data to the usb sticks /flash device... ?
i went in driver code there they have given some calls to read and write data to physical sector.
like LOCAL STATUS usbBulkDevBlkWrt / usbBulkDevBlkRead
(
BLK_DEV * pBlkDev, /* pointer to bulk device */
int blkNum, /* logical block number */
int numBlks, /* number of blocks to write */
char * pBuf /* data to be written */
)
which inside calls scsi command like usbFormScsiCommand and usbExecuteScsiCommand ..
so to keep these read write calls in mind i made one function device access to write to sector and read from sector
by giving
pBlkDev = /bd0 / /bd5 etc..
blkNum = 0
numBlks = 31326208 (max. size because size of each stick is 16 GB )
and pbuf = any string
but it does not write and hangs in between ...so please help me in accessing Flash Device / usb stick.
thanks and best regards
mark.s