TIM2_CH3 ICU on STM32F4

Discussions and support about ChibiOS/HAL, the MCU Hardware Abstraction Layer.
Post Reply
kchandrashekar
Posts: 2
Joined: Fri May 01, 2015 4:29 pm

TIM2_CH3 ICU on STM32F4

Post by kchandrashekar »

I have a custom board that has the STM32F407VET6 MCU, and I'm trying to setup an ICU on PB10/TIM2_CH3.

Is it possible to configure the TIM2_CH3 as an ICU? The ICU driver doesn't seem to provide a ICU_CHANNEL_3 option. Is this a limitation of the MCU or of the driver or both?
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: TIM2_CH3 ICU on STM32F4

Post by Giovanni »

Hi,

The ICU driver on the STM32 supports only channels 1 and 2, there is a specific reason for this in the timer architecture, we discussed it on the forum a while ago.

Giovanni
User avatar
barthess
Posts: 861
Joined: Wed Dec 08, 2010 7:55 pm
Been thanked: 7 times

Re: TIM2_CH3 ICU on STM32F4

Post by barthess »

@kchandrashekar
You can use code from this project
https://github.com/ChibiOS/ChibiOS-Drivers
Or EICU driver from community submodule.
kchandrashekar
Posts: 2
Joined: Fri May 01, 2015 4:29 pm

Re: TIM2_CH3 ICU on STM32F4

Post by kchandrashekar »

What precisely was the reason, I'm unable to find the said post in the forum. I''m attempting to bring it up using a mish-mash of the ChibiOS code and the Peripheral Driver Code from STM. And it doesn't seem to be working, it was however working on a different pin which also had the same function(TIM2_CH3) attached to it.
Post Reply