Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CMSIS/Core/Include/core_starmc1.h
Original file line number Diff line number Diff line change
Expand Up @@ -3326,6 +3326,11 @@ __STATIC_FORCEINLINE void SCB_DisableDCache (void)
uint32_t sets;
uint32_t ways;

/* Return if D-cache is not enabled (prevent flushing junk after POR) */
if ((SCB->CCR & SCB_CCR_DC_Msk) == 0U) {
return;
}

SCB->CSSELR = 0U; /* select Level 1 data cache */
__DSB();

Expand Down
5 changes: 5 additions & 0 deletions CMSIS/Core/Include/m-profile/armv7m_cachel1.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,11 @@ __STATIC_FORCEINLINE void SCB_DisableDCache (void)
#endif
;

/* Return if D-cache is not enabled (prevent flushing junk after POR) */
if ((SCB->CCR & SCB_CCR_DC_Msk) == 0U) {
return;
}
Comment thread
satur9nine marked this conversation as resolved.

SCB->CSSELR = 0U; /* select Level 1 data cache */
__DSB();

Expand Down
Loading