Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hardware ECC support #5

Open
geekbluetech opened this issue May 20, 2021 · 0 comments
Open

Hardware ECC support #5

geekbluetech opened this issue May 20, 2021 · 0 comments

Comments

@geekbluetech
Copy link

It is not an issue in fact, but I wandered how to support hardware ECC, maybe some changes should be a better way to support HW ECC.

Current source code logic in fs_dev_nand_ctrlr_gen.c:SecWr,

  1. write sector data
  2. calculate ECC of sector + OOS data (p_ctrlr_data->CtrlrExtPtr->ECC_Calc)
  3. SparePack OOS data
  4. write OOS to OOB (ECC included after OOS)

I suppose the following process can be followed to support HW ECC:

  1. write sector data
  2. SparePack OOS data
  3. write OOS to OOB
  4. p_ctrlr_data->CtrlrExtPtr->ECC_Calc
    in this callback function, get ECC from HW like STM32 MCU FSMC register (it calculates ECC for each certain bytes data written)
  5. write ECC to OOB

With these changes, both software ECC and HW ECC can be supported.

I don't know if it makes sense. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant