File tree Expand file tree Collapse file tree 9 files changed +27
-0
lines changed
connectivity/drivers/emac/TARGET_STM Expand file tree Collapse file tree 9 files changed +27
-0
lines changed Original file line number Diff line number Diff line change 2929#ifndef USE_USER_DEFINED_HAL_ETH_MSPINIT
3030
3131#include "stm32f7xx_hal.h"
32+ #include "platform/mbed_critical.h"
3233
3334/**
3435 * Override HAL Eth Init function
@@ -38,7 +39,9 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
3839 GPIO_InitTypeDef GPIO_InitStructure ;
3940 if (heth -> Instance == ETH ) {
4041 /* Disable DCache for STM32F7 family */
42+ core_util_critical_section_enter ();
4143 SCB_DisableDCache ();
44+ core_util_critical_section_exit ();
4245
4346 /* Enable GPIOs clocks */
4447 __HAL_RCC_GPIOA_CLK_ENABLE ();
Original file line number Diff line number Diff line change 2929#ifndef USE_USER_DEFINED_HAL_ETH_MSPINIT
3030
3131#include "stm32f7xx_hal.h"
32+ #include "platform/mbed_critical.h"
3233
3334/**
3435 * Override HAL Eth Init function
@@ -38,7 +39,9 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
3839 GPIO_InitTypeDef GPIO_InitStructure ;
3940 if (heth -> Instance == ETH ) {
4041 /* Disable DCache for STM32F7 family */
42+ core_util_critical_section_enter ();
4143 SCB_DisableDCache ();
44+ core_util_critical_section_exit ();
4245
4346 /* Enable GPIOs clocks */
4447 __HAL_RCC_GPIOA_CLK_ENABLE ();
Original file line number Diff line number Diff line change 2929#ifndef USE_USER_DEFINED_HAL_ETH_MSPINIT
3030
3131#include "stm32f7xx_hal.h"
32+ #include "platform/mbed_critical.h"
3233
3334/**
3435 * Override HAL Eth Init function
@@ -38,7 +39,9 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
3839 GPIO_InitTypeDef GPIO_InitStructure ;
3940 if (heth -> Instance == ETH ) {
4041 /* Disable DCache for STM32F7 family */
42+ core_util_critical_section_enter ();
4143 SCB_DisableDCache ();
44+ core_util_critical_section_exit ();
4245
4346 /* Enable GPIOs clocks */
4447 __HAL_RCC_GPIOA_CLK_ENABLE ();
Original file line number Diff line number Diff line change 2929#ifndef USE_USER_DEFINED_HAL_ETH_MSPINIT
3030
3131#include "stm32f7xx_hal.h"
32+ #include "platform/mbed_critical.h"
3233
3334/**
3435 * Override HAL Eth Init function
@@ -38,7 +39,9 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
3839 GPIO_InitTypeDef GPIO_InitStructure ;
3940 if (heth -> Instance == ETH ) {
4041 /* Disable DCache for STM32F7 family */
42+ core_util_critical_section_enter ();
4143 SCB_DisableDCache ();
44+ core_util_critical_section_exit ();
4245
4346 /* Enable GPIOs clocks */
4447 __HAL_RCC_GPIOA_CLK_ENABLE ();
Original file line number Diff line number Diff line change 2929#ifndef USE_USER_DEFINED_HAL_ETH_MSPINIT
3030
3131#include "stm32f7xx_hal.h"
32+ #include "platform/mbed_critical.h"
3233
3334/**
3435 * Override HAL Eth Init function
@@ -38,7 +39,9 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
3839 GPIO_InitTypeDef GPIO_InitStructure ;
3940 if (heth -> Instance == ETH ) {
4041 /* Disable DCache for STM32F7 family */
42+ core_util_critical_section_enter ();
4143 SCB_DisableDCache ();
44+ core_util_critical_section_exit ();
4245
4346 /* Enable GPIOs clocks */
4447 __HAL_RCC_GPIOA_CLK_ENABLE ();
Original file line number Diff line number Diff line change 3636#ifndef USE_USER_DEFINED_HAL_ETH_MSPINIT
3737
3838#include "stm32h7xx_hal.h"
39+ #include "platform/mbed_critical.h"
3940
4041#define ETH_TX_EN_Pin GPIO_PIN_11
4142#define ETH_TX_EN_GPIO_Port GPIOG
@@ -66,7 +67,9 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
6667 if (heth -> Instance == ETH ) {
6768#if defined(CORE_CM7 )
6869 /* Disable DCache for STM32H7 family */
70+ core_util_critical_section_enter ();
6971 SCB_DisableDCache ();
72+ core_util_critical_section_exit ();
7073#endif
7174
7275 /* GPIO Ports Clock Enable */
Original file line number Diff line number Diff line change 2929#ifndef USE_USER_DEFINED_HAL_ETH_MSPINIT
3030
3131#include "stm32h7xx_hal.h"
32+ #include "platform/mbed_critical.h"
3233
3334#define MCO_Pin GPIO_PIN_0
3435#define MCO_GPIO_Port GPIOH
@@ -63,7 +64,9 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
6364 GPIO_InitTypeDef GPIO_InitStruct ;
6465 if (heth -> Instance == ETH ) {
6566 /* Disable DCache for STM32H7 family */
67+ core_util_critical_section_enter ();
6668 SCB_DisableDCache ();
69+ core_util_critical_section_exit ();
6770
6871 /* GPIO Ports Clock Enable */
6972 __HAL_RCC_GPIOH_CLK_ENABLE ();
Original file line number Diff line number Diff line change 2929#ifndef USE_USER_DEFINED_HAL_ETH_MSPINIT
3030
3131#include "stm32h7xx_hal.h"
32+ #include "platform/mbed_critical.h"
3233
3334#define MCO_Pin GPIO_PIN_0
3435#define MCO_GPIO_Port GPIOH
@@ -63,7 +64,9 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
6364 GPIO_InitTypeDef GPIO_InitStruct ;
6465 if (heth -> Instance == ETH ) {
6566 /* Disable DCache for STM32H7 family */
67+ core_util_critical_section_enter ();
6668 SCB_DisableDCache ();
69+ core_util_critical_section_exit ();
6770
6871 /* GPIO Ports Clock Enable */
6972 __HAL_RCC_GPIOH_CLK_ENABLE ();
Original file line number Diff line number Diff line change 3535
3636#include "stm32h7xx_hal.h"
3737#include "portenta_power.h"
38+ #include "platform/mbed_critical.h"
3839
3940#define ETH_TX_EN_Pin GPIO_PIN_11
4041#define ETH_TX_EN_GPIO_Port GPIOG
@@ -66,7 +67,9 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
6667
6768#if !(defined(DUAL_CORE ) && defined(CORE_CM4 ))
6869 /* Disable DCache for STM32H7 family */
70+ core_util_critical_section_enter ();
6971 SCB_DisableDCache ();
72+ core_util_critical_section_exit ();
7073#endif
7174
7275 /* GPIO Ports Clock Enable */
You can’t perform that action at this time.
0 commit comments