Commit 804c38ea authored by Guillaume Revaillot's avatar Guillaume Revaillot
Browse files

stm32g4: read flash optr to get flash bank mode on cat3 devices.

g4 cat3 devices can be configured in two mode via option bytes:
  - dual bank, 2x256kib, 2KiB pages.
  - single bank, 1x512KiB, 4KiB pages.
in anycase, these have two banks, and need to be handled with more care.

-> read optr after loading flash params to patch page size.
-> in single bank mode, mass erase _must_ be triggered by applying
MER1 and MER2 bits. erasing half of the flash will lead to a pgserr.
parent 46bf0abf
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment