Question
Delay in microseconds for stm32l0 cortex m0+
I Wanted to generate the microsecond delay function, I have tried below functions but these are not working, It will be good if someone knows the delay function.
static inline void delay_us( uint32_t micros)
{
micros *= (SystemCoreClock / 1000000) / 5;
while (micros);
}
********************
void delay_us( uint32_t us)
{
volatile uint32_t counter = 7*us;
while(counter--)
}
************************
void delay_us( uint32_t value)
{
SysTick->VAL = 8 * value;
uint32_t temp = SysTick->VAL;
while(temp) { temp = SysTick->VAL; }
}
