OpenBLT: shared: commit data cache on SharedParamsWriteByIndex()

This commit is contained in:
Andrey Gusakov 2024-03-24 19:20:51 +03:00 committed by rusefillc
parent 21f28d5812
commit 4c7cd85f8b
1 changed files with 7 additions and 0 deletions

View File

@ -29,6 +29,9 @@
/****************************************************************************************
* Include files
****************************************************************************************/
// To know CORTEX_MODEL
#include "cmparams.h"
#include <stddef.h> /* Standard definitions (NULL). */
#include "shared_params.h" /* Shared parameters header. */
@ -153,6 +156,10 @@ bool SharedParamsWriteByIndex(uint32_t idx, uint8_t value)
SharedParamsWriteChecksum();
/* Update the result. */
result = true;
#if CORTEX_MODEL == 7
// If we have a cache, drop the relevant cache lines.
SCB_CleanDCache_by_Addr((uint32_t*)&sharedParamsBuffer, sizeof(sharedParamsBuffer));
#endif
}
/* Give the result back to the caller. */
return result;