Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Erase size

Đang mở
#3 10 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
20/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
cpp
Lĩnh vực
embedded-iot

Hướng nghiên cứu

Bắt đầu bằng cách đọc features/filesystem/fat/ChaN/ff.cpp tại các dòng được liên kết và lời gọi FATFileSystem::format(&flash, 2). Tái hiện các trường hợp format và các lần đọc SPI của LPC1768 ở 40M và 8M, sau đó xác định cần xử lý kích thước erase, lựa chọn FAT và hành vi SPI như thế nào trên các target bị ảnh hưởng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

@marcuschangarm I thought I would switch to you driver rather than mine and noticed a few issues, not all are directly related to your driver though.

You are using block erase rather than page erase, is the improvement in erase time worth the overhead of a larger read modify write? I'm thinking that with mbed people will be storing small files or making small changes to files?, fatfs will also need a 8x larger buffer which wont be good on smaller targets.

This also means that 16mbit and above in 528b the sector size for fatfs is greater than 4096 which is the largest that is supported.

Another odd problem is that if you use 512\528 with a 16mbit device and try and format without specifying the AU it fails.
https://github.com/ARMmbed/mbed-os/blob/20d93bf78d5172b6a0f1c1065058d641e4e0f2e1/features/filesystem/fat/ChaN/ff.cpp#L4172-L4174
results in FAT16 as the result since nclst = 0x1000
yet this then fails here as there is not enough sectors for FAT16
https://github.com/ARMmbed/mbed-os/blob/20d93bf78d5172b6a0f1c1065058d641e4e0f2e1/features/filesystem/fat/ChaN/ff.cpp#L4204-L4207
and returns

FR_MKFS_ABORTED

if you format with an AU of 2

FATFileSystem::format(&flash,2)

It will succeed with FAT12

Also with the default SPI speed of 40M the lowest bit is missed on the LPC1768 resulting in a shift right on all SPI reads. 8M works fine though. (I didn't try higher).

cc @geky

Ngôn ngữ chính
C++
Star
7
Fork
4
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ARMmbed/dataflash-driver

Tất cả issue của ARMmbed/dataflash-driver

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.