SD card insert cause Hardware reset/crash

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SD card insert cause Hardware reset/crash

Jump to solution
931 Views
haggaytavyumi
Contributor III

Hello All

We use our own custom designed board that include The iMX6D ,based on the SabreSD example.

We run on it Yocto 1.8 with BSP version 3.14.52 .

We use SD2 port for WIFI communication, SD3 for SD slot and SD4 for eMMC.

The system is working good with one problem:

If you insert an SD card while the system is running  it cause the system, to crash with out errors.

I am pretty sure it is Hardware problem.

I did several tests, one of them was to check if it happening in the "u-boot" too and it does.

One more thing it is that it doesn't happens with all SD cards.

I can't tell why but it usually happening with the faster SD cards.
I have compared it with the Wanboard I have loaded both of them in to "U-Boot". Then inserted  a problematic SD card. The Wandboard worked perfect while my custom board  crashed.
I looked for differences in the designs:
1. In my design I don't use 33 ohm resistor in series on the clock line.
2. The Wandboard design use SD2 while I use SD3 in my design.

Any suggestions?

Labels (2)
0 Kudos
1 Solution
754 Views
haggaytavyumi
Contributor III

Hello all

The Software problem has been found as UDEV problem.

UDEV made the devices in /dev directory have the same minor device ID, While the devices in the sysfs /sys had the right minor numbering.

I found it out by running two commands that should give me the same results.

ls -l /dev/mmcblk*

and

lsblk

The lsblk read the minor device driver number from the sysfs while the ls read it directly from the /dev made by the UDEV.

the UDEV mismatched the numbers. I think that it is something with the caching script.

I found out in the Yocto sources there are two Bitbake scripts for UDEV.

I found out that in the Bitbake recipe I use it only compile the regular UDEV and with out the "udev-extraconf". I use the frame buffer graphical back end. Unlike the X11 graphical back end recipe the add the "udev-extraconf".

I have added the "udev-extraconf" to my recipe and it solved the problem.

I am not really sure why it worked.

For now, I think that the "udev-extraconf" have same workarounds in scripts for known bugs in the UDEV.

View solution in original post

0 Kudos
3 Replies
754 Views
igorpadykov
NXP Employee
NXP Employee

Hi haggay

faster SD cards may cause bigger noise to system and consume

more power, so one can check i.MX6 System Development User’s Guide

Chapter 4 Requirements for Power Management

http://cache.freescale.com/files/32bit/doc/user_guide/IMX6DQ6SDLHDG.pdf

Also may be recommended to run ddr tester for finding more optimized ddr settings

and increasing board stability

https://community.freescale.com/docs/DOC-105652 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
754 Views
haggaytavyumi
Contributor III

Hello Igor

I have tested the power management circuits in my design. I found out that we had some problems with the layout of the power supplies. We have manufactured a new version of our custom-made board, with large changes in the power supply circuits.

It solved the issue. Now when I insert the SD card while the system running it doesn't crash the system.

Thank you for your advice.

Meanwhile, we have an another problem in the BSP side that I thought that in the beginning caused by the same problem that made the SD crashing the system. But now after the problem have been solved this "symptom" haven't been solved with it.  

In our system, we have three  uSDHC  devices:

   SD2 connected to WIFI module.

   SD3 connected to SD slot.

   SD4 connected to eMMC.

The system is loading from the eMMC. If the there is SD in the slot we can't reach the eMMC partitions. If I will try and mount /dev/mmcblk0p1 (it is the eMMC) into some folder I get the SD partition instead.

Did any one run into this kind of issue before?

Thanks

Haggay

0 Kudos
755 Views
haggaytavyumi
Contributor III

Hello all

The Software problem has been found as UDEV problem.

UDEV made the devices in /dev directory have the same minor device ID, While the devices in the sysfs /sys had the right minor numbering.

I found it out by running two commands that should give me the same results.

ls -l /dev/mmcblk*

and

lsblk

The lsblk read the minor device driver number from the sysfs while the ls read it directly from the /dev made by the UDEV.

the UDEV mismatched the numbers. I think that it is something with the caching script.

I found out in the Yocto sources there are two Bitbake scripts for UDEV.

I found out that in the Bitbake recipe I use it only compile the regular UDEV and with out the "udev-extraconf". I use the frame buffer graphical back end. Unlike the X11 graphical back end recipe the add the "udev-extraconf".

I have added the "udev-extraconf" to my recipe and it solved the problem.

I am not really sure why it worked.

For now, I think that the "udev-extraconf" have same workarounds in scripts for known bugs in the UDEV.

0 Kudos