2022-04-01 03:25 AM
Hello,
We just purchased the STM32H753I-EVAL2 board and have a problem with initializing the SD card device.
With CubeMX, we create a default project:
- new project/board selector/STM32H753I-EVAL2
- "Initialize all devices with their Default Mode" --> Yes
When we test the generated firmware, we get an error when calling the MX_SDMMC1_SD_Init function. The HAL_SD_Init function will generate a timeout.
The SD card sold with the product is correctly installed.
We use SDMMC1.
We try with/or not with external transceiver.
We try with/or not with MDMA "SDMMC1 data end".
Why do we have this issue when using the default settings ?
Best regards,
2022-04-01 05:03 AM
Perhaps look at board level HAL apps and examples in the CubeH7 repository trees as a starting point.
Autogen tools are only as good as the boilerplate and QA that went into them.
2022-04-01 05:15 AM
Thank you for your reply.
I have already looked at the examples from the CubeH7 repository trees. There is no example for the STM32H753I-EVAL2 board, only for the STM32H743I-EVAL2 board. Looking at the examples for this card I unfortunately did not find any solution.
2022-04-01 06:21 AM
The H753 is just a H743 with the HASH/CRYP units enabled, the code/examples are interchangeable in all other regards.
STM32Cube_FW_H7_V1.9.1\Projects\STM32H743I-EVAL\Examples\JPEG\JPEG_DecodingUsingFs_DMA\readme.txt (there should be polled examples there too)
Expects the MDMA buffer to be in DTCM/ITCM RAM, or that cache coherency and alignment is managed for other RAMs
The EVAL board has a transceiver in-circuit, so I don't think there's an option not to use it. This typically gets called out in stm32h7xx_hal_conf.h
Seem to recall that the EVAL board uses an MFX (IO Expander) for some of the GPIO and card detect logic.
Definitely had the MicroSD cards on the original EVAL(1) boards operating in the work I've done with the platform.
2022-04-01 07:03 AM
Thanks for your help. I start to find a solution with this post: https://community.st.com/s/question/0D50X0000BUiTjsSQF/sd-init-failure-on-stm32h743ieval2-with-example-code.
But this solution need some change in an HAL file (stm32h7xx_hal_sd.c). I need to enable the transceiver in CubeMX and in the HAL file I need to modify the SD_PowerON function to prevents the code from switching to 1V8. Paul Madle wrote a better explanation in his post.