arduino / arduino/ArduinoCore-mbed
Portenta H7 (STM32H7xx): eMMC support
- Dominant language
- C
- Stars
- 411
- Forks
- 225
- PR merge metrics
- No merged PRs in 30d
Description
I have sucessfully used SD Cards with the Portenta.
However I cant get it to work with eMMC Modules. I use a custom Board for this.
the relevant code is in BSP.c
With the HAL_SD functions I get errors, HAL_SD_Init Fails.
If I replace the with the fitting HAL_MMC_xxx functions (including changing the types), it does initialize the eMMC Chip, showing that it can interact with the chip. The size / block size etc. shown when enabling SD_DBG seem to work.
It does also read / write when trying to format with FatFileSystem (the underlying HAL function calls return OK every single time). However the format call fails with error code -22 (EINVAL).
It seems that data written are not really written.
I can provide my modified code (BSP.c/.h, SDMMCBlockDevice.cpp) if that helps.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with BSP.c and SDMMCBlockDevice.cpp, comparing the HAL_SD and HAL_MMC paths described in the issue; review BSP.h if the modified files become available. Reproduce initialization and formatting with SD_DBG enabled, then verify that eMMC writes persist and formatting no longer returns -22.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100