Error formatting sdcard
- Dominant language
- C
- Stars
- 4k
- Forks
- 1.7k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 237
Description
Hello,
I`m trying format the sdcard and have the error bellow:
```
nsh> uname -a
NuttX 12.5.1 28044f7d5a-dirty Apr 23 2024 20:36:15 arm linum-stm32h753bi
nsh> mkfatfs /dev/mmcsd0
bchdev_register: blkdev="/dev/mmcsd0" chardev="/dev/tmpc000001" readonly=F
find_blockdriver: pathname="/dev/mmcsd0"
mmcsd_open: Entry
mmcsd_geometry: Entry
mmcsd_geometry: available: true mediachanged: true writeenabled: true
mmcsd_geometry: nsectors: 1947648 sectorsize: 512
mmcsd_geometry: Entry
mmcsd_geometry: available: true mediachanged: false writeenabled: true
mmcsd_geometry: nsectors: 1947648 sectorsize: 512
mkfatfs_clustersearch: Configuring with 32 sectors/cluster...
mkfatfs_tryfat12: nfatsects=179 nclusters=60851 (max=4080)
mkfatfs_tryfat12: WARNING: Too many clusters for FAT12: 60851 > 4078
mkfatfs_clustersearch: WARNING: Cannot format FAT12 at 32 sectors/cluster
mkfatfs_tryfat16: nfatsects=238 nclusters=60848 (min=4081 max=60928)
mkfatfs_selectfat: Selected FAT16
mkfatfs_configfatfs: Sector size: 512 bytes
mkfatfs_configfatfs: Number of sectors: 1947648 sectors
mkfatfs_configfatfs: FAT size: 16 bits
mkfatfs_configfatfs: Number FATs: 2
mkfatfs_configfatfs: Sectors per cluster: 32 sectors
mkfatfs_configfatfs: FS size: 238 sectors
mkfatfs_configfatfs: 60848 clusters
mkfatfs_configfatfs: Root directory slots: 512
mkfatfs_configfatfs: Volume ID: 00000000
mkfatfs_configfatfs: Volume Label: " "
mmcsd_write: startsector: 0 nsectors: 1 sectorsize: 512
mmcsd_writesingle: startblock=0
stm32_dmapreflight: invalid IDMA address buffer:0x380026e8 end:0x380028e7
bchlib_write: ERROR: Write failed: -14
mkfatfs_devwrite: ERROR: write failed: size=512 pos=0 error=-14
mmcsd_close: Entry
nsh: mkfatfs: mkfatfs failed: 14
nsh>
```
My board is using a STM32H753.
Contributor guide
Research direction
Reproduce `mkfatfs /dev/mmcsd0` on the STM32H753 setup and review the logged path through `mmcsd_write`, `mmcsd_writesingle`, and `stm32_dmapreflight`. Trace why the reported DMA buffer address is rejected and verify that SD-card formatting completes without the `-14` write failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100