Wednesday, November 22nd 2017, 7:23pm UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

gaugan

Beginner

Date of registration: Sep 4th 2017

Posts: 8

Location: Bangalore

1

Tuesday, September 5th 2017, 6:46am

Code freezes while mounting SD card once in a while

Hi,

We're using emFile version: V4.04a
What we observed was 1-2/10 times the code is unable to mount the SD card as it gets stuck at FS_Mount("");
Any hint on what might be happening? I've attached the code snippet.

Regards,
Gautam
gaugan has attached the following image:
  • Capture.PNG

gaugan

Beginner

Date of registration: Sep 4th 2017

Posts: 8

Location: Bangalore

2

Monday, September 11th 2017, 6:09am

No one?

SEGGER - Marius

Super Moderator

Date of registration: Aug 10th 2011

Posts: 31

3

Monday, September 11th 2017, 3:41pm

Hello Gaugan,

Would it be possible to enable the debug output of the SD / MMC driver and post the log?
The debug output can be enabled by adding the following two defines to FS_Conf.h:

C/C++ Source code

1
2
#define FS_DEBUG_LEVEL       5
#define FS_LOG_MASK_DEFAULT  FS_MTYPE_DRIVER

Thank you.

Best regards,
Marius

gaugan

Beginner

Date of registration: Sep 4th 2017

Posts: 8

Location: Bangalore

4

Tuesday, September 12th 2017, 8:36am

Hi Marius,

PFA Log.
FYI While logging my bootloader was never able to read the SD card contents. Only after disabling logging did the bootloader flash the controller.

Regards,
Gautam
gaugan has attached the following file:
  • emfile Logs.zip (1.74 kB - 38 times downloaded - Last download: Nov 20th 2017, 7:26pm)

SEGGER - Marius

Super Moderator

Date of registration: Aug 10th 2011

Posts: 31

5

Friday, September 15th 2017, 10:49am

Hello Gaugan,

I analyzed the logs but I was not able to find any reason why the mounting of the SD card fails
The communication to SD card seem to work properly.

Could you please post a screen capture of the call stack showing in which
function the code actually blocks? Thank you.

Best regards,
Marius

gaugan

Beginner

Date of registration: Sep 4th 2017

Posts: 8

Location: Bangalore

6

Wednesday, October 11th 2017, 9:42am

Hi Marius,

Sorry for the late reply, holidays here. Did lots of testing and here's one thing I observed wrt sd cards and let me share the same with you:
So I tried bootloading process using various SD cards, 5nos 4GB, 2nos 8GB and 1 32GB. 4GB sd cards behaved similarly as mentioned above - 1 to 2/10 times the bootloader is unable to mount/access sd card. While the 8GB sd cards have not displayed any such issue - tried around 250+ times. I've also tried with 32GB sd cards, was not able to replicate the issue - works flawless. Only the 4GB ones seem to replicate the same. I've not tried with the lower memory sd cards than 4GB.
Do you feel the higher SPI speeds might be an issue here for randomness in 4GB cards behaviour? Do share your thoughts and other possibilities.

Regards,
Gautam