cancel
Showing results for 
Search instead for 
Did you mean: 

Write sd timeout,the restart code does not take effect

丶Kaitou
Associate

The reason is that the update of the HAL library caused the SD card problem, which led to bus_hault after the restart. The SD card will only be restarted when there is a read/write issue. The reset process is deinit followed by init.

Kaitou_0-1744599504943.png

Later, it was found that DPSM was an unexplainable setting, causing the driver to believe that there was data directly read from the fifo, but the data program was written to DPSM in conjunction with SDMMC_CK.

Then I changed the driver code to seem to have solved the problem, and restarted the code by adding abort before deinit and init.

Kaitou_1-1744599607951.pngKaitou_2-1744599618846.png

1、Why does the SD card often malfunction? Is it caused by the clock waveform? Is this waveform setting incorrect for DPSM?
I adjusted the frequency to 4M, but the Voltage overshoot was very large.

Kaitou_3-1744599724968.png

Yellow represents CK and pink represents 3.3V voltage

Kaitou_4-1744599823229.png

2、I used a soft restart for the SD card, but it seems to be of no use. Is there a way to solve the problem of the SDMMC getting stuck at a certain state due to being stuck at the DPSM?

If the abort continues, it will cause the IDMA to step on other stack Spaces, thereby resulting in a hardfault.So if abort fails once, I won't use the SD card anymore.

Kaitou_0-1746504825066.png

When there is a problem with the SD card, it will keep waiting for the flag bit. The same is true of reinitialization

Kaitou_0-1746515262468.png

 

Thank you for your help.

2 REPLIES 2
Saket_Om
ST Employee

Hello @丶Kaitou 

Please re-write your post in English.

If your question is answered, please close this topic by clicking "Accept as Solution".

Thanks
Omar

sorry,I have changed it into English