Code Monkey home page Code Monkey logo

Comments (6)

shivang705 avatar shivang705 commented on September 2, 2024 1

Ok! Thanks for the response! Now, I have connected external power supply (SMPS) to power the IC and it is working great!

from ch376msc.

djuseeq avatar djuseeq commented on September 2, 2024

Hi @shivang705 , thanks.
The setSource() function will initialize the IC to SD or USB Host mode. If i understand correctly, you want to use the SD card and Flash Drive simultaneously, what is not supported by the IC. This behaviour with the SD card is similar to IC with old FW and Win10 formatted partition. Try to format with third party software.

from ch376msc.

shivang705 avatar shivang705 commented on September 2, 2024

Thanks for the response!

I referred the datasheet and found out that power-on / external reset is mandatory before switching to SD mode. I will try doing that!

I want to use either SD Card or USB Pendrive at a time and not simultaneously. But, the provision will be there for both USB Pendrive and SD card. So I required a software solution to switch between the two!

I will also try formatting the SD card with third party software and will test it again!

Also, when both USB pendrive and SD card are connected, with setSource(0) at the beginning of the code, USB pendrive works fine. But, with setSource(1) at beginning of the code, SD card does not works. It always shows Attach drive first.
Is it because of init() function where IC is set to default MODE_HOST_0 mode?

from ch376msc.

djuseeq avatar djuseeq commented on September 2, 2024

You don't need to reset the module, just call setSource() function with appropriate mode (0 - USB, 1 - SD). First always init the module, this will configure to MODE_HOST_0 and afterwards you can switch to SD. Also very important to use the capacitors + resistor in the SD card VCC line because otherwise when you inserting the card that will cause a large voltage drop for a short period on the VCC line which leads to instability issue and this can cause what you noticed(get the "Attach drive first" message) and if this happens then the only solution is resetting the module.

from ch376msc.

shivang705 avatar shivang705 commented on September 2, 2024

Sorry for the late reply!

Right now, I have connected both SD Card and USB pendrive. I have set setSource(1) with SD mode. But I am unable to read/write through SD Card.
But when I remove Pen Drive and reset the IC, It works. And when I reconnect the Pen Drive, it does not works. Why is it so?

from ch376msc.

djuseeq avatar djuseeq commented on September 2, 2024

It can be a voltage instability on the VCC line.

Also very important to use the capacitors + resistor in the SD card VCC line because otherwise when you inserting the card that will cause a large voltage drop for a short period on the VCC line which leads to instability issue and this can cause what you noticed(get the "Attach drive first" message) and if this happens then the only solution is resetting the module.

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.