Giter Club home page Giter Club logo

Comments (3)

djuseeq avatar djuseeq commented on September 11, 2024

Hi, thanks.
What communication interface you use? If its serial then you can choose a higher baud rate(up to 115200), in case of using SPI the default speed is low (125kHz) in sake of stability if e.g. using long cables on a breadboard , but you can use these function-like macros when creating an object : (in case of Arduino with 16MHz Sys Clock, the maximum value can be 8MHz, but on this speed the communication it can become unreliable.Try with short wires)
SPI_SCK_KHZ( ) or SPI_SCK_MHZ( ) .
E.g.

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)

from ch376msc.

etoshey avatar etoshey commented on September 11, 2024

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?

from ch376msc.

djuseeq avatar djuseeq commented on September 11, 2024

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.
2GB no name drive, worst case is more than 91 ms waiting for the module.
Screenshot_20210407_114339

32GB PNY, worst case is 3.5 ms waiting for the module.
Screenshot_20210407_114506

from ch376msc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.