cancel
Showing results for 
Search instead for 
Did you mean: 

how to capture the HALL using PA15/TIM1_CH1_ETR of STM32F051?

zhang_ji
Associate
Posted on June 15, 2015 at 18:43

Hello,everyone. I want to capture 3 HALLs by TIM2 of STM32F051. The 3 pins are PA15,PA1 and PB10. I captured the period of HALL with PA1 and PA10 successfully, but failed with PA15. The funtion of PA15 is AF2, and the pin is defined as TIM2_CH1_ETR. The CH1 and ETR cannot be used at the same time, but I don't know how to config the TIM2_CH1_ETR into CH1 to capture HALL.If there's someone knows, I will appreciate it. 

#worst-forum-software-ever #caputure
4 REPLIES 4
Posted on June 15, 2015 at 19:33

Well as ETR is an input only, it doesn't conflict with CH1 used as an input, output, or not at all. The use of ETR would be handled by suitable configuration of it as a source. CH1 by suitable input capture, or PWM/Toggle type output selection.

No code is presented so it's hard to conclude why it wouldn't work, I'd start with clocks and pin configuration, and then move to timer configuration.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on June 15, 2015 at 20:25

Look at the AF-matrix table in datasheet: TIM2_CH1 for PA15 is at AF5.

JW

PS. The title is confusing - there's no TIM1 in 'F05x

PS2 the edit confused the forum software and mixed up the timeline - sorry again
Posted on June 15, 2015 at 21:21

AF2 in the last two rev's I'm looking at...

http://www.st.com/st-web-ui/static/active/en/resource/technical/document/datasheet/DM00039193.pdf

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on June 16, 2015 at 08:47

Indeed - I was looking at the 'L051 datasheet by mistake...

Sorry.

JW