2

I am working on my home made project where i am using SD card to log GPS data into it,As well as i have to access that data from the SD card on my computer while all the system is connected to battery power, so i also have a USB to SD chip USB2240 from Microchip, this SD controller suits best to my application, Because USB2240 has a card detect pin connected to one of the pin of Arduino, from which i can control interface of SD card between Arduino for logging and the computer for the USB..

But I have to Recycle power to the SD card whenever SD Card is interfaced with the USB controller USB2240.

So for an Example : when the device is powered 'ON' , The SD card is interfaced with the Arduino - which logs data to the card, But when i connected the system to my computer to get the logged file on my computer, Then it's not working, Here i have to disconnect power to SD card and Reconnect it...

How do i achieve Power recycle all on it's own when i connected to the USB OR to the Arduino.

Thanks

2

I just read the

USB2240 Part listing

and it looks really handy for interfacing a PC to the flash.

However, I believe you are taking the wrong approach by trying to power recycle it yourself.

To address your question about how to power recycle it: If you are physically moving the connection cable then that should power recycle it automatically.

If not, then you have some other problem with your software not tolerating the disappearance then reappearance of the SD card. In other works, it is likely a software problem. The SD card should always remain connected so the software does not get confused and require a reset.

It is like how you need to eject USB devices in Linux. If you don't, then you can get file corruption because the buffers may not be fully flushed. Back in the day we used sync; sync; sync to ensure buffers were written out to storage devices, even just to do a normal shutdown. Fortunately, modern Linux takes care of that, with the exception of USB flash memory. With that you need to actually go through the eject process to avoid damage or system confusion.

But a much better approach would be to just leave it on one or the other.
Then use some sort of communications (it doesn't have to be USB) between the two computers for memory access.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.