Comments (6)
Ok! Thanks for the response! Now, I have connected external power supply (SMPS) to power the IC and it is working great!
from ch376msc.
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.
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.
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.
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.
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)
- ch376s not working with esp32 HOT 4
- readFileUntil() return "false" for both EOF and the record terminator HOT 3
- interfacing ch376s module with build in sd HOT 3
- Init function hangs the application HOT 2
- Volume Label Information
- Files are not created when called using separate fileOpen, fileWrite and fileClose functions
- i can't write string to flash drive. HOT 2
- "Flash Drive Attached" instability
- Long filename support
- To pair the Ch376msc with the library ESP32-audioI2S
- drive is detached
- readFileUntil() crashing when trying to read more than the buffer size
- FS Struct needed HOT 2
- Reading pictures from USB HOT 2
- Speed on HW Serial and small buffer
- Library update required HOT 1
- Read a USB barcode, is it possible ?
- Contact me please! Ch376msc write problem
- Micropython wrapper anyone?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ch376msc.