FAT32 Library

General discussion on mikroC PRO for PIC32.
Post Reply
Author
Message
info@simpl-technology.de
Posts: 1
Joined: 01 Nov 2023 17:59

FAT32 Library

#1 Post by info@simpl-technology.de » 01 Nov 2023 18:09

Hi,
i have problemes with the library with a microSD Card from Transcend (8GB HC). The same card is working with a dsPIC (i use the mikroC PRO compiler also for this product). I think, this is a timing problem in the FAT32 library. Does anybody have a solution? I have wrote some emails to MIKRO support. I got no feedback....

Does anybody know, how can i see wich version of the library is installed? There is no revision no.

Thank you!

BR
Manfred

Vladimir.CDI
Posts: 28
Joined: 04 Nov 2013 13:21

Re: FAT32 Library

#2 Post by Vladimir.CDI » 12 Jan 2024 19:12

Hi

I also use mikroC for PIC32 and have huge problems with FAT32 lib

currently to use my PIC32 units I order microSDs batch by 100 units and test every single card to be able to write with FAT32 library. About 25% of uSDs does not work or partially does not work. The problem looks like FAT32_write procedure freezes/crashes at certain sector and no workaround for this. What I do I just pay for 100uSDs and use about 75 from them and trash 25%. at the laptop all 100% uSDS are operational no single issue for long write tests. I use SmartBuy 2Gb uSDs (non HC or XC)

no idea how to fix this.

Im ready to mail to mikroE 10pcs batch of "working uSDs" + 10 pcs non/partially working - just to know what is the fix for this (same model same batch same label)

I tested 4Gb and 16Gb and some of them also work, but some is not.
I format FAT32 sector 4096 at windows 10-64
where I try to format FAT32 sector 4096 at Win7-32 or MacOSX - FAT32_Init failed all the time

one more thing: FAT32-Read - work at any file size even for those uSDs where FAT32_write failed. SPI clock speed does not matter (tested 16 and 8 and 4 and 1MHz) as anyway laptop clock is 20 times higher
Vladimir

Thomas.Pahl@t-online.de
Posts: 158
Joined: 24 May 2008 15:55
Location: Germany

Re: FAT32 Library

#3 Post by Thomas.Pahl@t-online.de » 13 Jan 2024 20:15

I am using FAT32 with ARM processors. It is a great library. Never had problems. But you have to change the timeout values:

SD_timeout.cmd_timeout = 100000
SD_timeout.spi_timeout = 1000000
SD_timeout.init_timeout = 100000000

These values are for SPI speed of 16MHz. Experiment with other values for your systems.

A condensor of 47µF (or greater) parallel to the SD card voltage connector is recommended.

Thomas

stevediaz933@gmail.com
Posts: 8
Joined: 16 Jan 2024 12:36

Re: FAT32 Library

#4 Post by stevediaz933@gmail.com » 16 Jan 2024 12:39

Experiencing FAT32 library issues with a Transcend microSD card:

Check Library Version:

Review documentation for version info.
Timing Issues:

Adjust timing parameters in the code.
MIKRO Support:

Keep contacting MIKRO for assistance.
Community Forums:

Explore MIKRO-related forums for user insights.
Alternative Libraries:

Consider other FAT32 libraries.
Documentation Review:

Check for specific recommendations and troubleshooting tips.
Update Compiler and Library:

Use the latest mikroC PRO compiler and library versions.
Hardware Check:

Confirm correct hardware connections.
Test on Different Hardware:

Check if the issue persists on another setup.

Post Reply

Return to “mikroC PRO for PIC32 General”