2012-06-11 01:34 PM
I have designed a brushless servo motor driver with F103
I use Timer 4 in encoder mode and connect motor encoder to CH1 and CH2 at the same time for changing UVW phases I compare timer value with 24 constant numbers and change phases according to table for doing this I set CH1 and CH2 of Timer as compare outputs I dont set alternate function to the CH1 and CH2 pins becouse they are connected to encoder as well I only enable compare interrupts so I can detect end of one phase and beginning of other phase however this time I cannot filter encoder inputs becouse as I said I defined CH1 and CH2 as output for comparing and as a result there are glitches in encoder signals - which I cannot filter and corrupts the encoder value - which makes ''hitting sound '' as the motor turns what do you advise me to do ? ( I designed CH3 and CH4 as some other functions thats why I am looking for another ( cheaper ) solution otherwise I must reorder the PCB )