Skip to content

Commit

Permalink
emac_stm32: properly invalidate DCache before disabling it
Browse files Browse the repository at this point in the history
  • Loading branch information
facchinm authored and maidnl committed Jul 3, 2024
1 parent f8c2920 commit f1c8d7a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)

#if !(defined(DUAL_CORE) && defined(CORE_CM4))
/* Disable DCache for STM32H7 family */
core_util_critical_section_enter();
SCB_CleanInvalidateDCache();
SCB_DisableDCache();
core_util_critical_section_exit();
#endif

/* GPIO Ports Clock Enable */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
#if !(defined(DUAL_CORE) && defined(CORE_CM4))
/* Disable DCache for STM32H7 family */
core_util_critical_section_enter();
SCB_CleanInvalidateDCache();
SCB_DisableDCache();
core_util_critical_section_exit();
#endif
Expand Down

0 comments on commit f1c8d7a

Please sign in to comment.