2024-04-19 03:06 AM
Hello,
My final goal is to output two pulses from two separate pins, but not at the same time. My intention is to use TIM1 for my STM32F401RE board, as this is the only timer that allows me to set the repetition counter for the 'One Pulse Mode'. This works completely fine for one pin, but implementing the second one is where I struggle. Order of action is thought to be:
1. The blue button is pressed which TI1FP1 is connected to with a wire to. Channel3 is triggered and pulses are sent out.
2. Data is collected following and some computations are run.
3. Channel4 is triggered after computations are done, probably through GPIO_SetPin() which is connected to TI1FP1 and pulses are sent out.
I have developed my prototype for some months, but otherwise I'm new to the environment and hardware. The implementation is done through HAL and CubeIDE, which only allows me in the GUI to set one trigger source for one timer, but I'm wishing to utilise both TI1FP1 and TI2FP2 for the same timer. Is this idea possible to implement at all? Can anyone think of a similar solution, if this is not possible?
I have read the reference manual for TIM1, but can't find any info on the matter.
Best regards, Kalle
2024-04-19 06:13 AM - edited 2024-04-19 06:13 AM
> The implementation is done through HAL and CubeIDE, which only allows me in the GUI to set one trigger source for one timer, but I'm wishing to utilise both TI1FP1 and TI2FP2 for the same timer.
This is not limitation of HAL/CubeIDE, but the hardware. Read the Timer chapter in RM.
I also don't understand your description. If you want to use the timer with different settings at two different occasions (i.e. not at the same time), then simply reprogram it in between.
JW