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

Support 128bit write granularity for kvdb #250

Merged
merged 4 commits into from
Oct 17, 2023
Merged

Conversation

tinic
Copy link
Contributor

@tinic tinic commented Oct 14, 2023

The new stm32h5xx MCUs only support quad word (128bit) writes to flash. Tested with this driver:

https://github.com/tinic/lightkraken2/blob/main/support/fal_stm32h5xx.c

tinic added 2 commits October 14, 2023 00:28
The new stm32h5xx chips can only write quad words, i.e. 128bits.
@armink
Copy link
Owner

armink commented Oct 14, 2023

Thx @tinic . Can you update the fdb_tsdb.c and fdb_cfg.h code.

FlashDB/src/fdb_tsdb.c

Lines 28 to 30 in b309810

#if (FDB_WRITE_GRAN == 64)
#error "Flash 64 bits write granularity is not supported in TSDB yet!"
#endif

FlashDB/inc/fdb_cfg.h

Lines 29 to 32 in b309810

#ifdef FDB_USING_FAL_MODE
/* the flash write granularity, unit: bit
* only support 1(nor flash)/ 8(stm32f2/f4)/ 32(stm32f1) */
#define FDB_WRITE_GRAN /* @note you must define it for a value */

@armink
Copy link
Owner

armink commented Oct 17, 2023

👍

@armink armink merged commit 7bdef5e into armink:master Oct 17, 2023
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants