emFile component for PSoC 6

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

cross mob
akkoc_1406121
Level 1
Level 1
10 likes given 5 likes given First like given

Hi,
Will emFile component for PSoC 6 be supported?

Thanks in advance.

0 Likes
1 Solution
Anonymous
Not applicable

Hi,

Yes, we plan to support emFile component in PSoC 6. Please be on the look out for this around late September.

Thanks!

View solution in original post

11 Replies
Anonymous
Not applicable

Hi,

Yes, we plan to support emFile component in PSoC 6. Please be on the look out for this around late September.

Thanks!

Anonymous
Not applicable

Hello.

Emfile seems to be unsupported by PsoC Creator 4.2 beta.

So,please let me know when emFile component for PSoC 6 be supported.

Thanks!

0 Likes
Anonymous
Not applicable

Any updates as to when the emFile component for PSoC 6 will be available? If not, how can I implement basic SD usage on PSoC 6 BLE Pioneer kit? I need this functionality urgently for my project.

Kind regards,

Matt

0 Likes

+1

0 Likes
lock attach
Attachments are accessible only for community members.
DavidC_76
Employee
Employee
First like received

Hello,

In the interim, attached is a PSoC6 project which implements a SPI based SDHC driver, loosely based on this project:

GitHub - 1nv1/ulibSD: It's a library for use SD cards in SPI mode with uControllers.

It also implements the fat_io_lib found here:

https://github.com/Jokymon/fat_io_lib

This project was tested on the CY8CKIT-062-BLE wired to the Sparkfun uSD breakout board BOB-00544 (SparkFun microSD Transflash Breakout - BOB-00544 - SparkFun Electronics) and is intended as a useful starting point for file access to SDHC cards.

I tried this out and got the following:

sdhc_fat_io_lib example application start

sdhc_spi_block_init: started sdhc_spi_block_init

sdhc_spi_block_init: CMD0 returned R1_IDLE_STATE

sdhc_spi_send_command_r7: broke out of loop cnt=2, r7[0] = 0x1

sdhc_spi_block_init: CMD8 returned R1_IDLE_STATE

sdhc_spi_block_init: ocr[0]=0x0, ocr[1]=0x0, ocr[2]=0x1, ocr[3]=0xaa

sdhc_spi_block_init: vdd range check passed

sdhc_spi_send_command_r7: broke out of loop cnt=2, r7[0] = 0x1

sdhc_spi_block_init: CMD58 returned R1_IDLE_STATE r3[1]=0x0, r3[2]==0xff, r3[3]==0x80, r3[4]==0x0

sdhc_spi_block_init: card_type==0x4

sdhc_spi_block_init: CMD55 returned r1 = 0x1

sdhc_spi_block_init: ACMD41 returned R1_IDLE_STATE, keep looping

sdhc_spi_block_init: CMD55 returned r1 = 0x1

sdhc_spi_send_command_r1: r1 not in idle state, = 0x0

sdhc_spi_block_init: ACMD41 returned R1_IDLE_STATE, keep looping

sdhc_spi_send_command_r1: r1 not in idle state, = 0x0

sdhc_spi_block_init: CMD55 returned r1 = 0x0

sdhc_spi_send_command_r1: r1 not in idle state, = 0x0

sdhc_spi_block_init: ACMD41 completed r1=0x0

sdhc_spi_send_command_r7: broke out of loop cnt=2, r7[0] = 0x0

sdhc_spi_send_command_r7: first byte r7 indicates card not in idle state, = 0x0

sdhc_spi_block_init: finished sdhc_spi_block_init

FAT_FS: Error could not load FAT details (-2)!

ERROR: Media attach failed

Directory /

ERROR: Create file failed

0 Likes

Todd,

Your log indicates that the SDHC card was initialized as expected, but the FAT_FS code wasn't able to load the FAT information from it. Has your card been FAT formatted? If not, please make sure to do so. The code is designed to read from an existing FAT formatted SDHC card, it doesn't reformat the attached media.

0 Likes

Hi David,

I am working for the first time on PSoC 6 and PSoC Creator 4.2. I am trying to develop a datalogger and your code was of big help: I can now access and read files on a 32 GB SD card. However, I see that the code does not support writing on the memory. Any chance that the "interim" solution will also cover this aspect?

Thanks a lot

Davide

0 Likes
lock attach
Attachments are accessible only for community members.

Hi Davide,

Attached is a version I worked on with student Francesco Niccolini. The SDHC block driver writes were implemented and file writes work locally, but I noticed that Windows sees the SDHC FAT volume as corrupt after writing these. The issue appears to be in the file system implementation I used as a reference and I haven’t had time to debug further yet. Note that written files can be read back locally without issue, hope this might be useful to you.

Thanks,

David

0 Likes

Thanks David, I'll give a look.

Great.

Thanks David.

 

0 Likes