FX3S- FatFs file create problem

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

cross mob
rasu_4591691
Level 2
Level 2

Hi

I am using PACTRON'S FX3S FPGA Dev Board REV-C. I try to create a new file in SD card using cyfx3s_fatfs example project. I am using only one storage port (s0 port). I connected a SD card to the board and that will mount without a problem. However when I try to create a file using f_open() function, it seems like it enters the function but never comes out.

I am using UART configuration only for debugging purpose, And I check the code using CyFXUartPrint() . It seems like Inside the f_open() function the  chk_mounted() function returns FR_DISK_ERR. But f_open function never comes out. As you can see the check1 passed and the check2 failed.

          

            CyFXUartPrint (0, "CHECK1\r");

           rc= f_open (&Fil,"0:file.bin" ,FA_WRITE|FA_CREATE_ALWAYS);

            CyFXUartPrint (0, "CHECK2\r");

How could I solve this problem?

Thanks & Regards

S.RAVI CHANDRIKA

0 Likes
1 Solution
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi Chandrika,

- Did you use a FAT32 formatted SD card? If not, please try the same.

- Are you able to read an existing file from a FAT32 formatted card?

Regards,

Hemanth

Hemanth

View solution in original post

2 Replies
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi Chandrika,

- Did you use a FAT32 formatted SD card? If not, please try the same.

- Are you able to read an existing file from a FAT32 formatted card?

Regards,

Hemanth

Hemanth

thank you! it's working now.

Thanks & Regards

S.Ravi chandrika

0 Likes