Regarding SD card file reading in PC

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
RaSh_3782726
Level 3
Level 3
10 replies posted 10 questions asked 5 replies posted

HI ALL,

I am stuck in sd card file reading in PC.

I am writing large size file (FILE.DAT  5 GB SIZE) in sd card file after finishing the write process I want to read file any way which copy to pc without removing sd card.

I am using fs file system and psoc 5LP-097, kit.

The protocol i used for sd card is spi.

And the components for sd card is emFile OF SPI COMMUNICATION.

ALSO I FOCUS MY HARDWARE CONSTRAIN ,

1) SD CARD INTERFACE SPI CONNECTION WITH 097 KIT

2) DID NOT WANT TO REMOVE SD CARD

3) SD CARD HAVE LARGE SIZE OF FILE IN GB'S SO NOT APPLICABLE UART (IF USEFUL THAN HOW?)

4) ALSO NEED TO FASTER SPEED FOR COPY THIS FILE

5) MY CIRCUIT HAVE UART PORT ALSO IF ANY COMPONENT USE (EX: USBFS ) YOU CAN ADD, I HAVEN''T ANY IDEA FOR USBFS , HOW TO SHOWING FILE OF SD CARD ON PC,

SO, PLEASE HELP FOR THIS ,;

THANKS & REGARDS,

RATHANG SHAH.

STAY HOME, STAY SAFE...

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
Ekta_N
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hi,

I am attaching a project that implements USB Mass Storage Class in PSoC 3 and PSoC 5LP device.

The provided example demonstrates a convenient method to gather data, store it in internal or SD card memory, and make it available to a PC for post processing.

Please note that the attached project is just an example project to show this functionality and has not been validated.

Regards

Ekta

View solution in original post

4 Replies
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

First of all, please note that I am not very familiar with USB details.

Following is/are my idea sketch so I don't have any "Final Answer."

Off my head

(1) Use USBUART to send the contents of the file from 5LP to PC.

(2) Use USBF as MSC mode and let the board act as a USB memory.

I think that

(1) will be easier and although using "UART" communication since the hardware is USBFS, the transfer speed could be fast as a UART.

(2) will be much easier to use, but much harder to implement, as you need to implement a USB Mass Storage Class or find a sample from somewhere.

So, if I were you, I would do if I can find a sample and otherwise I will go with (1).

moto

0 Likes
lock attach
Attachments are accessible only for community members.
Ekta_N
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hi,

I am attaching a project that implements USB Mass Storage Class in PSoC 3 and PSoC 5LP device.

The provided example demonstrates a convenient method to gather data, store it in internal or SD card memory, and make it available to a PC for post processing.

Please note that the attached project is just an example project to show this functionality and has not been validated.

Regards

Ekta

Ekta,

docx file have download issue.

And code have

Build error: 'MSC_CBW_PHASE' undeclared (first use in this function)

please tell me what is the value of MSC_CBW_PHASE ?

0 Likes

The project contains 2 sets of identical files USBFS_MSC.xxx

(the second appears after compilation)

another data format StorageMemory_Write (...)

etc.

Simple solution: use PSoC Creator3.1 (up to 4.0 without updating components)

0 Likes