Skip to content

ximtech/TimerDelay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TimerDelay

STM32 LL(Low Layer) timer delay library.
Hardware timer in the microcontroller. Can be used with TIM_Delay

Features

  • Ultra lightweight
  • Easy to use
  • Good precision
  • No HAL dependency

Trade-offs

  • Hardware timer will be occupied

Add as CPM project dependency

How to add CPM to the project, check the link

CPMAddPackage(
        NAME TIMDelay
        GITHUB_REPOSITORY ximtech/TIMDelay
        GIT_TAG origin/main)

include_directories(${TIM_DELAY_DIRECTORY}) # add directory to project
file(GLOB_RECURSE SOURCES ${TIM_DELAY_SOURCES}) # add source files

Usage

#define TIMER_DELAY  TIM1 // set timer in main.h or use default(TIM1)
timDelayInit();

timerDelay_us(10);   // microseconds delay
timerDelay_ms(100); // milliseconds delay

Releases

No releases published

Packages

No packages published