Skip to main content
Konstantin Maslennikov
Associate II
February 19, 2018
Question

Systick and TIM6

  • February 19, 2018
  • 1 reply
  • 681 views
Posted on February 19, 2018 at 12:55

The original post was too long to process during our migration. Please click on the attachment to read the original post.
    This topic has been closed for replies.

    1 reply

    waclawek.jan
    Super User
    February 19, 2018
    Posted on February 19, 2018 at 13:15

    Probably because now the loopdelay (which is far from being precise) causes the main loop to miss the 1ms window of ((

    TimingDelay % TIMER

    )==0)?

    Try (TimingDelay >= TIMER) instead.

    And then throw away the whole program and start from scratch, rethinking what do you really want to achieve, and avoiding loopdelays.

    JW

    Konstantin Maslennikov
    Associate II
    February 19, 2018
    Posted on February 19, 2018 at 13:25

    I'm tryed it.. I'm begun from this.. Sorry, I'm probably understand - the whole point is this:

    while ((TIM6->CR1 & TIM_CR1_CEN) != 0);

    Try (TimingDelay >= TIMER) instead.