cancel
Showing results for 
Search instead for 
Did you mean: 

TIM5 TixFPx needs ~50mA to GND

andre23
Associate II
Posted on August 29, 2017 at 21:07

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 ?

4 REPLIES 4
Posted on August 29, 2017 at 21:24

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

Posted on August 29, 2017 at 21:47

Check the schematic and usability of the pin(s) in question.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
andre23
Associate II
Posted on August 30, 2017 at 11:10

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 Pulse

Mode: Set

TIM5:

Slave Mode:Trigger Mode

Trigger Source:TI2FP2

One Pulse Mode: Set

In 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=false

main.c.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyQj&d=%2Fa%2F0X0000000b87%2FThNjbWvkyWHrMQAfRzf11pQDMoogkEeB7yd7A7RmbHA&asPdf=false
andre23
Associate II
Posted on August 30, 2017 at 14:07

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