External Trigger for Timer on STM32F4-Discovery

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
User avatar
Fede
Posts: 37
Joined: Thu Nov 08, 2012 8:30 pm

External Trigger for Timer on STM32F4-Discovery

Post by Fede »

Hi all,
I'd like to start a timer each time a rising edge arrives on a pin, like a external trigger...
Do you know if is possible to set ChibiOS GPT for this application?
In generally, I know that is possible because there is an example project inside the STM32 Standard Peripherals Library that is called:
"TIM_ExtTrigger_Synchro"...

http://brawikov.narod.ru/StdPerLibSTM32F10x/group__TIM__ExtTrigger__Synchro.html

I know that is possible to set a EXT that calls an interrupt that starts a timer but I'd like to use directly the timer...
Thank you in advance...
Fede

PS (the test hardware is a STM32F4Discovery board)
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: External Trigger for Timer on STM32F4-Discovery

Post by Giovanni »

The GPT driver does not support this scenario, it is meant to be an abstraction of periodic timers so it does not support STM32-specific timer features. You should consider a custom driver for that function or adding a small custom enhancement to the GPT low level driver.

Thread moved to support, this forum is meant for project announcements.

Giovanni
User avatar
Fede
Posts: 37
Joined: Thu Nov 08, 2012 8:30 pm

Re: External Trigger for Timer on STM32F4-Discovery

Post by Fede »

I'm sorry... thank you Giovanni, I was already thinking about an enhancement of GPT low level driver...
if I will get results, I'll put them here.
Bye
Fede
Post Reply