You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
delayInsideIT() code should have been in the method:
void GSM3SoftSerial::tunedDelay(uint16_t delay)
It was introduced as an API to support
built-in GSM library on Nucleo-L476RG and is not relevant for other.
Fix#250
Signed-off-by: Frederic.Pillon <frederic.pillon@st.com>
Copy file name to clipboardExpand all lines: cores/arduino/stm32/clock.c
-34
Original file line number
Diff line number
Diff line change
@@ -87,40 +87,6 @@ void SysTick_Handler(void)
87
87
osSystickHandler();
88
88
}
89
89
90
-
/**
91
-
* @brief Function provides us delay (required by some arduino libraries).
92
-
* Can be called inside an interrupt.
93
-
* @param None
94
-
* @retval None
95
-
*/
96
-
voiddelayInsideIT(uint32_tdelay_us)
97
-
{
98
-
uint32_tnb_loop;
99
-
#if defined (STM32F0xx) || defined (STM32L0xx)
100
-
nb_loop= (((HAL_RCC_GetHCLKFreq() / 1000000)/5)*delay_us)+1; /* uS (divide by 4 because each loop take about 4 cycles including nop +1 is here to avoid delay of 0 */
101
-
__asm__ volatile(
102
-
"1: ""\n\t"
103
-
" nop ""\n\t"
104
-
" sub %0, %0, #1 ""\n\t"
105
-
" bne 1b ""\n\t"
106
-
: "=r" (nb_loop)
107
-
: "0"(nb_loop)
108
-
: "r3"
109
-
);
110
-
#else
111
-
nb_loop= (((HAL_RCC_GetHCLKFreq() / 1000000)/4)*delay_us)+1; /* uS (divide by 4 because each loop take about 4 cycles including nop +1 is here to avoid delay of 0 */
112
-
__asm__ volatile(
113
-
"1: ""\n\t"
114
-
" nop ""\n\t"
115
-
" subs.w %0, %0, #1 ""\n\t"
116
-
" bne 1b ""\n\t"
117
-
: "=r" (nb_loop)
118
-
: "0"(nb_loop)
119
-
: "r3"
120
-
);
121
-
#endif
122
-
}
123
-
124
90
/**
125
91
* @brief Enable the specified clock if not already set
126
92
* @param source: clock source: LSE_CLOCK, LSI_CLOCK, HSI_CLOCK or HSE_CLOCK
0 commit comments