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 29
29
#ifndef USE_USER_DEFINED_HAL_ETH_MSPINIT
30
30
31
31
#include "stm32f7xx_hal.h"
32
+ #include "platform/mbed_critical.h"
32
33
33
34
/**
34
35
* Override HAL Eth Init function
@@ -38,7 +39,9 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
38
39
GPIO_InitTypeDef GPIO_InitStructure ;
39
40
if (heth -> Instance == ETH ) {
40
41
/* Disable DCache for STM32F7 family */
42
+ core_util_critical_section_enter ();
41
43
SCB_DisableDCache ();
44
+ core_util_critical_section_exit ();
42
45
43
46
/* Enable GPIOs clocks */
44
47
__HAL_RCC_GPIOA_CLK_ENABLE ();
Original file line number Diff line number Diff line change 29
29
#ifndef USE_USER_DEFINED_HAL_ETH_MSPINIT
30
30
31
31
#include "stm32f7xx_hal.h"
32
+ #include "platform/mbed_critical.h"
32
33
33
34
/**
34
35
* Override HAL Eth Init function
@@ -38,7 +39,9 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
38
39
GPIO_InitTypeDef GPIO_InitStructure ;
39
40
if (heth -> Instance == ETH ) {
40
41
/* Disable DCache for STM32F7 family */
42
+ core_util_critical_section_enter ();
41
43
SCB_DisableDCache ();
44
+ core_util_critical_section_exit ();
42
45
43
46
/* Enable GPIOs clocks */
44
47
__HAL_RCC_GPIOA_CLK_ENABLE ();
Original file line number Diff line number Diff line change 29
29
#ifndef USE_USER_DEFINED_HAL_ETH_MSPINIT
30
30
31
31
#include "stm32f7xx_hal.h"
32
+ #include "platform/mbed_critical.h"
32
33
33
34
/**
34
35
* Override HAL Eth Init function
@@ -38,7 +39,9 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
38
39
GPIO_InitTypeDef GPIO_InitStructure ;
39
40
if (heth -> Instance == ETH ) {
40
41
/* Disable DCache for STM32F7 family */
42
+ core_util_critical_section_enter ();
41
43
SCB_DisableDCache ();
44
+ core_util_critical_section_exit ();
42
45
43
46
/* Enable GPIOs clocks */
44
47
__HAL_RCC_GPIOA_CLK_ENABLE ();
Original file line number Diff line number Diff line change 29
29
#ifndef USE_USER_DEFINED_HAL_ETH_MSPINIT
30
30
31
31
#include "stm32f7xx_hal.h"
32
+ #include "platform/mbed_critical.h"
32
33
33
34
/**
34
35
* Override HAL Eth Init function
@@ -38,7 +39,9 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
38
39
GPIO_InitTypeDef GPIO_InitStructure ;
39
40
if (heth -> Instance == ETH ) {
40
41
/* Disable DCache for STM32F7 family */
42
+ core_util_critical_section_enter ();
41
43
SCB_DisableDCache ();
44
+ core_util_critical_section_exit ();
42
45
43
46
/* Enable GPIOs clocks */
44
47
__HAL_RCC_GPIOA_CLK_ENABLE ();
Original file line number Diff line number Diff line change 29
29
#ifndef USE_USER_DEFINED_HAL_ETH_MSPINIT
30
30
31
31
#include "stm32f7xx_hal.h"
32
+ #include "platform/mbed_critical.h"
32
33
33
34
/**
34
35
* Override HAL Eth Init function
@@ -38,7 +39,9 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
38
39
GPIO_InitTypeDef GPIO_InitStructure ;
39
40
if (heth -> Instance == ETH ) {
40
41
/* Disable DCache for STM32F7 family */
42
+ core_util_critical_section_enter ();
41
43
SCB_DisableDCache ();
44
+ core_util_critical_section_exit ();
42
45
43
46
/* Enable GPIOs clocks */
44
47
__HAL_RCC_GPIOA_CLK_ENABLE ();
Original file line number Diff line number Diff line change 36
36
#ifndef USE_USER_DEFINED_HAL_ETH_MSPINIT
37
37
38
38
#include "stm32h7xx_hal.h"
39
+ #include "platform/mbed_critical.h"
39
40
40
41
#define ETH_TX_EN_Pin GPIO_PIN_11
41
42
#define ETH_TX_EN_GPIO_Port GPIOG
@@ -66,7 +67,9 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
66
67
if (heth -> Instance == ETH ) {
67
68
#if defined(CORE_CM7 )
68
69
/* Disable DCache for STM32H7 family */
70
+ core_util_critical_section_enter ();
69
71
SCB_DisableDCache ();
72
+ core_util_critical_section_exit ();
70
73
#endif
71
74
72
75
/* GPIO Ports Clock Enable */
Original file line number Diff line number Diff line change 29
29
#ifndef USE_USER_DEFINED_HAL_ETH_MSPINIT
30
30
31
31
#include "stm32h7xx_hal.h"
32
+ #include "platform/mbed_critical.h"
32
33
33
34
#define MCO_Pin GPIO_PIN_0
34
35
#define MCO_GPIO_Port GPIOH
@@ -63,7 +64,9 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
63
64
GPIO_InitTypeDef GPIO_InitStruct ;
64
65
if (heth -> Instance == ETH ) {
65
66
/* Disable DCache for STM32H7 family */
67
+ core_util_critical_section_enter ();
66
68
SCB_DisableDCache ();
69
+ core_util_critical_section_exit ();
67
70
68
71
/* GPIO Ports Clock Enable */
69
72
__HAL_RCC_GPIOH_CLK_ENABLE ();
Original file line number Diff line number Diff line change 29
29
#ifndef USE_USER_DEFINED_HAL_ETH_MSPINIT
30
30
31
31
#include "stm32h7xx_hal.h"
32
+ #include "platform/mbed_critical.h"
32
33
33
34
#define MCO_Pin GPIO_PIN_0
34
35
#define MCO_GPIO_Port GPIOH
@@ -63,7 +64,9 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
63
64
GPIO_InitTypeDef GPIO_InitStruct ;
64
65
if (heth -> Instance == ETH ) {
65
66
/* Disable DCache for STM32H7 family */
67
+ core_util_critical_section_enter ();
66
68
SCB_DisableDCache ();
69
+ core_util_critical_section_exit ();
67
70
68
71
/* GPIO Ports Clock Enable */
69
72
__HAL_RCC_GPIOH_CLK_ENABLE ();
Original file line number Diff line number Diff line change 35
35
36
36
#include "stm32h7xx_hal.h"
37
37
#include "portenta_power.h"
38
+ #include "platform/mbed_critical.h"
38
39
39
40
#define ETH_TX_EN_Pin GPIO_PIN_11
40
41
#define ETH_TX_EN_GPIO_Port GPIOG
@@ -66,7 +67,9 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
66
67
67
68
#if !(defined(DUAL_CORE ) && defined(CORE_CM4 ))
68
69
/* Disable DCache for STM32H7 family */
70
+ core_util_critical_section_enter ();
69
71
SCB_DisableDCache ();
72
+ core_util_critical_section_exit ();
70
73
#endif
71
74
72
75
/* GPIO Ports Clock Enable */
You can’t perform that action at this time.
0 commit comments