This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

delay function for STM32F

Dear All,
please provide header file for delay function

I mean I need constant delay even processor frequency changed

Ex;

delay_ms(500);

Currently I am using following delay function which is varying when change the system clock


void Delay(__IO uint32_t nCount)
{
  while(nCount--)
  {
  }
}

please also advice what is the deferment between flowing veritable types

__IO uint32_t
uint32_t

Thanks in advnace

Parents
  • The advice?

    Check the chapter about timers in the processor documentation.

    Or look for sample code or application notes about how to use the processor timers.

    It isn't needed to use interrupts with the timers - it's possible to poll too. The main thing is that the timers ticks their time without caring about what other things happens.

Reply
  • The advice?

    Check the chapter about timers in the processor documentation.

    Or look for sample code or application notes about how to use the processor timers.

    It isn't needed to use interrupts with the timers - it's possible to poll too. The main thing is that the timers ticks their time without caring about what other things happens.

Children
No data