dear reader,

Using a Teensy 3.6.
For a a project I need to have a very short delay shorter then 1s should be near 0.05S (followed by a interrupt).
Is it possible?

I checked out :

https://github.com/PaulStoffregen/FreqCount

But this is driven by an external clock( the freq to measure) Can I some how set the LPTMR_CSR, PSR, CMR, CNR and / or the MCG_IRCLK to use an internal clock to make a fast delay?

Thanks hanz




from the headerfile:
static inline void counter_init(void)

{

SIM_SCGC5 |= SIM_SCGC5_LPTIMER;

LPTMR0_CSR = 0;

LPTMR0_PSR = 0b00000100; // bypass prescaler/filter

LPTMR0_CMR = 0xFFFF;

LPTMR0_CSR = 0b00100110; // counter, input=alt2, free running mode

CORE_PIN13_CONFIG = PORT_PCR_MUX(3);

}