-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Writing on file slowly! #47
Comments
Hi, thanks. Ch376msc flashDrive( 10, SPI_SCK_MHZ(2) ); // CS pin, com speed
// or
Ch376msc flashDrive( 10, 9, SPI_SCK_MHZ(2) );// CS pin, INT pin, com speed In addition, the module also needs some time to save the data stored in the buffer to the USB drive. Have you tried with another flash-drive or to format the drive with external software . To be easy to implement for Arduino, the library use blocking functions (wait for answer from module) |
Thanks for your reply. I have done all of them. I am using SPI communication with 12MHZ SCK and every 128 bytes is written at 4 milliseconds. Is it normal? |
Yes, that is normal ,we have to wait with the next command until the CH376 finish with file writing otherwise data loss will occur. The chip will inform the MCU when is ready to receive the next command or data. The most time consuming part is when writing continuously and the CH376 internal buffer(512byte) is filled up, then the chip require longer time to do some internal processes, this is much depends on the usb-drive used. Here you can find more details about the drives i have been used. |
Hi,
Thanks for your useful library.
I am trying to write my sensors data on file, but there is a long delay after each writing block (256 bytes), So I have to wait for the next ready(Done) from Ch376 for more than 3 milliseconds.
How much is the maximum speed for writing a file?
best regards.
The text was updated successfully, but these errors were encountered: