cancel
Showing results for 
Search instead for 
Did you mean: 

[HELP]Can we create delay 1 microsecond with TIMER4?

croket_2512
Associate II
Posted on November 01, 2015 at 16:00

Hello everyone,

I am using STM8S105 and STM8S003. Can we create delay 1 microsecond with TIMER4? I can create delay 1ms, 100us, 10us but can not for delay 1us. Can we?

Thank you!
1 REPLY 1
toppot2009
Associate II
Posted on November 02, 2015 at 17:49

Hello,

Use:

void _delay_1us (void)

{

nop();

..

nop();

}

but the length of the delay each time you need to verify through an oscilloscope,

because the instruction execution time in STM8 is unpredictable.

After the TIM4 can not do this, for the same reason.