I unable to list file the file from usb mass storage class please guide me is it possible to deactivate usb power enable. ?
thank you
I unable to list file the file from usb mass storage class please guide me is it possible to deactivate usb power enable. ?
thank you
So what have you tried?
Do any other file handling functions work?
What debugging have you done to see where it's going wrong?
You are talking about mass-storage implemented on the nRF52840 itself, aren't you - not the mass storage of the on-board J-Link ?
"Unable to operate on filesystem while USB is connected" I get this while call to fatfs_ls(); function. in nrf52840 sdk15.2 usbd_msc example code.
You didn't answer the questions:
Do any other file handling functions work?
What debugging have you done to see where it's going wrong
You are talking about mass-storage implemented on the nRF52840 itself, aren't you - not the mass storage of the on-board J-Link
Remember that we can't read your mind, we can't see what you're doing, and we can't see what's happening.
while USB is connected
Which "USB" ?
Connected to what?
If you're trying to use USB MSC in the nRF52840 while the PC is also using the same USB MSC, see:
https://devzone.nordicsemi.com/f/nordic-q-a/50310/msc-and-ble-uart/200839#200839
I get this while call to fatfs_ls();
What, exactly, do you get?
Is it returning an error code?
Have any previous FatFs calls returned error codes?
What debugging have you done to see where it's going wrong
Since we are not aware of where we should start debugging from we created this case.
You are talking about mass-storage implemented on the nRF52840 itself, aren't you - not the mass storage of the on-board J-Link
We are running the code USB_MSC example which we are certain creates the USB Mass Storage device using the nRF52840 and not the JLINK.
Which "USB" ?
The USB which is connected to our Windows PC. This is the USB port of the nRF52840 which shows up as a USB mass storage 'flash drive'.
If you're trying to use USB MSC in the nRF52840 while the PC is also using the same USB MSC, see:
https://devzone.nordicsemi.com/f/nordic-q-a/50310/msc-and-ble-uart/200839#200839
Yes this is precisely what we are also trying to do. Take the data into the QSPI RAM and send it out using the NUS. We are using a single USB port on a Windows machine for power and for Data. If we 'eject' the device from the USB port all file handling functions are running fine. If we don't do that then we cannot implement any file handling features.
Our goal is to get the file into the USB Mass storage 'flash drive' and send it out over BLE without interacting with the host OS and then deleting the same file while we wait for another file to come in from the host.
Please advice
What debugging have you done to see where it's going wrong
Since we are not aware of where we should start debugging from we created this case.
You are talking about mass-storage implemented on the nRF52840 itself, aren't you - not the mass storage of the on-board J-Link
We are running the code USB_MSC example which we are certain creates the USB Mass Storage device using the nRF52840 and not the JLINK.
Which "USB" ?
The USB which is connected to our Windows PC. This is the USB port of the nRF52840 which shows up as a USB mass storage 'flash drive'.
If you're trying to use USB MSC in the nRF52840 while the PC is also using the same USB MSC, see:
https://devzone.nordicsemi.com/f/nordic-q-a/50310/msc-and-ble-uart/200839#200839
Yes this is precisely what we are also trying to do. Take the data into the QSPI RAM and send it out using the NUS. We are using a single USB port on a Windows machine for power and for Data. If we 'eject' the device from the USB port all file handling functions are running fine. If we don't do that then we cannot implement any file handling features.
Our goal is to get the file into the USB Mass storage 'flash drive' and send it out over BLE without interacting with the host OS and then deleting the same file while we wait for another file to come in from the host.
Please advice
If we 'eject' the device from the USB port all file handling functions are running fine. If we don't do that then we cannot implement any file handling features
Which certainly points to the fact that Windows is "locking" the filesystem - doesn't it?
As noted in the linked thread, you meed a whole extra layer of management to enable multiple, shared access to a single filesystem.
A simple implementation like FatFs is unlikely to support that - you will have to check the FatFs documentation to confirm:
http://elm-chan.org/fsw/ff/00index_e.html
http://elm-chan.org/fsw/ff/bd/
Windows does have certain options to control how/whether it caches data to/from removable devices - you might want to investigate whether any of these helps ...