[kvdb] Support 256bit write granularity for kvdb#396
Open
Baseline-K wants to merge 3 commits intoarmink:masterfrom
Open
[kvdb] Support 256bit write granularity for kvdb#396Baseline-K wants to merge 3 commits intoarmink:masterfrom
Baseline-K wants to merge 3 commits intoarmink:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds 256-bit flash write granularity support for KVDB to accommodate STM32H7 devices that require 256-bit (double quadword) programming, and updates related configuration/documentation and TSDB compile-time guards.
Changes:
- Allow
FDB_WRITE_GRAN == 256in KVDB configuration checks. - Add 256-bit-specific alignment padding in KVDB sector/KV header structs.
- Update TSDB compile-time error guard and the config template comment to mention 256-bit granularity.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/fdb_tsdb.c |
Extends TSDB’s compile-time unsupported-granularity check to include 256-bit. |
src/fdb_kvdb.c |
Allows 256-bit granularity and adjusts header struct padding for alignment. |
inc/fdb_cfg_template.h |
Documents 256-bit write granularity option for STM32H7 in the template config. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| #if (FDB_WRITE_GRAN == 64) || (FDB_WRITE_GRAN == 128) | ||
| #error "Flash 64 or 128 bits write granularity is not supported in TSDB yet!" | ||
| #if (FDB_WRITE_GRAN == 64) || (FDB_WRITE_GRAN == 128) || (FDB_WRITE_GRAN == 256) | ||
| #error "Flash 64 or 128 or 256 bits write granularity is not supported in TSDB yet!" |
There was a problem hiding this comment.
The TSDB compile-time error string could be made clearer/grammatically correct (e.g. "Flash write granularities 64/128/256 bits are not supported in TSDB yet"). This helps users quickly understand which configurations are invalid.
Suggested change
| #error "Flash 64 or 128 or 256 bits write granularity is not supported in TSDB yet!" | |
| #error "Flash write granularities 64/128/256 bits are not supported in TSDB yet." |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The new stm32h7xx chips can only write double quad words, i.e. 256bits.
*Update fdb_tsdb.c to include 256bit option
*Update fdb_cfg.h to include 256it option.