cancel
Showing results for 
Search instead for 
Did you mean: 

SD_CARD refuses to mount with fmount returning FR_NOT_READY

rohan_m
Senior

STM32F7 Series

rohan_m_0-1709907073853.png

rohan_m_1-1709907108712.png

rohan_m_2-1709907130473.pngrohan_m_3-1709907162846.png

 

rohan_m_4-1709907207199.png

rohan_m_5-1709907247494.png

rohan_m_6-1709907272365.png

rohan_m_7-1709907290261.png

rohan_m_8-1709907321864.png

 

rohan_m_9-1709907362252.png

rohan_m_10-1709907386851.png

 

 

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

I reduced the speed of the SDcard to 400kHz and mounted it on a nucleo board. Still did not do it on the custom board. I now have the feeling something is not right with the custom board. 

View solution in original post

10 REPLIES 10
SofLit
ST Employee

Hello,

Try with 1 bit mode. If it does work see this thread.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

The code fails only after :-

  if (HAL_SD_Init(&hsd) != HAL_OK)
  {
    Error_Handler();
  }
It fails in the HAL_SD_Init() only even after changing to 1B. 

So your hardware is not working .

What board : custom or nucleo ...?

Length of tracks cpu -- sdcard ?

+

try simple setup for beginning with sd-card:

- 1 bit mode

- no dma template

- port/pins : all on speed: medium + pullup on

 

 

If you feel a post has answered your question, please click "Accept as Solution".

Its a custom board 

rohan_m_0-1710070684135.png

 

rohan_m_0-1710148662376.jpeg

The same problem I am facing after making sure only 1 bit, No DMA and all GPIO pins on medium speed

Length of tracks cpu -- sdcard ?

Still init not working?

Then first check all signals to sd-card with scope . (10:1 low cap. tip)

If ok (3,3V....etc) look at CMD , here first (400kHz speed) "hello card..." communication;

if this ok, it switching to hi-speed (5...25Mbit), if long lines, then here problems begin to show up.

If you feel a post has answered your question, please click "Accept as Solution".

Track length is below 3 inches .

I did order a nucloe board and connected an SD card reader to it where I did see that it was connected in the 1bit mode but it was not connecting in the 4 bit mode.

When I am trying to enable the 4 bit mode then it is returning HAL_SD_ERROR_REQUEST_NOT_APPLICABLE

rohan_m_0-1711466177468.png

Clock is 108 MHz but I have put a clock div of 16 which makes 108/CLKDIV+2 which makes it 6 Mhz. Please help where we can look next. 

 

-- Which nucleo ?

+ You got it working in 1 bit mode (the standard for sd-card) , good !

Try setting higher speed (i have 100M + div1 -> 50MHz card clk max.) and proof working;

by (only !!) reading files and check speed , you get. (and tell it here.)

If you really  NEED more speed then, try same in 4 bit mode.

If you feel a post has answered your question, please click "Accept as Solution".