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

machine cycle

Hello all,

the way we calculate 1 machine cycle period in 8051
clock = 12MHz
then 1m/c = 1/ (12MHz / 12) = 1 usec

In case of ARM7, I have peripheral clock for timer = 12Mhz (after doing all the calculations of PLL)
can you guide me the time period of 1 machine cycle in case of ARM7.
does it mean 1 m/c = (1/12Mhz) = 83 nsec

Please guide..

Thanks and regards.

Parents Reply Children
  • Hello Mike,
    I am using lpc2387. and timer is running at 12Mhz.
    and it is not mentioned in datasheet about machine cycle.
    thanks

  • a similar example I think you are looking for can be found in the STM32F2-F4 demonstration Builder project.

    It offers this and an ISR timer for the F2 device the clock is 120Mhz

    void USB_OTG_BSP_uDelay (const uint32_t usec)
    {
    
    #ifdef USE_ACCURATE_TIME
      BSP_Delay(usec,TIM_USEC_DELAY);
    #else
      __IO uint32_t count = 0;
      const uint32_t utime = (120 * usec / 7);
      do
      {
        if ( ++count > utime )
        {
          return ;
        }
      }
      while (1);
    #endif
    }