2015-06-15 09:43 AM
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 #caputure2015-06-15 10:33 AM
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.2015-06-15 11:25 AM
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 again2015-06-15 12:21 PM
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
2015-06-15 11:47 PM
Indeed - I was looking at the 'L051 datasheet by mistake...
Sorry. JW