djuseeq / Ch376msc

Arduino library for CH376 mass storage contoller
MIT License
77 stars 17 forks source link

[SPI interface] USB is not detecting and Prints as Attach flash drive first! #53

Open embhobbb opened 3 years ago

embhobbb commented 3 years ago

I am using Arduino Uno borad and CH376S USB host module. And I have connected with SPI interface as shown in the following figure. I didn't connect INT pin. image

I was trying basicUsageSPI example but didn't work for me. On serial it was printing like as

*************************
Attach flash drive first!
*************************

Any suggestions?

djuseeq commented 3 years ago

Sorry for the late reply, is there something else connected to the SPI port or just the module? If the SPI port is shared with other devices too then INT pin is required.

ymg2006 commented 2 years ago

Same problem here. The SPI port is not shared at my setup. The only connected device is CH376s. Tested with Arduino UNO and WEMOS Lolin32. The UART is working fine but SPI is not working on both. The light on the CH376s stays on when the USB is inserted and the LED on the memory itself blinks when inserted. Here is a complete wireing setup:

Color CH376s Arduino UNO Name
Yellow D3 D10 SCS
Blue D5 D13 SCK
Purple D6 D11 SDI-MOSI
Pink D7 D12 SDO-MISO
White 5v 5v 5v
Brown 3.3v 3.3v 3.3v
Orange GND GND GND
Red GND GND GND
Black GND GND GND

Used your default example basicUsageSPI.

ymg2006 commented 2 years ago

After checking wires, one of them was corrupted. After getting it fixed and it worked well. I think you should close this issue. I will verify on WEMOS Lolin32 too. Thanks.