2018-09-24 12:54 PM
Using only timer peripherals would it be possible to configure an input to start a timer - let the timer run for a set amount of time, and then create a timer interrupt?
2018-09-24 01:10 PM
Yes Set TIMx_SMCR.TS to one of the inputs (TI1FP1 or TI2FP2, coming from CH1 or CH2) and TIMx_SMCR.SMS to Trigger Mode. Set some other channel to output compare, set its compare register to required delay, clear the respective pending interrupt flag in TIMx_SR and enable its respective interrupt in TIMx_DIER (and then of course enable the interrupt in NVIC). Set TIMx_CNT to 0 and don't enable the timer - the trigger will enable.
JW