Hi,
I am considering a project for creating multiples software timers using Teensy 4.0 or 4.1. The timers to be handled in systick interrupt routine. Each of these timers will be set as a structure (similar to TON timers in Rockwell Studio 5000 ladder diagram) and will be set as follows.
Preset - 32 bit, Accum - 32 bit, EN, TT, and DN Boolean status bits.
Systick timer interrupt routine will check the enable bit (EN) and if it is enabled if will increment the timer Accum value. If Accum has become equal to Preset, the DN bit will be set, indicting that timer is done and EN bit will be reset. The TT bit for now will be true if the the timer has not done timing. It may be eliminated later.
My main interest is understanding the implementation of Systick interrupt and ability to add small routines such as software times control. If there is an example somewhere on setting it in Arduino/Teensyduino it will be most helpful. This functionality is easily achieved in STMCube IDE, but I have not used it in Arduino/Teensyduino..
Thanks and Kind Regards,
Sudhir
I am considering a project for creating multiples software timers using Teensy 4.0 or 4.1. The timers to be handled in systick interrupt routine. Each of these timers will be set as a structure (similar to TON timers in Rockwell Studio 5000 ladder diagram) and will be set as follows.
Preset - 32 bit, Accum - 32 bit, EN, TT, and DN Boolean status bits.
Systick timer interrupt routine will check the enable bit (EN) and if it is enabled if will increment the timer Accum value. If Accum has become equal to Preset, the DN bit will be set, indicting that timer is done and EN bit will be reset. The TT bit for now will be true if the the timer has not done timing. It may be eliminated later.
My main interest is understanding the implementation of Systick interrupt and ability to add small routines such as software times control. If there is an example somewhere on setting it in Arduino/Teensyduino it will be most helpful. This functionality is easily achieved in STMCube IDE, but I have not used it in Arduino/Teensyduino..
Thanks and Kind Regards,
Sudhir