Announcements
IMPORTANT: Cypress Developer Community is transitioning on October 20th. To learn more and be prepared for this change, check out our latest announcement.
cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

RaSh_3782726
New Contributor II

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
Ekta
Moderator
Moderator

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
Esteemed Contributor

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
Ekta
Moderator
Moderator

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

RaSh_3782726
New Contributor II

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
EvPa_264126
Valued Contributor II

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