Skip to main content
Associate III
February 6, 2024
Solved

Uboot not seeing the sd card that it was loaded from

  • February 6, 2024
  • 1 reply
  • 2083 views

When I start uboot it says MMC: STM32 MMC: SD/MMC:0 and STM32 SD MMC: 1 but then it won't boot linux saying "No block device".  I have looked at the eval board DTS and tried to include as much relevant items as I could but am not getting any signs of life. The mmcinfo and mmc commands show nothing except the list command which just shows the same STM32 MMC: SD/MMC:0 and STM32 SD MMC: 1.    I have added cd-gpios to the sdmmc1 with the gpio active low and confirmed with the gpio command that the cd pin is low when a card is present.  Hoping someone can point me in the right direction.

This topic has been closed for replies.
Best answer by dkal

Turns out I didn't configure the PLLs in TF-a so it didn't like it when they were configured in optee.

1 reply

dkalAuthor
Associate III
February 6, 2024

Turning on some debug info:

stm32_mmc2 mmc@58005000: stm32_sdmmc2_getcd called

stm32_mmc2 mmc@58005000: bus_with = 0, clock = 0

stm32_mmc2 mmc@58005000: bus_with = 1, clock = 0

stm32_mmc2 mmc@58005000: bus_with = 1, clock = 400000

stm32_mmc2 mmc@58005000: send cmd 0 data: 0x0 @ 0x0

stm32_mmc2 mmc@58005000: timeout reading SDMMC_STA register

stm32_mmc2 mmc@58005000: send STOP command to abort dpsm treatments

stm32_mmc2 mmc@58005000: timeout reading SDMMC_STA register

stm32_mmc2 mmc@58005000: end for CMD 0, ret = -110

 

dkalAuthor
Associate III
February 6, 2024

Also should note I couldn't get the MCU clock to be driven by PLL3P, It hangs in optee, so it is driven by HSI right now.  Since that clock drives the PCLKs I can see this could be the issue, but in that case I need to know why I couldn't select PPL3 as the MCU clock.  

dkalAuthor
Associate III
February 6, 2024

I got the card to recognize by switching the mmc1 clk mux to hclk6.  So there is still the issue of why my pll3 and pll4 settings don't seem to work