2017-08-29 12:07 PM
Hello, I'am trying to use the TIM5 in Slave-(and Master-)Mode to drive another Timer (TIM1 to Trigger a DMA-Request on each Period).
When I configure TIM5 in Triggermode TI2FP2 on Stm32F4Discovery Board (PA1 and this is a Free IO) and Trigger Polarity falling-edge, then the Pin needs ~50mA to GND (even there, the level is few mV over zero, but enough for STM to detect the low-level).
PA1 rises to high after the 'HAL_TIM_IC_Start(&htim5,TIM_CHANNEL_2);' call.
The Datasheet tells : absolute-maximum is 25mA per Pin so this is prohibited.
The same Problem is on STM32F429 (I just tested with this two MCU's).
Can someone explain what I'am doing wrong ?
2017-08-29 12:24 PM
Hello !
You don't provide enough details about your initialization code eg an IOC and main.c file
Check if somewhere some other code reinitialises the PA1 as an output .
Regards..
Vf
2017-08-29 12:47 PM
Check the schematic and usability of the pin(s) in question.
2017-08-30 02:10 AM
Initialization-Code :
HAL_Init();
SystemClock_Config();
MX_GPIO_Init();
MX_TIM5_Init();
MX_TIM1_Init();
HAL_TIM_IC_Start_IT(&htim1,TIM_CHANNEL_1);// this line takes no difference in problem
HAL_TIM_IC_Start(&htim5,TIM_CHANNEL_2);
while(1);
Cube Configuration:
TIM1:
Slave Mode:Trigger Mode
Trigger Source:TI1FP1 Clock Source :Internal Clock One PulseMode: Set
TIM5:
Slave Mode:Trigger Mode
Trigger Source:TI2FP2 One Pulse Mode: SetIn schematic is PA1 as free IO-Pin routed and PA1 and this alternate-function is for Tim5_ch2 avaliable .
Attached: Cube-Config (Stm32F4-Discovery) + main
________________ Attachments : stm32f407vgt6__discovery__tim5ICTrig_Test.ioc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyRY&d=%2Fa%2F0X0000000b8H%2F_Da4kbKxpXeX8o.YLaVkwbfUsQtO9NOr4xfHhX60ykA&asPdf=falsemain.c.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyQj&d=%2Fa%2F0X0000000b87%2FThNjbWvkyWHrMQAfRzf11pQDMoogkEeB7yd7A7RmbHA&asPdf=false2017-08-30 05:07 AM
OK Solved :
HAL_TIM_OnePulse_ConfigChannel() needs to be Called , because the Input-pin is neither configured as Output or Input.
CCMR1->CC2S was on '00' instead of '01' which is TI2FP2-Configuration