cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H755 stalls when SDMMC interface is enabled

Curtis B.
Senior

Hi Folks,

I experienced a weird problem when I tried to use the SDMMC interface on the STM32H755 Nucleo board.

I set up a very basic test program. I use the template for the H755 Nucleo in CubeIDE. I set the H7 clock frequency to 480 MHz and the M4 clock frequency to 240 MHz. Stack and Heap are set to 0x4000 and 0x8000 respectively. I deactivated all peripherals except USART 3 and SDMMC1. I-cache and D-cache are enabled.

Furthermore, power regulator source is set to PWR_LDO_SUPPLY. Solder bridges and capacitors are set on the board to comply to LDO supply only. SDMMC core clock is 80 MHz. Clock divider is set to 20 and SDMMC interrupt is enabled. All other settings are default.

In the main loop I simply have LED 1 blinking:

  while (1)
  {
 
	  HAL_GPIO_WritePin(LD1_GPIO_Port,LD1_Pin,GPIO_PIN_SET);
	  HAL_Delay(1000);
 
	  HAL_GPIO_WritePin(LD1_GPIO_Port,LD1_Pin,GPIO_PIN_RESET);
	  HAL_Delay(1000);
 
    /* USER CODE END WHILE */
 
    /* USER CODE BEGIN 3 */
  }

When I launch the program, it stalls somewhere in the inline function for enabling the D-cache.

When I comment the line

  MX_SDMMC1_SD_Init();

everything works fine; LED 1 is blinking. But just with having the SD card init function in the code, the program stalls even before reaching this line. (That feels a bit like quantum physics...)

Did anyone experience similar problems?

Regards,

Daniel

CubeIDE 1.6.0 Firmwarpackage 1.9.0

12 REPLIES 12
AScha.3
Chief III

Thx for info.

after "right" setting of pins got it working now. Read-speed about 3,4 MB/s , 1bit mode;

setting: 200Mhz clk, div 2 (gives clk/4 -> 50MHz SDHC standard; pins CMD+D0 : pullup, speed medium ("FAST" on H7A3 ).

and on my small STM32F411 board, 100MHz clk, div 0 (!) , 4 bit mode, all pins: pullup and high speed, get about 8MB/s read from microSD. =)

(speed is effective speed, including f_read() and without DMA , tested with 10KB block reading)

regards

Alfred

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

You mentioned that you have ist running on the H7 in 1-Bit mode; did you try 4 bit mode for the H7, too?

AScha.3
Chief III

not on this board, no need for more speed here, only D0 is routed. (at work)

(private) for my audio-player, tried high speed with 4 bit mode on F411 ; working same as 1 bit mode, just have about 50mm cpu--cardholder wires, all pullup on , no hardware (resistors), just 10uF cer.cap close to card. (without didnt work...), because from SDcard datasheet: card can pull up to 350mA for short times, when switching to hi speed.

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