General Purpose Timer TIM4 - STM32F7 - minor issues.
Hello all,
I've been working on and off with the timers on the STM32F7 and I've noticed a few inconsistencies, though it may well be me not setting something right.
I'm using:
STM32CubeMX 4.27
STM32 Workbench
Firmware 1.12 for F7
STM32F767ZI
Getting the timer to run is relatively straightforward, and I'm having two issues at the moment:
Clock Division doesn't have any effect when changed (from the code generated by CubeMX):
htim4.Init.ClockDivision = TIM_CLOCKDIVISION_DIV4;
//htim4.Init.ClockDivision = TIM_CLOCKDIVISION_DIV2;
//htim4.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;All of the above act the same after calling:
HAL_TIM_ConfigClockSource(&htim4, &sClockSourceConfig)Secondly, I have a reset pulse, 10Hz square wave, 50% cycle, 0 - 3.3V from a signal generator, which should reset the timer only on the rising edge. However, it seems that the reset is happening on both rising and falling edge (measured on an oscilloscope and printing the counter values). the pulse is being input to TI1_ED. Slave configuration is as follows:
sSlaveConfig.SlaveMode = TIM_SLAVEMODE_RESET;
sSlaveConfig.InputTrigger = TIM_TS_TI1F_ED;
sSlaveConfig.TriggerFilter = 0;
sSlaveConfig.TriggerPolarity = TIM_TRIGGERPOLARITY_FALLING;Line 4 changes do not have any effect on the outcome.
If you could point me out in the right direction I'd really appreciate it.
Cheers,
Albert