Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Erase size

オープン
#3 コメント 10 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
20/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
cpp
領域
embedded-iot

調査の方向性

まず、リンク先の行にある features/filesystem/fat/ChaN/ff.cpp と、FATFileSystem::format(&flash, 2) の呼び出しを読んでください。フォーマットのケースと、40M および 8M での LPC1768 SPI 読み取りを再現し、その後、影響を受けるターゲット全体で erase size、FAT の選択、SPI の動作をどのように扱うべきかを判断してください。

索引モデルが issue の本文から書いたものです。

説明

@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

主要言語
C++
スター
7
フォーク
4
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ARMmbed/dataflash-driver のほかの issue

ARMmbed/dataflash-driver の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。