Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simply delayNano Mod Add delayCycles #387

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Aug 12, 2019

  1. Add delayCycles

    Demonstrated in https://forum.pjrc.com/threads/54711-Teensy-4-0-First-Beta-Test?p=212280&viewfull=1#post212280
    
    Does this have possible utility worthy of supporting?
    Defragster committed Aug 12, 2019
    Configuration menu
    Copy the full SHA
    4e240b0 View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2019

  1. Did loop test for overhead factor -11 better

    Did a compare of overhead factor -10 to -13 and change to -11 tracks better.
    
    Did a loop of 20 passes of 5 inline calls and divided the CycCnt /100 - using offset of -10 tracks better than -12.
    >> uint32_t begin = ARM_DWT_CYCCNT-10; // Overhead Factor for execution
    
    Calling delayCycles() cusps on groups of 4 cycles because of while().
    returns in 6 cycles up to 13
    then 15 cycles up to 21
    then 23 and counting cycles starting at 22 in groups of 4.
    * integer math rounded down - put table in the forum post.
    
    Tested at 600 and 300 MHz and looked the same - of course that is twice as long :)
    Defragster committed Aug 15, 2019
    Configuration menu
    Copy the full SHA
    47f0469 View commit details
    Browse the repository at this point in the history