This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Wait function?

Other Parts Discussed in Thread: MSP430AFE253

Does a wait function exist (i.e. idle for a specific number of milliseconds and then continue executing code). 

I am using MSP430AFE253. 

Thank you for the help!

  • Lawrence Said said:
    Does a wait function exist

    No.
    SImply because the MSP does not have a unique timebase. It doesn't know about milliseconds. Only the one who programs the clock module knows what requencies are in use.

    There is a compiler intrinsic ( __delay_cycles()) that adds a delay of a given nubmer of CPU cycles, but how much a CPU cycle is again depends on the configuration.

    So it's up to you to write a delay function that fits your clock configuration.

    Hint: Timers are good in counting clock cycles.

**Attention** This is a public forum