TIM2 (PA0/PA1) Can't Receive RS422 Encoder Signals via Differential Converter
- June 24, 2025
- 5 replies
- 1970 views
Hi all,
I'm working on an STM32F429 project and trying to read quadrature signals from an RS422 encoder (SIKO MSK5000). I'm connecting the encoder to TIM2 pins (PA0/PA1) in encoder mode (using timer input capture), but I can't get any signal detected by the timer.
The RS422 output is connected through a differential-to-TTL converter (based on MAX485), and I'm using the STM32's built-in encoder interface. However, the counter stays at zero, and I see no changes at all.
-
MCU: STM32F429
-
Encoder: SIKO MSK5000 (RS422 differential A/B output)
-
Interface: TIM2 in encoder mode (PA0 = CH1, PA1 = CH2)
-
RS422 to TTL Converter: 2x QYB-998 modules (each handling one channel)
-
MSK5000 A+ / A− → QYB-998 #1 → output → STM32 PA0 (CH1)
-
MSK5000 B+ / B− → QYB-998 #2 → output → STM32 PA1 (CH2)
-
Both converters powered by 5V (shared with STM32)
-
All GNDs connected properly
-
TIM2 initialized in encoder mode (count on both edges)
Any advice, especially from those who’ve worked with encoder mode + RS422, would be greatly appreciated! I’m happy to provide schematics or scope captures if that helps.
Thanks in advance!
